-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into family-subgraphs
- Loading branch information
Showing
67 changed files
with
2,931 additions
and
826 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
574 changes: 287 additions & 287 deletions
574
.yarn/releases/yarn-4.5.3.cjs → .yarn/releases/yarn-4.6.0.cjs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/* | ||
* Copyright (C) NIWA & British Crown (Met Office) & Contributors. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
import TreeItem from '@/components/cylc/tree/TreeItem.vue' | ||
import { | ||
simpleCyclepointNode, | ||
} from '$tests/unit/components/cylc/tree/tree.data' | ||
|
||
// Get lists of: a) all tree item nodes; b) only visible ones. | ||
Cypress.Commands.add('getNodeTypes', () => { | ||
cy.get('.c-treeitem') | ||
.then(($els) => { | ||
const all = Array.from($els, ({ dataset }) => dataset.nodeType) | ||
const visible = all.filter((val, i) => $els[i].checkVisibility()) | ||
return { all, visible } | ||
}) | ||
}) | ||
|
||
// Expand/collapse the first node of this type. | ||
Cypress.Commands.add('toggleNode', (nodeType) => { | ||
cy.get(`[data-node-type=${nodeType}] .node-expand-collapse-button:first`).click() | ||
}) | ||
|
||
describe('TreeItem component', () => { | ||
it('expands/collapses children', () => { | ||
cy.vmount(TreeItem, { | ||
props: { | ||
node: simpleCyclepointNode, | ||
filteredOutNodesCache: new WeakMap(), | ||
}, | ||
}) | ||
cy.addVuetifyStyles(cy) | ||
|
||
cy.getNodeTypes() | ||
.should('deep.equal', { | ||
// Auto expand everything down to task nodes by default | ||
all: ['cycle', 'task'], | ||
visible: ['cycle', 'task'] | ||
}) | ||
|
||
cy.toggleNode('task') | ||
cy.getNodeTypes() | ||
.should('deep.equal', { | ||
all: ['cycle', 'task', 'job'], | ||
visible: ['cycle', 'task', 'job'] | ||
}) | ||
|
||
cy.toggleNode('cycle') | ||
cy.getNodeTypes() | ||
.should('deep.equal', { | ||
// All previously expanded nodes under cycle should be hidden but remain rendered | ||
all: ['cycle', 'task', 'job'], | ||
visible: ['cycle'] | ||
}) | ||
|
||
cy.toggleNode('cycle') | ||
cy.toggleNode('job') | ||
cy.getNodeTypes() | ||
.should('deep.equal', { | ||
// Job node does not use a child TreeItem | ||
all: ['cycle', 'task', 'job'], | ||
visible: ['cycle', 'task', 'job'] | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.