Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into family-subgraphs
Browse files Browse the repository at this point in the history
  • Loading branch information
markgrahamdawson committed Jan 15, 2025
2 parents 43522f4 + 82bc9fd commit db1fefe
Show file tree
Hide file tree
Showing 67 changed files with 2,931 additions and 826 deletions.
8 changes: 7 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ module.exports = {
functions: 'only-multiline',
},
],
'no-console': [
'error',
{
allow: ['warn', 'error']
}
],
'template-curly-spacing': [
'off'
],
Expand All @@ -60,6 +66,6 @@ module.exports = {
],
'cypress/unsafe-to-chain-command': [
'off'
]
],
},
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
selenium-debug.log*
vite.config.*.timestamp*

# Coverage
.nyc_output/
Expand Down
574 changes: 287 additions & 287 deletions .yarn/releases/yarn-4.5.3.cjs → .yarn/releases/yarn-4.6.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ networkSettings:

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.5.3.cjs
yarnPath: .yarn/releases/yarn-4.6.0.cjs
22 changes: 22 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,28 @@ $ towncrier create <PR-number>.<feat|fix>.md --content "Short description"

<!-- towncrier release notes start -->

## cylc-ui-2.7.0 (Released 2025-01-08)

### 🚀 Enhancements

[#1886](https://github.com/cylc/cylc-ui/pull/1886) - Added an info view to display task information including metadata, prerequisites and outputs.

[#1966](https://github.com/cylc/cylc-ui/pull/1966) - Added copy-to-clipboard buttons:
- the ID of a workflow/task/etc from the command menu
- the log file path in the Log view

[#1973](https://github.com/cylc/cylc-ui/pull/1973) - Add a button to toggle families on and off in the tree view.

[#1974](https://github.com/cylc/cylc-ui/pull/1974) - Add a "Select All" action in the task state filter.

[#1982](https://github.com/cylc/cylc-ui/pull/1982) - Add link to Jupyter Lab from the Dashboard (if Jupyter Lab is installed).

[#2016](https://github.com/cylc/cylc-ui/pull/2016) - Show [flow numbers](https://cylc.github.io/cylc-doc/stable/html/glossary.html#term-flow) when applicable. Removed tasks (flow=None) are now dimmed.

### 🔧 Fixes

[#1979](https://github.com/cylc/cylc-ui/pull/1979) - Don't offer the n-window selection if you don't have permissions to use it.

## cylc-ui-2.6.0 (Released 2024-10-09)

### 🚀 Enhancements
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ the UI.

## Copyright and Terms of Use

Copyright (C) 2018-<span actions:bind='current-year'>2024</span> NIWA & British Crown (Met Office) & Contributors.
Copyright (C) 2018-<span actions:bind='current-year'>2025</span> NIWA & British Crown (Met Office) & Contributors.

Cylc 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,
Expand Down Expand Up @@ -69,15 +69,15 @@ There are three groups of tests:
* Unit tests
* Simple unit tests for individual functions and classes.
* **Framework:** [Vitest](https://vitest.dev/)
* **Assertions:** [Chai](https://www.chaijs.com/)/[Jest](https://jestjs.io/docs/expect)
* **Assertions:** [Chai](https://www.chaijs.com/)/[Vitest](https://vitest.dev/api/expect.html)
* **Path:** `tests/unit`
* **Command:** `yarn run test:unit` (watches by default, only re-runs changed file)
* (To prevent watching, use `yarn vitest run`)
* Component tests
* In-browser tests which mount a single Vue component standalone.
* **Framework:** [Cypress](https://docs.cypress.io/guides/overview/why-cypress)
* **Assertions:** Chai
* **Path:** `cypress/component`
* **Path:** `tests/component`
* **Command:** `yarn run test:component`
* (For "headless" mode use `yarn cypress run --component --config video=false`)
* End to end tests
Expand Down
3 changes: 0 additions & 3 deletions changes.d/1966.feat.md

This file was deleted.

1 change: 0 additions & 1 deletion changes.d/1973.feat.md

This file was deleted.

1 change: 0 additions & 1 deletion changes.d/1974.feat.md

This file was deleted.

1 change: 0 additions & 1 deletion changes.d/1979.fix.md

This file was deleted.

1 change: 0 additions & 1 deletion changes.d/1982.feat.md

This file was deleted.

12 changes: 4 additions & 8 deletions cypress.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,7 @@ module.exports = defineConfig({
mode: 'development',
})
)

return Object.assign({}, config, {
fixturesFolder: 'tests/e2e/fixtures',
specPattern: 'tests/e2e/specs',
screenshotsFolder: 'tests/e2e/screenshots',
videosFolder: 'tests/e2e/videos',
supportFile: 'tests/e2e/support/index.js'
})
return config
},
specPattern: 'tests/e2e/specs/**/*.cy.{js,jsx,ts,tsx}',
supportFile: 'tests/e2e/support/index.js'
Expand All @@ -56,6 +49,9 @@ module.exports = defineConfig({
require('@cypress/code-coverage/task')(on, config)
return config
},
specPattern: 'tests/component/**/*.cy.{js,jsx,ts,tsx}',
supportFile: 'tests/component/support/index.js',
indexHtmlFile: 'tests/component/support/component-index.html'
},

env: {
Expand Down
79 changes: 79 additions & 0 deletions cypress/component/treeItem.cy.js
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']
})
})
})
42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cylc-ui",
"version": "2.6.0",
"version": "2.7.0",
"private": true,
"license": "GPL-3.0-only",
"type": "module",
Expand All @@ -24,44 +24,44 @@
"test": "vitest run && yarn run serve cy:run"
},
"dependencies": {
"@apollo/client": "3.11.9",
"@hpcc-js/wasm": "2.22.3",
"@apollo/client": "3.12.4",
"@hpcc-js/wasm": "2.22.4",
"@lumino/default-theme": "2.1.7",
"@lumino/widgets": "2.5.0",
"@mdi/js": "7.4.47",
"@vueuse/core": "11.2.0",
"@vueuse/core": "11.3.0",
"apexcharts": "3.41.0",
"axios": "1.7.8",
"dedent": "1.5.3",
"enumify": "2.0.0",
"graphiql": "3.7.2",
"graphql": "16.9.0",
"graphiql": "3.8.3",
"graphql": "16.10.0",
"graphql-tag": "2.12.6",
"lodash-es": "4.17.21",
"markdown-it": "14.1.0",
"mitt": "3.0.1",
"nprogress": "1.0.0-1",
"preact": "10.24.3",
"preact": "10.25.4",
"simple-icons": "2.19.0",
"subscriptions-transport-ws": "0.11.0",
"svg-pan-zoom": "3.6.2",
"vue": "3.4.11",
"vue-i18n": "10.0.5",
"vue-i18n": "11.0.1",
"vue-router": "4.5.0",
"vue-the-mask": "0.11.1",
"vue3-apexcharts": "1.4.1",
"vuetify": "3.7.4",
"vuetify": "3.7.6",
"vuex": "4.1.0"
},
"devDependencies": {
"@cypress/code-coverage": "3.13.8",
"@cypress/code-coverage": "3.13.10",
"@vitejs/plugin-vue": "5.2.1",
"@vitest/coverage-istanbul": "2.1.6",
"@vitest/coverage-istanbul": "2.1.8",
"@vue/test-utils": "2.4.6",
"concurrently": "9.1.0",
"cross-fetch": "4.0.0",
"cypress": "13.16.0",
"cypress-vite": "1.5.0",
"concurrently": "9.1.2",
"cross-fetch": "4.1.0",
"cypress": "13.17.0",
"cypress-vite": "1.6.0",
"eslint": "8.57.1",
"eslint-config-standard": "17.1.0",
"eslint-plugin-compat": "4.2.0",
Expand All @@ -72,21 +72,21 @@
"eslint-plugin-promise": "6.6.0",
"eslint-plugin-vue": "9.32.0",
"eslint-plugin-vuetify": "2.5.1",
"express": "4.21.1",
"express": "4.21.2",
"express-ws": "5.0.2",
"istanbul-lib-coverage": "3.2.2",
"jsdom": "25.0.1",
"jsdom": "26.0.0",
"json-server": "0.17.4",
"nodemon": "3.1.7",
"nodemon": "3.1.9",
"nyc": "17.1.0",
"sass-embedded": "1.81.0",
"sinon": "19.0.2",
"standard": "17.1.2",
"vite": "6.0.1",
"vite": "6.0.7",
"vite-plugin-eslint": "1.8.1",
"vite-plugin-istanbul": "6.0.2",
"vite-plugin-vuetify": "2.0.4",
"vitest": "2.1.6"
"vitest": "2.1.8"
},
"peerDependenciesMeta": {
"react": {
Expand All @@ -99,5 +99,5 @@
"bugs": {
"url": "https://github.com/cylc/cylc-ui/issues"
},
"packageManager": "yarn@4.5.3"
"packageManager": "yarn@4.6.0"
}
Loading

0 comments on commit db1fefe

Please sign in to comment.