From 82a7fe2d6293d6ac4dbb10bbe1572221fb5f718b Mon Sep 17 00:00:00 2001 From: akintomiwa Date: Fri, 9 Aug 2024 10:46:41 +0000 Subject: [PATCH 01/20] increase TextFilter debounce timer to 500ms --- .../src/table/columnFilters/textColumnFilter.component.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/datagateway-common/src/table/columnFilters/textColumnFilter.component.tsx b/packages/datagateway-common/src/table/columnFilters/textColumnFilter.component.tsx index 672ad6c75..23d2d7665 100644 --- a/packages/datagateway-common/src/table/columnFilters/textColumnFilter.component.tsx +++ b/packages/datagateway-common/src/table/columnFilters/textColumnFilter.component.tsx @@ -30,7 +30,7 @@ const TextColumnFilter = (props: { () => debounce((value: string) => { onChange(value === '' ? null : { value: value, type: type }); - }, 250), + }, 500), [onChange, type] ); From 3f48edcde6b32a860c62fc23e00ad449d7c4568c Mon Sep 17 00:00:00 2001 From: akintomiwa Date: Fri, 9 Aug 2024 11:21:36 +0000 Subject: [PATCH 02/20] dls table files - set to name --- .../src/views/table/dls/dlsDatafilesTable.component.tsx | 2 +- .../src/views/table/dls/dlsDatasetsTable.component.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/datagateway-dataview/src/views/table/dls/dlsDatafilesTable.component.tsx b/packages/datagateway-dataview/src/views/table/dls/dlsDatafilesTable.component.tsx index b0bcfc224..0b916f196 100644 --- a/packages/datagateway-dataview/src/views/table/dls/dlsDatafilesTable.component.tsx +++ b/packages/datagateway-dataview/src/views/table/dls/dlsDatafilesTable.component.tsx @@ -134,7 +134,7 @@ const DLSDatafilesTable = ( { icon: CalendarToday, label: t('datafiles.create_time'), - dataKey: 'createTime', + dataKey: 'name', filterComponent: dateFilter, defaultSort: 'desc', }, diff --git a/packages/datagateway-dataview/src/views/table/dls/dlsDatasetsTable.component.tsx b/packages/datagateway-dataview/src/views/table/dls/dlsDatasetsTable.component.tsx index 445d059ee..998493638 100644 --- a/packages/datagateway-dataview/src/views/table/dls/dlsDatasetsTable.component.tsx +++ b/packages/datagateway-dataview/src/views/table/dls/dlsDatasetsTable.component.tsx @@ -149,7 +149,7 @@ const DLSDatasetsTable = (props: DLSDatasetsTableProps): React.ReactElement => { { icon: CalendarToday, label: t('datasets.create_time'), - dataKey: 'createTime', + dataKey: 'name', filterComponent: dateFilter, defaultSort: 'desc', }, From 4b522fd322450c6eed6c4c9dcef77f5f4e9a0e2d Mon Sep 17 00:00:00 2001 From: akintomiwa Date: Fri, 9 Aug 2024 11:22:34 +0000 Subject: [PATCH 03/20] isis table files - set to name --- .../src/views/table/isis/isisDatafilesTable.component.tsx | 2 +- .../src/views/table/isis/isisDatasetsTable.component.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/datagateway-dataview/src/views/table/isis/isisDatafilesTable.component.tsx b/packages/datagateway-dataview/src/views/table/isis/isisDatafilesTable.component.tsx index bb70f301f..3b1ac1032 100644 --- a/packages/datagateway-dataview/src/views/table/isis/isisDatafilesTable.component.tsx +++ b/packages/datagateway-dataview/src/views/table/isis/isisDatafilesTable.component.tsx @@ -150,7 +150,7 @@ const ISISDatafilesTable = ( { icon: CalendarTodayIcon, label: t('datafiles.modified_time'), - dataKey: 'modTime', + dataKey: 'name', filterComponent: dateFilter, defaultSort: 'desc', }, diff --git a/packages/datagateway-dataview/src/views/table/isis/isisDatasetsTable.component.tsx b/packages/datagateway-dataview/src/views/table/isis/isisDatasetsTable.component.tsx index 498dae595..7b20dfdae 100644 --- a/packages/datagateway-dataview/src/views/table/isis/isisDatasetsTable.component.tsx +++ b/packages/datagateway-dataview/src/views/table/isis/isisDatasetsTable.component.tsx @@ -154,7 +154,7 @@ const ISISDatasetsTable = ( { icon: CalendarTodayIcon, label: t('datasets.create_time'), - dataKey: 'createTime', + dataKey: 'name', filterComponent: dateFilter, defaultSort: 'desc', }, From b25ede5120012f0c93f39d517bb774197ec701cf Mon Sep 17 00:00:00 2001 From: akintomiwa Date: Fri, 9 Aug 2024 11:23:27 +0000 Subject: [PATCH 04/20] dls card files - set to name --- .../src/views/card/dls/dlsDatasetsCardView.component.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/datagateway-dataview/src/views/card/dls/dlsDatasetsCardView.component.tsx b/packages/datagateway-dataview/src/views/card/dls/dlsDatasetsCardView.component.tsx index d13b455ea..e81a08b3e 100644 --- a/packages/datagateway-dataview/src/views/card/dls/dlsDatasetsCardView.component.tsx +++ b/packages/datagateway-dataview/src/views/card/dls/dlsDatasetsCardView.component.tsx @@ -116,7 +116,7 @@ const DLSDatasetsCardView = (props: DLSDatasetsCVProps): React.ReactElement => { { icon: CalendarToday, label: t('datasets.create_time'), - dataKey: 'createTime', + dataKey: 'name', filterComponent: dateFilter, defaultSort: 'desc', }, From e2aec6fe639051facab2a7b87b8eca298544f0bc Mon Sep 17 00:00:00 2001 From: akintomiwa Date: Fri, 9 Aug 2024 11:24:16 +0000 Subject: [PATCH 05/20] isis card files - set to name --- .../src/views/card/datasetCardView.component.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/datagateway-dataview/src/views/card/datasetCardView.component.tsx b/packages/datagateway-dataview/src/views/card/datasetCardView.component.tsx index 71ede5e86..5b457af12 100644 --- a/packages/datagateway-dataview/src/views/card/datasetCardView.component.tsx +++ b/packages/datagateway-dataview/src/views/card/datasetCardView.component.tsx @@ -91,7 +91,7 @@ const DatasetCardView = (props: DatasetCardViewProps): React.ReactElement => { { icon: CalendarToday, label: t('datasets.create_time'), - dataKey: 'createTime', + dataKey: 'name', filterComponent: dateFilter, }, { From 44ac2b39fdb8c077f962756d1029125785222611 Mon Sep 17 00:00:00 2001 From: akintomiwa Date: Mon, 12 Aug 2024 11:28:01 +0000 Subject: [PATCH 06/20] update tests, comment --- .../src/table/columnFilters/textColumnFilter.component.test.tsx | 2 +- .../src/table/columnFilters/textColumnFilter.component.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/datagateway-common/src/table/columnFilters/textColumnFilter.component.test.tsx b/packages/datagateway-common/src/table/columnFilters/textColumnFilter.component.test.tsx index 638181b12..aab432bf7 100644 --- a/packages/datagateway-common/src/table/columnFilters/textColumnFilter.component.test.tsx +++ b/packages/datagateway-common/src/table/columnFilters/textColumnFilter.component.test.tsx @@ -12,7 +12,7 @@ import userEvent from '@testing-library/user-event'; jest.mock('../../api'); jest.useFakeTimers('modern'); -const DEBOUNCE_DELAY = 250; +const DEBOUNCE_DELAY = 500; describe('Text filter component', () => { let user: UserEvent; diff --git a/packages/datagateway-common/src/table/columnFilters/textColumnFilter.component.tsx b/packages/datagateway-common/src/table/columnFilters/textColumnFilter.component.tsx index 23d2d7665..2fb1f7043 100644 --- a/packages/datagateway-common/src/table/columnFilters/textColumnFilter.component.tsx +++ b/packages/datagateway-common/src/table/columnFilters/textColumnFilter.component.tsx @@ -25,7 +25,7 @@ const TextColumnFilter = (props: { ); const [type, setType] = React.useState(propType ? propType : 'include'); - // Debounce the updating of the column filter by 250 milliseconds. + // Debounce the updating of the column filter by 500 milliseconds. const updateValue = React.useMemo( () => debounce((value: string) => { From 26655cf8478fb71ba842a8bb09b0e7e4a1201bec Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 13 Aug 2024 23:01:38 +0000 Subject: [PATCH 07/20] Update dependency axios to v1.7.4 [SECURITY] --- packages/datagateway-common/package.json | 2 +- packages/datagateway-dataview/package.json | 2 +- packages/datagateway-download/package.json | 2 +- packages/datagateway-search/package.json | 2 +- yarn.lock | 153 ++------------------- 5 files changed, 19 insertions(+), 142 deletions(-) diff --git a/packages/datagateway-common/package.json b/packages/datagateway-common/package.json index 495335337..d05e1f20c 100644 --- a/packages/datagateway-common/package.json +++ b/packages/datagateway-common/package.json @@ -12,7 +12,7 @@ "@emotion/styled": "11.11.0", "@mui/x-date-pickers": "6.11.2", "@types/lodash.debounce": "4.0.6", - "axios": "1.6.1", + "axios": "1.7.4", "connected-react-router": "6.9.1", "date-fns": "2.30.0", "hex-to-rgba": "2.0.1", diff --git a/packages/datagateway-dataview/package.json b/packages/datagateway-dataview/package.json index 57fb99474..968597f81 100644 --- a/packages/datagateway-dataview/package.json +++ b/packages/datagateway-dataview/package.json @@ -19,7 +19,7 @@ "@types/react-router-dom": "5.3.3", "@types/react-virtualized": "9.21.10", "@types/redux-logger": "3.0.8", - "axios": "1.6.1", + "axios": "1.7.4", "connected-react-router": "6.9.1", "custom-event-polyfill": "1.0.7", "datagateway-common": "^2.0.0", diff --git a/packages/datagateway-download/package.json b/packages/datagateway-download/package.json index ae990531e..27fab952d 100644 --- a/packages/datagateway-download/package.json +++ b/packages/datagateway-download/package.json @@ -16,7 +16,7 @@ "@types/react-dom": "17.0.11", "@types/react-router-dom": "5.3.3", "@types/react-virtualized": "9.21.10", - "axios": "1.6.1", + "axios": "1.7.4", "datagateway-common": "^2.0.0", "date-fns": "2.30.0", "date-fns-tz": "2.0.0", diff --git a/packages/datagateway-search/package.json b/packages/datagateway-search/package.json index fe086b12b..9467b0db2 100644 --- a/packages/datagateway-search/package.json +++ b/packages/datagateway-search/package.json @@ -20,7 +20,7 @@ "@types/react-router-dom": "5.3.3", "@types/react-virtualized": "9.21.10", "@types/redux-logger": "3.0.8", - "axios": "1.6.1", + "axios": "1.7.4", "connected-react-router": "6.9.1", "custom-event-polyfill": "1.0.7", "datagateway-common": "^2.0.0", diff --git a/yarn.lock b/yarn.lock index 154a1212a..9ee2f1b55 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1460,7 +1460,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.1, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.16.3, @babel/runtime@npm:^7.17.2, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.6, @babel/runtime@npm:^7.20.7, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.22.6, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.6.2, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": +"@babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.1, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.14.6, @babel/runtime@npm:^7.16.3, @babel/runtime@npm:^7.17.2, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.6, @babel/runtime@npm:^7.20.7, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.22.6, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.6.2, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": version: 7.23.8 resolution: "@babel/runtime@npm:7.23.8" dependencies: @@ -1469,27 +1469,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.14.6": - version: 7.22.6 - resolution: "@babel/runtime@npm:7.22.6" - dependencies: - regenerator-runtime: ^0.13.11 - checksum: e585338287c4514a713babf4fdb8fc2a67adcebab3e7723a739fc62c79cfda875b314c90fd25f827afb150d781af97bc16c85bfdbfa2889f06053879a1ddb597 - languageName: node - linkType: hard - -"@babel/template@npm:^7.18.10, @babel/template@npm:^7.20.7, @babel/template@npm:^7.3.3": - version: 7.20.7 - resolution: "@babel/template@npm:7.20.7" - dependencies: - "@babel/code-frame": ^7.18.6 - "@babel/parser": ^7.20.7 - "@babel/types": ^7.20.7 - checksum: 2eb1a0ab8d415078776bceb3473d07ab746e6bb4c2f6ca46ee70efb284d75c4a32bb0cd6f4f4946dec9711f9c0780e8e5d64b743208deac6f8e9858afadc349e - languageName: node - linkType: hard - -"@babel/template@npm:^7.22.15": +"@babel/template@npm:^7.18.10, @babel/template@npm:^7.20.7, @babel/template@npm:^7.22.15, @babel/template@npm:^7.3.3": version: 7.22.15 resolution: "@babel/template@npm:7.22.15" dependencies: @@ -3016,23 +2996,7 @@ __metadata: languageName: node linkType: hard -"@testing-library/dom@npm:^8.0.0": - version: 8.20.0 - resolution: "@testing-library/dom@npm:8.20.0" - dependencies: - "@babel/code-frame": ^7.10.4 - "@babel/runtime": ^7.12.5 - "@types/aria-query": ^5.0.1 - aria-query: ^5.0.0 - chalk: ^4.1.0 - dom-accessibility-api: ^0.5.9 - lz-string: ^1.4.4 - pretty-format: ^27.0.2 - checksum: 1e599129a2fe91959ce80900a0a4897232b89e2a8e22c1f5950c36d39c97629ea86b4986b60b173b5525a05de33fde1e35836ea597b03de78cc51b122835c6f0 - languageName: node - linkType: hard - -"@testing-library/dom@npm:^8.1.0": +"@testing-library/dom@npm:^8.0.0, @testing-library/dom@npm:^8.1.0": version: 8.20.1 resolution: "@testing-library/dom@npm:8.20.1" dependencies: @@ -4704,14 +4668,14 @@ __metadata: languageName: node linkType: hard -"axios@npm:1.6.1": - version: 1.6.1 - resolution: "axios@npm:1.6.1" +"axios@npm:1.7.4": + version: 1.7.4 + resolution: "axios@npm:1.7.4" dependencies: - follow-redirects: ^1.15.0 + follow-redirects: ^1.15.6 form-data: ^4.0.0 proxy-from-env: ^1.1.0 - checksum: 573f03f59b7487d54551b16f5e155d1d130ad4864ed32d1da93d522b78a57123b34e3bde37f822a65ee297e79f1db840f9ad6514addff50d3cbf5caeed39e8dc + checksum: 0c17039a9acfe6a566fca8431ba5c1b455c83d30ea6157fec68a6722878fcd30f3bd32d172f6bee0c51fe75ca98e6414ddcd968a87b5606b573731629440bfaf languageName: node linkType: hard @@ -4997,26 +4961,6 @@ __metadata: languageName: node linkType: hard -"body-parser@npm:1.20.1": - version: 1.20.1 - resolution: "body-parser@npm:1.20.1" - dependencies: - bytes: 3.1.2 - content-type: ~1.0.4 - debug: 2.6.9 - depd: 2.0.0 - destroy: 1.2.0 - http-errors: 2.0.0 - iconv-lite: 0.4.24 - on-finished: 2.4.1 - qs: 6.11.0 - raw-body: 2.5.1 - type-is: ~1.6.18 - unpipe: 1.0.0 - checksum: f1050dbac3bede6a78f0b87947a8d548ce43f91ccc718a50dd774f3c81f2d8b04693e52acf62659fad23101827dd318da1fb1363444ff9a8482b886a3e4a5266 - languageName: node - linkType: hard - "body-parser@npm:1.20.2": version: 1.20.2 resolution: "body-parser@npm:1.20.2" @@ -5833,13 +5777,6 @@ __metadata: languageName: node linkType: hard -"cookie@npm:0.5.0": - version: 0.5.0 - resolution: "cookie@npm:0.5.0" - checksum: 1f4bd2ca5765f8c9689a7e8954183f5332139eb72b6ff783d8947032ec1fdf43109852c178e21a953a30c0dd42257828185be01b49d1eb1a67fd054ca588a180 - languageName: node - linkType: hard - "cookie@npm:0.6.0": version: 0.6.0 resolution: "cookie@npm:0.6.0" @@ -6367,7 +6304,7 @@ __metadata: "@types/react-virtualized": 9.21.10 "@typescript-eslint/eslint-plugin": 5.62.0 "@typescript-eslint/parser": 5.62.0 - axios: 1.6.1 + axios: 1.7.4 connected-react-router: 6.9.1 date-fns: 2.30.0 eslint: 8.56.0 @@ -6437,7 +6374,7 @@ __metadata: "@types/redux-mock-store": 1.0.3 "@typescript-eslint/eslint-plugin": 5.62.0 "@typescript-eslint/parser": 5.62.0 - axios: 1.6.1 + axios: 1.7.4 blob-polyfill: 7.0.20220408 connected-react-router: 6.9.1 cross-env: 7.0.3 @@ -6509,7 +6446,7 @@ __metadata: "@types/react-virtualized": 9.21.10 "@typescript-eslint/eslint-plugin": 5.62.0 "@typescript-eslint/parser": 5.62.0 - axios: 1.6.1 + axios: 1.7.4 cross-env: 7.0.3 cypress: 13.6.4 cypress-failed-log: 2.10.0 @@ -6578,7 +6515,7 @@ __metadata: "@types/redux-mock-store": 1.0.3 "@typescript-eslint/eslint-plugin": 5.62.0 "@typescript-eslint/parser": 5.62.0 - axios: 1.6.1 + axios: 1.7.4 connected-react-router: 6.9.1 cross-env: 7.0.3 custom-event-polyfill: 1.0.7 @@ -7949,7 +7886,7 @@ __metadata: languageName: node linkType: hard -"express@npm:4.19.2": +"express@npm:4.19.2, express@npm:^4.17.3": version: 4.19.2 resolution: "express@npm:4.19.2" dependencies: @@ -7988,45 +7925,6 @@ __metadata: languageName: node linkType: hard -"express@npm:^4.17.3": - version: 4.18.2 - resolution: "express@npm:4.18.2" - dependencies: - accepts: ~1.3.8 - array-flatten: 1.1.1 - body-parser: 1.20.1 - content-disposition: 0.5.4 - content-type: ~1.0.4 - cookie: 0.5.0 - cookie-signature: 1.0.6 - debug: 2.6.9 - depd: 2.0.0 - encodeurl: ~1.0.2 - escape-html: ~1.0.3 - etag: ~1.8.1 - finalhandler: 1.2.0 - fresh: 0.5.2 - http-errors: 2.0.0 - merge-descriptors: 1.0.1 - methods: ~1.1.2 - on-finished: 2.4.1 - parseurl: ~1.3.3 - path-to-regexp: 0.1.7 - proxy-addr: ~2.0.7 - qs: 6.11.0 - range-parser: ~1.2.1 - safe-buffer: 5.2.1 - send: 0.18.0 - serve-static: 1.15.0 - setprototypeof: 1.2.0 - statuses: 2.0.1 - type-is: ~1.6.18 - utils-merge: 1.0.1 - vary: ~1.1.2 - checksum: 3c4b9b076879442f6b968fe53d85d9f1eeacbb4f4c41e5f16cc36d77ce39a2b0d81b3f250514982110d815b2f7173f5561367f9110fcc541f9371948e8c8b037 - languageName: node - linkType: hard - "extend@npm:~3.0.2": version: 3.0.2 resolution: "extend@npm:3.0.2" @@ -8285,7 +8183,7 @@ __metadata: languageName: node linkType: hard -"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.14.9, follow-redirects@npm:^1.15.0": +"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.14.9, follow-redirects@npm:^1.15.6": version: 1.15.6 resolution: "follow-redirects@npm:1.15.6" peerDependenciesMeta: @@ -11058,15 +10956,6 @@ __metadata: languageName: node linkType: hard -"lz-string@npm:^1.4.4": - version: 1.4.4 - resolution: "lz-string@npm:1.4.4" - bin: - lz-string: bin/bin.js - checksum: 54e31238a61a84d8f664d9860a9fba7310c5b97a52c444f80543069bc084815eff40b8d4474ae1d93992fdf6c252dca37cf27f6adbeb4dbc3df2f3ac773d0e61 - languageName: node - linkType: hard - "lz-string@npm:^1.5.0": version: 1.5.0 resolution: "lz-string@npm:1.5.0" @@ -13299,18 +13188,6 @@ __metadata: languageName: node linkType: hard -"raw-body@npm:2.5.1": - version: 2.5.1 - resolution: "raw-body@npm:2.5.1" - dependencies: - bytes: 3.1.2 - http-errors: 2.0.0 - iconv-lite: 0.4.24 - unpipe: 1.0.0 - checksum: 5362adff1575d691bb3f75998803a0ffed8c64eabeaa06e54b4ada25a0cd1b2ae7f4f5ec46565d1bec337e08b5ac90c76eaa0758de6f72a633f025d754dec29e - languageName: node - linkType: hard - "raw-body@npm:2.5.2": version: 2.5.2 resolution: "raw-body@npm:2.5.2" @@ -13823,7 +13700,7 @@ __metadata: languageName: node linkType: hard -"regenerator-runtime@npm:^0.13.11, regenerator-runtime@npm:^0.13.9": +"regenerator-runtime@npm:^0.13.9": version: 0.13.11 resolution: "regenerator-runtime@npm:0.13.11" checksum: 27481628d22a1c4e3ff551096a683b424242a216fee44685467307f14d58020af1e19660bf2e26064de946bad7eff28950eae9f8209d55723e2d9351e632bbb4 From f2a86e37e3dcf373b87a6316f1f55801f7d343bc Mon Sep 17 00:00:00 2001 From: akintomiwa Date: Thu, 15 Aug 2024 15:39:21 +0000 Subject: [PATCH 08/20] update COMPONENT, test to select debounce value from component 1/2 --- .../src/table/columnFilters/textColumnFilter.component.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/datagateway-common/src/table/columnFilters/textColumnFilter.component.tsx b/packages/datagateway-common/src/table/columnFilters/textColumnFilter.component.tsx index 2fb1f7043..ef931afd8 100644 --- a/packages/datagateway-common/src/table/columnFilters/textColumnFilter.component.tsx +++ b/packages/datagateway-common/src/table/columnFilters/textColumnFilter.component.tsx @@ -24,13 +24,12 @@ const TextColumnFilter = (props: { propValue ? propValue : '' ); const [type, setType] = React.useState(propType ? propType : 'include'); - // Debounce the updating of the column filter by 500 milliseconds. const updateValue = React.useMemo( () => debounce((value: string) => { onChange(value === '' ? null : { value: value, type: type }); - }, 500), + }, DEBOUNCE_DELAY), [onChange, type] ); @@ -129,6 +128,8 @@ const TextColumnFilter = (props: { ); }; +export const DEBOUNCE_DELAY = 500; + export default TextColumnFilter; export const useTextFilter = ( From 51fe1e8eb2cd224a25d57107b0bc1e59248a6417 Mon Sep 17 00:00:00 2001 From: akintomiwa Date: Thu, 15 Aug 2024 15:39:44 +0000 Subject: [PATCH 09/20] update component, TEST to select debounce value from component 2/2 --- .../src/table/columnFilters/textColumnFilter.component.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/datagateway-common/src/table/columnFilters/textColumnFilter.component.test.tsx b/packages/datagateway-common/src/table/columnFilters/textColumnFilter.component.test.tsx index aab432bf7..25fcda5bb 100644 --- a/packages/datagateway-common/src/table/columnFilters/textColumnFilter.component.test.tsx +++ b/packages/datagateway-common/src/table/columnFilters/textColumnFilter.component.test.tsx @@ -2,6 +2,7 @@ import React from 'react'; import TextColumnFilter, { usePrincipalExperimenterFilter, useTextFilter, + DEBOUNCE_DELAY, } from './textColumnFilter.component'; import { act } from 'react-dom/test-utils'; import { usePushFilter, usePushFilters } from '../../api'; @@ -12,7 +13,6 @@ import userEvent from '@testing-library/user-event'; jest.mock('../../api'); jest.useFakeTimers('modern'); -const DEBOUNCE_DELAY = 500; describe('Text filter component', () => { let user: UserEvent; From 7fa24f95bd0a93b7056ad6163eb4fb780ad72d8b Mon Sep 17 00:00:00 2001 From: akintomiwa Date: Fri, 16 Aug 2024 16:41:57 +0000 Subject: [PATCH 10/20] dls datasets, datafiles files - card, table views - set to name --- .../src/views/card/dls/dlsDatasetsCardView.component.tsx | 2 +- .../src/views/table/dls/dlsDatafilesTable.component.tsx | 2 +- .../src/views/table/dls/dlsDatasetsTable.component.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/datagateway-dataview/src/views/card/dls/dlsDatasetsCardView.component.tsx b/packages/datagateway-dataview/src/views/card/dls/dlsDatasetsCardView.component.tsx index e81a08b3e..1d277d349 100644 --- a/packages/datagateway-dataview/src/views/card/dls/dlsDatasetsCardView.component.tsx +++ b/packages/datagateway-dataview/src/views/card/dls/dlsDatasetsCardView.component.tsx @@ -86,6 +86,7 @@ const DLSDatasetsCardView = (props: DLSDatasetsCVProps): React.ReactElement => { view ), filterComponent: textFilter, + defaultSort: 'asc', }), [investigationId, proposalName, t, textFilter, view] ); @@ -118,7 +119,6 @@ const DLSDatasetsCardView = (props: DLSDatasetsCVProps): React.ReactElement => { label: t('datasets.create_time'), dataKey: 'name', filterComponent: dateFilter, - defaultSort: 'desc', }, { icon: CalendarToday, diff --git a/packages/datagateway-dataview/src/views/table/dls/dlsDatafilesTable.component.tsx b/packages/datagateway-dataview/src/views/table/dls/dlsDatafilesTable.component.tsx index 0b916f196..2eb3bf47e 100644 --- a/packages/datagateway-dataview/src/views/table/dls/dlsDatafilesTable.component.tsx +++ b/packages/datagateway-dataview/src/views/table/dls/dlsDatafilesTable.component.tsx @@ -116,6 +116,7 @@ const DLSDatafilesTable = ( label: t('datafiles.name'), dataKey: 'name', filterComponent: textFilter, + defaultSort: 'asc', }, { icon: Explore, @@ -136,7 +137,6 @@ const DLSDatafilesTable = ( label: t('datafiles.create_time'), dataKey: 'name', filterComponent: dateFilter, - defaultSort: 'desc', }, ], [t, dateFilter, textFilter] diff --git a/packages/datagateway-dataview/src/views/table/dls/dlsDatasetsTable.component.tsx b/packages/datagateway-dataview/src/views/table/dls/dlsDatasetsTable.component.tsx index 998493638..76771d328 100644 --- a/packages/datagateway-dataview/src/views/table/dls/dlsDatasetsTable.component.tsx +++ b/packages/datagateway-dataview/src/views/table/dls/dlsDatasetsTable.component.tsx @@ -133,6 +133,7 @@ const DLSDatasetsTable = (props: DLSDatasetsTableProps): React.ReactElement => { 'dls-datasets-table-title' ), filterComponent: textFilter, + defaultSort: 'asc', }, { icon: ConfirmationNumber, @@ -151,7 +152,6 @@ const DLSDatasetsTable = (props: DLSDatasetsTableProps): React.ReactElement => { label: t('datasets.create_time'), dataKey: 'name', filterComponent: dateFilter, - defaultSort: 'desc', }, { icon: CalendarToday, From d60a3c2d01c43be3f8e8c56346cd8abcb46e99ca Mon Sep 17 00:00:00 2001 From: akintomiwa Date: Fri, 16 Aug 2024 16:42:27 +0000 Subject: [PATCH 11/20] dls datasets, datafiles tests - card, table views - set to name --- .../src/views/card/dls/dlsDatasetsCardView.component.test.tsx | 4 ++-- .../src/views/table/dls/dlsDatafilesTable.component.test.tsx | 4 ++-- .../src/views/table/dls/dlsDatasetsTable.component.test.tsx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/datagateway-dataview/src/views/card/dls/dlsDatasetsCardView.component.test.tsx b/packages/datagateway-dataview/src/views/card/dls/dlsDatasetsCardView.component.test.tsx index 103551103..a0724e61b 100644 --- a/packages/datagateway-dataview/src/views/card/dls/dlsDatasetsCardView.component.test.tsx +++ b/packages/datagateway-dataview/src/views/card/dls/dlsDatasetsCardView.component.test.tsx @@ -149,7 +149,7 @@ describe('DLS Datasets - Card View', () => { renderComponent(); expect(history.length).toBe(1); expect(history.location.search).toBe( - `?sort=${encodeURIComponent('{"createTime":"desc"}')}` + `?sort=${encodeURIComponent('{"name":"asc"}')}` ); // check that the data request is sent only once after mounting @@ -169,7 +169,7 @@ describe('DLS Datasets - Card View', () => { ); expect(history.location.search).toBe( - `?sort=${encodeURIComponent('{"name":"asc"}')}` + `?sort=${encodeURIComponent('{"name":"desc"}')}` ); }, 10000); diff --git a/packages/datagateway-dataview/src/views/table/dls/dlsDatafilesTable.component.test.tsx b/packages/datagateway-dataview/src/views/table/dls/dlsDatafilesTable.component.test.tsx index 7ff367e8f..94ad4c795 100644 --- a/packages/datagateway-dataview/src/views/table/dls/dlsDatafilesTable.component.test.tsx +++ b/packages/datagateway-dataview/src/views/table/dls/dlsDatafilesTable.component.test.tsx @@ -228,7 +228,7 @@ describe('DLS datafiles table component', () => { renderComponent(); expect(history.length).toBe(1); expect(history.location.search).toBe( - `?sort=${encodeURIComponent('{"createTime":"desc"}')}` + `?sort=${encodeURIComponent('{"name":"asc"}')}` ); // check that the data request is sent only once after mounting @@ -249,7 +249,7 @@ describe('DLS datafiles table component', () => { expect(history.length).toBe(2); expect(history.location.search).toBe( - `?sort=${encodeURIComponent('{"name":"asc"}')}` + `?sort=${encodeURIComponent('{"name":"desc"}')}` ); }); diff --git a/packages/datagateway-dataview/src/views/table/dls/dlsDatasetsTable.component.test.tsx b/packages/datagateway-dataview/src/views/table/dls/dlsDatasetsTable.component.test.tsx index ca95ea2e7..967b55d9f 100644 --- a/packages/datagateway-dataview/src/views/table/dls/dlsDatasetsTable.component.test.tsx +++ b/packages/datagateway-dataview/src/views/table/dls/dlsDatasetsTable.component.test.tsx @@ -229,7 +229,7 @@ describe('DLS Dataset table component', () => { renderComponent(); expect(history.length).toBe(1); expect(history.location.search).toBe( - `?sort=${encodeURIComponent('{"createTime":"desc"}')}` + `?sort=${encodeURIComponent('{"name":"asc"}')}` ); // check that the data request is sent only once after mounting @@ -250,7 +250,7 @@ describe('DLS Dataset table component', () => { expect(history.length).toBe(2); expect(history.location.search).toBe( - `?sort=${encodeURIComponent('{"name":"asc"}')}` + `?sort=${encodeURIComponent('{"name":"desc"}')}` ); }); From cc54d755337da3d341605a71a37fc1cfc5faac84 Mon Sep 17 00:00:00 2001 From: akintomiwa Date: Fri, 16 Aug 2024 16:43:47 +0000 Subject: [PATCH 12/20] isis datasets, datafiles files - card, table comps - set to name --- .../src/views/card/isis/isisDatasetsCardView.component.tsx | 2 +- .../src/views/table/isis/isisDatafilesTable.component.tsx | 2 +- .../src/views/table/isis/isisDatasetsTable.component.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/datagateway-dataview/src/views/card/isis/isisDatasetsCardView.component.tsx b/packages/datagateway-dataview/src/views/card/isis/isisDatasetsCardView.component.tsx index 8e0dad841..a123d6694 100644 --- a/packages/datagateway-dataview/src/views/card/isis/isisDatasetsCardView.component.tsx +++ b/packages/datagateway-dataview/src/views/card/isis/isisDatasetsCardView.component.tsx @@ -94,6 +94,7 @@ const ISISDatasetsCardView = ( content: (dataset: Dataset) => tableLink(`${location.pathname}/${dataset.id}`, dataset.name, view), filterComponent: textFilter, + defaultSort: 'asc', }), [t, textFilter, location.pathname, view] ); @@ -125,7 +126,6 @@ const ISISDatasetsCardView = ( label: t('datasets.create_time'), dataKey: 'createTime', filterComponent: dateFilter, - defaultSort: 'desc', }, { icon: CalendarToday, diff --git a/packages/datagateway-dataview/src/views/table/isis/isisDatafilesTable.component.tsx b/packages/datagateway-dataview/src/views/table/isis/isisDatafilesTable.component.tsx index 3b1ac1032..8fbd606e1 100644 --- a/packages/datagateway-dataview/src/views/table/isis/isisDatafilesTable.component.tsx +++ b/packages/datagateway-dataview/src/views/table/isis/isisDatafilesTable.component.tsx @@ -132,6 +132,7 @@ const ISISDatafilesTable = ( label: t('datafiles.name'), dataKey: 'name', filterComponent: textFilter, + defaultSort: 'asc', }, { icon: ExploreIcon, @@ -152,7 +153,6 @@ const ISISDatafilesTable = ( label: t('datafiles.modified_time'), dataKey: 'name', filterComponent: dateFilter, - defaultSort: 'desc', }, ], [t, dateFilter, textFilter] diff --git a/packages/datagateway-dataview/src/views/table/isis/isisDatasetsTable.component.tsx b/packages/datagateway-dataview/src/views/table/isis/isisDatasetsTable.component.tsx index 7b20dfdae..15f9e11bd 100644 --- a/packages/datagateway-dataview/src/views/table/isis/isisDatasetsTable.component.tsx +++ b/packages/datagateway-dataview/src/views/table/isis/isisDatasetsTable.component.tsx @@ -142,6 +142,7 @@ const ISISDatasetsTable = ( view ), filterComponent: textFilter, + defaultSort: 'asc', }, { icon: SaveIcon, @@ -156,7 +157,6 @@ const ISISDatasetsTable = ( label: t('datasets.create_time'), dataKey: 'name', filterComponent: dateFilter, - defaultSort: 'desc', }, { icon: CalendarTodayIcon, From 1d2dc2821d5ce30ef302ccb675c681df5bc24510 Mon Sep 17 00:00:00 2001 From: akintomiwa Date: Fri, 16 Aug 2024 16:44:13 +0000 Subject: [PATCH 13/20] isis datasets, datafiles tests - card, table comps - set to name --- .../views/card/isis/isisDatasetsCardView.component.test.tsx | 4 ++-- .../views/table/isis/isisDatafilesTable.component.test.tsx | 4 ++-- .../src/views/table/isis/isisDatasetsTable.component.test.tsx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/datagateway-dataview/src/views/card/isis/isisDatasetsCardView.component.test.tsx b/packages/datagateway-dataview/src/views/card/isis/isisDatasetsCardView.component.test.tsx index 2c8e7e364..4eed59745 100644 --- a/packages/datagateway-dataview/src/views/card/isis/isisDatasetsCardView.component.test.tsx +++ b/packages/datagateway-dataview/src/views/card/isis/isisDatasetsCardView.component.test.tsx @@ -182,7 +182,7 @@ describe('ISIS Datasets - Card View', () => { renderComponent(); expect(history.length).toBe(1); expect(history.location.search).toBe( - `?sort=${encodeURIComponent('{"createTime":"desc"}')}` + `?sort=${encodeURIComponent('{"name":"asc"}')}` ); // check that the data request is sent only once after mounting @@ -202,7 +202,7 @@ describe('ISIS Datasets - Card View', () => { ); expect(history.location.search).toBe( - `?sort=${encodeURIComponent('{"name":"asc"}')}` + `?sort=${encodeURIComponent('{"name":"desc"}')}` ); }); diff --git a/packages/datagateway-dataview/src/views/table/isis/isisDatafilesTable.component.test.tsx b/packages/datagateway-dataview/src/views/table/isis/isisDatafilesTable.component.test.tsx index 0c68b3a33..eface353b 100644 --- a/packages/datagateway-dataview/src/views/table/isis/isisDatafilesTable.component.test.tsx +++ b/packages/datagateway-dataview/src/views/table/isis/isisDatafilesTable.component.test.tsx @@ -262,7 +262,7 @@ describe('ISIS datafiles table component', () => { renderComponent(); expect(history.length).toBe(1); expect(history.location.search).toBe( - `?sort=${encodeURIComponent('{"modTime":"desc"}')}` + `?sort=${encodeURIComponent('{"name":"asc"}')}` ); // check that the data request is sent only once after mounting @@ -281,7 +281,7 @@ describe('ISIS datafiles table component', () => { expect(history.length).toBe(2); expect(history.location.search).toBe( - `?sort=${encodeURIComponent('{"name":"asc"}')}` + `?sort=${encodeURIComponent('{"name":"desc"}')}` ); }); diff --git a/packages/datagateway-dataview/src/views/table/isis/isisDatasetsTable.component.test.tsx b/packages/datagateway-dataview/src/views/table/isis/isisDatasetsTable.component.test.tsx index bc503c5d4..ccb86bbab 100644 --- a/packages/datagateway-dataview/src/views/table/isis/isisDatasetsTable.component.test.tsx +++ b/packages/datagateway-dataview/src/views/table/isis/isisDatasetsTable.component.test.tsx @@ -177,7 +177,7 @@ describe('ISIS Dataset table component', () => { renderComponent(); expect(history.length).toBe(1); expect(history.location.search).toBe( - `?sort=${encodeURIComponent('{"createTime":"desc"}')}` + `?sort=${encodeURIComponent('{"name":"asc"}')}` ); // check that the data request is sent only once after mounting @@ -196,7 +196,7 @@ describe('ISIS Dataset table component', () => { expect(history.length).toBe(2); expect(history.location.search).toBe( - `?sort=${encodeURIComponent('{"name":"asc"}')}` + `?sort=${encodeURIComponent('{"name":"desc"}')}` ); }); From 29633ba9c6be56411cf25d432909d3e4d758e640 Mon Sep 17 00:00:00 2001 From: akintomiwa Date: Fri, 16 Aug 2024 17:40:39 +0000 Subject: [PATCH 14/20] walk back initial erroneous changes to information.datakey --- .../src/views/card/datasetCardView.component.tsx | 2 +- .../src/views/card/dls/dlsDatasetsCardView.component.tsx | 2 +- .../src/views/table/dls/dlsDatafilesTable.component.tsx | 2 +- .../src/views/table/dls/dlsDatasetsTable.component.tsx | 2 +- .../src/views/table/isis/isisDatafilesTable.component.tsx | 2 +- .../src/views/table/isis/isisDatasetsTable.component.tsx | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/datagateway-dataview/src/views/card/datasetCardView.component.tsx b/packages/datagateway-dataview/src/views/card/datasetCardView.component.tsx index 5b457af12..71ede5e86 100644 --- a/packages/datagateway-dataview/src/views/card/datasetCardView.component.tsx +++ b/packages/datagateway-dataview/src/views/card/datasetCardView.component.tsx @@ -91,7 +91,7 @@ const DatasetCardView = (props: DatasetCardViewProps): React.ReactElement => { { icon: CalendarToday, label: t('datasets.create_time'), - dataKey: 'name', + dataKey: 'createTime', filterComponent: dateFilter, }, { diff --git a/packages/datagateway-dataview/src/views/card/dls/dlsDatasetsCardView.component.tsx b/packages/datagateway-dataview/src/views/card/dls/dlsDatasetsCardView.component.tsx index 1d277d349..fa2f5b837 100644 --- a/packages/datagateway-dataview/src/views/card/dls/dlsDatasetsCardView.component.tsx +++ b/packages/datagateway-dataview/src/views/card/dls/dlsDatasetsCardView.component.tsx @@ -117,7 +117,7 @@ const DLSDatasetsCardView = (props: DLSDatasetsCVProps): React.ReactElement => { { icon: CalendarToday, label: t('datasets.create_time'), - dataKey: 'name', + dataKey: 'createTime', filterComponent: dateFilter, }, { diff --git a/packages/datagateway-dataview/src/views/table/dls/dlsDatafilesTable.component.tsx b/packages/datagateway-dataview/src/views/table/dls/dlsDatafilesTable.component.tsx index 2eb3bf47e..ee38b1a0a 100644 --- a/packages/datagateway-dataview/src/views/table/dls/dlsDatafilesTable.component.tsx +++ b/packages/datagateway-dataview/src/views/table/dls/dlsDatafilesTable.component.tsx @@ -135,7 +135,7 @@ const DLSDatafilesTable = ( { icon: CalendarToday, label: t('datafiles.create_time'), - dataKey: 'name', + dataKey: 'createTime', filterComponent: dateFilter, }, ], diff --git a/packages/datagateway-dataview/src/views/table/dls/dlsDatasetsTable.component.tsx b/packages/datagateway-dataview/src/views/table/dls/dlsDatasetsTable.component.tsx index 76771d328..f51e021b6 100644 --- a/packages/datagateway-dataview/src/views/table/dls/dlsDatasetsTable.component.tsx +++ b/packages/datagateway-dataview/src/views/table/dls/dlsDatasetsTable.component.tsx @@ -150,7 +150,7 @@ const DLSDatasetsTable = (props: DLSDatasetsTableProps): React.ReactElement => { { icon: CalendarToday, label: t('datasets.create_time'), - dataKey: 'name', + dataKey: 'createTime', filterComponent: dateFilter, }, { diff --git a/packages/datagateway-dataview/src/views/table/isis/isisDatafilesTable.component.tsx b/packages/datagateway-dataview/src/views/table/isis/isisDatafilesTable.component.tsx index 8fbd606e1..b06c700eb 100644 --- a/packages/datagateway-dataview/src/views/table/isis/isisDatafilesTable.component.tsx +++ b/packages/datagateway-dataview/src/views/table/isis/isisDatafilesTable.component.tsx @@ -151,7 +151,7 @@ const ISISDatafilesTable = ( { icon: CalendarTodayIcon, label: t('datafiles.modified_time'), - dataKey: 'name', + dataKey: 'modTime', filterComponent: dateFilter, }, ], diff --git a/packages/datagateway-dataview/src/views/table/isis/isisDatasetsTable.component.tsx b/packages/datagateway-dataview/src/views/table/isis/isisDatasetsTable.component.tsx index 15f9e11bd..736e2c702 100644 --- a/packages/datagateway-dataview/src/views/table/isis/isisDatasetsTable.component.tsx +++ b/packages/datagateway-dataview/src/views/table/isis/isisDatasetsTable.component.tsx @@ -155,7 +155,7 @@ const ISISDatasetsTable = ( { icon: CalendarTodayIcon, label: t('datasets.create_time'), - dataKey: 'name', + dataKey: 'createTime', filterComponent: dateFilter, }, { From 6c0c3c1b96a3f25e1a58ef6bbe9dde6e5edb0ab3 Mon Sep 17 00:00:00 2001 From: akintomiwa Date: Fri, 23 Aug 2024 10:42:25 +0000 Subject: [PATCH 15/20] ISIS e2e test updates --- .../cypress/e2e/card/isis/datasets.cy.ts | 14 +++++----- .../cypress/e2e/table/isis/datafiles.cy.ts | 18 +++++++------ .../cypress/e2e/table/isis/datasets.cy.ts | 27 ++++++++----------- 3 files changed, 27 insertions(+), 32 deletions(-) diff --git a/packages/datagateway-dataview/cypress/e2e/card/isis/datasets.cy.ts b/packages/datagateway-dataview/cypress/e2e/card/isis/datasets.cy.ts index 77cc8c669..07f5689c4 100644 --- a/packages/datagateway-dataview/cypress/e2e/card/isis/datasets.cy.ts +++ b/packages/datagateway-dataview/cypress/e2e/card/isis/datasets.cy.ts @@ -15,18 +15,18 @@ describe('ISIS - Datasets Cards', () => { cy.get('#datagateway-dataview').should('be.visible'); //Default sort - cy.contains('[role="button"]', 'desc').should('exist'); - cy.get('.MuiTableSortLabel-iconDirectionDesc').should('be.visible'); + cy.contains('[role="button"]', 'asc').should('exist'); + cy.get('.MuiTableSortLabel-iconDirectionAsc').should('be.visible'); }); it('should be able to click a dataset to see its datafiles', () => { cy.get('[data-testid="card"]') .first() - .contains('DATASET 79') + .contains('DATASET 19') .click({ force: true }); cy.location('pathname').should( 'eq', - '/browse/instrument/1/facilityCycle/19/investigation/19/dataset/79' + '/browse/instrument/1/facilityCycle/19/investigation/19/dataset/19' ); }); @@ -62,9 +62,7 @@ describe('ISIS - Datasets Cards', () => { // ascending cy.contains('[role="button"]', 'Name').as('nameSortButton').click(); - cy.wait('@getDatasetsOrder', { - timeout: 10000, - }); + cy.contains('[role="button"]', 'asc').should('exist'); cy.contains('[role="button"]', 'desc').should('not.exist'); cy.get('[data-testid="card"]').first().contains('DATASET 19'); @@ -144,4 +142,4 @@ describe('ISIS - Datasets Cards', () => { ); cy.get('[data-testid="card"]').should('not.exist'); }); -}); +}); \ No newline at end of file diff --git a/packages/datagateway-dataview/cypress/e2e/table/isis/datafiles.cy.ts b/packages/datagateway-dataview/cypress/e2e/table/isis/datafiles.cy.ts index 51ae140a2..26d536378 100644 --- a/packages/datagateway-dataview/cypress/e2e/table/isis/datafiles.cy.ts +++ b/packages/datagateway-dataview/cypress/e2e/table/isis/datafiles.cy.ts @@ -32,8 +32,8 @@ describe('ISIS - Datafiles Table', () => { cy.get('#datagateway-dataview').should('be.visible'); //Default sort - cy.get('[aria-sort="descending"]').should('exist'); - cy.get('.MuiTableSortLabel-iconDirectionDesc').should('be.visible'); + cy.get('[aria-sort="ascending"]').should('exist'); + cy.get('.MuiTableSortLabel-iconDirectionAsc').should('be.visible'); }); it('should not load incorrect URL', () => { @@ -120,6 +120,8 @@ describe('ISIS - Datafiles Table', () => { it('should change icons when sorting on a column', () => { // clear default sort cy.contains('[role="button"]', 'Modified Time').click(); + cy.contains('[role="button"]', 'Modified Time').click(); + cy.contains('[role="button"]', 'Modified Time').click(); cy.get('[data-testid="SortIcon"]').should('have.length', 4); @@ -165,30 +167,30 @@ describe('ISIS - Datafiles Table', () => { cy.get('[aria-label="Show details"]').eq(1).click(); cy.get('#details-panel').should('be.visible'); - cy.get('#details-panel').contains('Datafile 1625').should('be.visible'); + cy.get('#details-panel').contains('Datafile 1149').should('be.visible'); cy.get('[aria-label="Hide details"]').should('exist'); cy.get('[aria-label="Show details"]').first().click(); - cy.get('#details-panel').contains('Datafile 1744').should('be.visible'); - cy.get('#details-panel').contains('Datafile 1625').should('not.exist'); + cy.get('#details-panel').contains('Datafile 1030').should('be.visible'); + cy.get('#details-panel').contains('Datafile 1149').should('not.exist'); cy.get('[aria-label="Hide details"]').should('have.length', 1); cy.get('[aria-controls="datafile-details-panel"]').should('be.visible'); cy.get('#details-panel') - .contains('Doctor involve recently treat') + .contains('See American arm college policy') .should('be.visible'); cy.get('[aria-controls="datafile-parameters-panel"]').should('be.visible'); cy.get('[aria-controls="datafile-parameters-panel"]').click(); cy.get('#parameter-grid').should('be.visible'); - cy.get('#details-panel').contains('PARAMETERTYPE 11').should('be.visible'); + cy.get('#details-panel').contains('PARAMETERTYPE 18').should('be.visible'); cy.get('[aria-label="Hide details"]').first().click(); cy.get('#details-panel').should('not.exist'); cy.get('[aria-label="Hide details"]').should('not.exist'); }); -}); +}); \ No newline at end of file diff --git a/packages/datagateway-dataview/cypress/e2e/table/isis/datasets.cy.ts b/packages/datagateway-dataview/cypress/e2e/table/isis/datasets.cy.ts index cdc2f786d..20e34b576 100644 --- a/packages/datagateway-dataview/cypress/e2e/table/isis/datasets.cy.ts +++ b/packages/datagateway-dataview/cypress/e2e/table/isis/datasets.cy.ts @@ -10,7 +10,7 @@ describe('ISIS - Datasets Table', () => { }); // Check that we have received the size from the API as this will produce // a re-render which can prevent some interactions. - cy.contains('[aria-rowindex="1"] [aria-colindex="4"]', '1.36 GB').should( + cy.contains('[aria-rowindex="1"] [aria-colindex="4"]', '1.47 GB').should( 'exist' ); }); @@ -20,13 +20,12 @@ describe('ISIS - Datasets Table', () => { cy.get('#datagateway-dataview').should('be.visible'); //Default sort - cy.get('[aria-sort="descending"]').should('exist'); - cy.get('.MuiTableSortLabel-iconDirectionDesc').should('be.visible'); + cy.get('[aria-sort="ascending"]').should('exist'); + cy.get('.MuiTableSortLabel-iconDirectionAsc').should('be.visible'); }); it('should not load incorrect URL', () => { cy.visit('/browse/instrument/2/facilityCycle/15/investigation/87/dataset'); - cy.contains('Oops!').should('be.visible'); cy.get('[role="grid"]').should('not.exist'); }); @@ -36,7 +35,7 @@ describe('ISIS - Datasets Table', () => { cy.location('pathname').should( 'eq', - '/browse/instrument/1/facilityCycle/19/investigation/19/dataset/79' + '/browse/instrument/1/facilityCycle/19/investigation/19/dataset/19' ); }); @@ -164,27 +163,23 @@ describe('ISIS - Datasets Table', () => { cy.get('#details-panel').should('be.visible'); cy.get('[aria-label="Hide details"]').should('exist'); - cy.get('#details-panel').contains('DATASET 19').should('be.visible'); + cy.get('#details-panel').contains('DATASET 79').should('be.visible'); cy.get('[aria-label="Show details"]').first().click(); - cy.get('#details-panel').contains('DATASET 79').should('be.visible'); - cy.get('#details-panel').contains('DATASET 19').should('not.exist'); + cy.get('#details-panel').contains('DATASET 19').should('be.visible'); + cy.get('#details-panel').contains('DATASET 79').should('not.exist'); cy.get('[aria-label="Hide details"]').should('have.length', 1); cy.get('#details-panel') - .contains( - 'Example early fight chance culture fill either collection. Someone similar space few should lawyer various quite. Page discuss so music worker lawyer' - ) + .contains('Night out whether mouth participant chance') .should('be.visible'); cy.get('[aria-controls="dataset-type-panel"]').should('be.visible'); cy.get('[aria-controls="dataset-type-panel"]').click(); cy.get('#details-panel') - .contains( - 'Stop prove field onto think suffer measure. Table lose season identify professor happen third simply.' - ) + .contains('Suggest shake effort many last prepare small') .should('be.visible'); cy.get('[aria-label="Hide details"]').first().click(); @@ -199,8 +194,8 @@ describe('ISIS - Datasets Table', () => { cy.location('pathname').should( 'eq', - '/browse/instrument/1/facilityCycle/19/investigation/19/dataset/79/datafile' + '/browse/instrument/1/facilityCycle/19/investigation/19/dataset/19/datafile' ); }); }); -}); +}); \ No newline at end of file From 00f3674b4c1f38e8cb828b85bfe847000b5dcc98 Mon Sep 17 00:00:00 2001 From: akintomiwa Date: Fri, 23 Aug 2024 10:43:00 +0000 Subject: [PATCH 16/20] DLS e2e test updates --- .../cypress/e2e/card/dls/datasets.cy.ts | 19 ++++------ .../cypress/e2e/table/dls/datafiles.cy.ts | 38 +++++++++++++++++-- .../cypress/e2e/table/dls/datasets.cy.ts | 21 +++++----- 3 files changed, 54 insertions(+), 24 deletions(-) diff --git a/packages/datagateway-dataview/cypress/e2e/card/dls/datasets.cy.ts b/packages/datagateway-dataview/cypress/e2e/card/dls/datasets.cy.ts index 6a20d481b..f4c29d9ea 100644 --- a/packages/datagateway-dataview/cypress/e2e/card/dls/datasets.cy.ts +++ b/packages/datagateway-dataview/cypress/e2e/card/dls/datasets.cy.ts @@ -15,18 +15,18 @@ describe('DLS - Datasets Cards', () => { cy.get('#datagateway-dataview').should('be.visible'); //Default sort - cy.contains('[role="button"]', 'desc').should('exist'); - cy.get('.MuiTableSortLabel-iconDirectionDesc').should('be.visible'); + cy.contains('[role="button"]', 'asc').should('exist'); + cy.get('.MuiTableSortLabel-iconDirectionAsc').should('be.visible'); }); it('should be able to click a dataset to see its datafiles', () => { cy.get('[data-testid="card"]') .first() - .contains('DATASET 61') + .contains('DATASET 1') .click({ force: true }); cy.location('pathname').should( 'eq', - '/browse/proposal/INVESTIGATION%201/investigation/1/dataset/61/datafile' + '/browse/proposal/INVESTIGATION%201/investigation/1/dataset/1/datafile' ); }); @@ -38,17 +38,17 @@ describe('DLS - Datasets Cards', () => { cy.get('[data-testid="card"]') .first() .get('[aria-label="card-more-information"]') - .contains('DATASET 61'); + .contains('DATASET 1'); cy.get('[data-testid="card"]') .first() .get('[aria-label="card-more-information"]') - .contains('1.73 GB', { timeout: 10000 }); + .contains('1.39 GB', { timeout: 10000 }); cy.get('#dataset-type-tab').click({ force: true }); cy.get('[data-testid="card"]') .first() .get('[aria-label="card-more-information"]') - .contains('DATASETTYPE 3'); + .contains('DATASETTYPE 2'); }); it('should be able to sort by one field or multiple', () => { @@ -58,9 +58,6 @@ describe('DLS - Datasets Cards', () => { // ascending cy.contains('[role="button"]', 'Name').as('nameSortButton').click(); - cy.wait('@getDatasetsOrder', { - timeout: 10000, - }); cy.contains('[role="button"]', 'asc').should('exist'); cy.contains('[role="button"]', 'desc').should('not.exist'); cy.get('[data-testid="card"]').first().contains('DATASET 1'); @@ -143,4 +140,4 @@ describe('DLS - Datasets Cards', () => { cy.get('[data-testid="card"]').should('not.exist'); }); -}); +}); \ No newline at end of file diff --git a/packages/datagateway-dataview/cypress/e2e/table/dls/datafiles.cy.ts b/packages/datagateway-dataview/cypress/e2e/table/dls/datafiles.cy.ts index 10cd0da45..28caed7af 100644 --- a/packages/datagateway-dataview/cypress/e2e/table/dls/datafiles.cy.ts +++ b/packages/datagateway-dataview/cypress/e2e/table/dls/datafiles.cy.ts @@ -11,24 +11,29 @@ describe('DLS - Datafiles Table', () => { }); }); + it('should load correctly', () => { cy.title().should('equal', 'DataGateway DataView'); cy.get('#datagateway-dataview').should('be.visible'); + //Default sort - cy.get('[aria-sort="descending"]').should('exist'); - cy.get('.MuiTableSortLabel-iconDirectionDesc').should('be.visible'); + cy.get('[aria-sort="ascending"]').should('exist'); + cy.get('.MuiTableSortLabel-iconDirectionAsc').should('be.visible'); }); + it('should not load incorrect URL', () => { cy.visit( '/browse/proposal/INVESTIGATION%201/investigation/2/dataset/25/datafile' ); + cy.contains('Oops!').should('be.visible'); cy.get('[role="grid"]').should('not.exist'); }); + // Lazy loading cannot be tested at the moment as there are only 15 files in this dataset it.skip('should be able to scroll down and load more rows', () => { // Will need to figure out a way to have this be mocked. @@ -37,25 +42,30 @@ describe('DLS - Datafiles Table', () => { cy.get('[aria-rowcount="55"]').should('exist'); }); + it('should be able to sort by all sort directions on single and multiple columns', () => { //Revert the default sort cy.contains('[role="button"]', 'Create Time').as('timeSortButton').click(); cy.wait('@datafilesOrder', { timeout: 10000 }); + // ascending order cy.contains('[role="button"]', 'Location').as('locationSortButton').click(); cy.wait('@datafilesOrder', { timeout: 10000 }); + cy.get('[aria-sort="ascending"]').should('exist'); cy.get('.MuiTableSortLabel-iconDirectionAsc').should('be.visible'); cy.get('[aria-rowindex="1"] [aria-colindex="4"]').contains( '/analysis/unit/bank.tiff' ); + // descending order cy.get('@locationSortButton').click(); cy.wait('@datafilesOrder', { timeout: 10000 }); + cy.get('[aria-sort="descending"]').should('exist'); cy.get('.MuiTableSortLabel-iconDirectionDesc').should( 'not.have.css', @@ -66,20 +76,25 @@ describe('DLS - Datafiles Table', () => { '/to/total/according.tiff' ); + // no order cy.get('@locationSortButton').click(); + cy.get('[aria-sort="ascending"]').should('not.exist'); cy.get('[aria-sort="descending"]').should('not.exist'); cy.get('.MuiTableSortLabel-iconDirectionAsc').should('not.exist'); + cy.get('[data-testid="SortIcon"]').should('have.length', 4); cy.get('[data-testid="ArrowUpwardIcon"]').should('not.exist'); + cy.get('[aria-rowindex="1"] [aria-colindex="4"]').contains( '/time/run/drug.jpeg' ); + // multiple columns (shift click) cy.get('@timeSortButton').click(); cy.wait('@datafilesOrder', { timeout: 10000 }); @@ -90,8 +105,10 @@ describe('DLS - Datafiles Table', () => { cy.get('@nameSortButton').click({ shiftKey: true }); cy.wait('@datafilesOrder', { timeout: 10000 }); + cy.get('[aria-rowindex="1"] [aria-colindex="3"]').contains('Datafile 60'); + // should replace previous sort when clicked without shift cy.contains('[role="button"]', 'Location').click(); cy.get('[aria-sort="ascending"]').should('have.length', 1); @@ -100,58 +117,73 @@ describe('DLS - Datafiles Table', () => { ); }); + it('should change icons when sorting on a column', () => { cy.get('[data-testid="SortIcon"]').should('have.length', 3); + // check icon when clicking on a column cy.contains('[role="button"]', 'Location').click(); cy.get('[data-testid="ArrowDownwardIcon"]').should('have.length', 1); cy.get('.MuiTableSortLabel-iconDirectionAsc').should('exist'); + // check icon when clicking on a column again cy.contains('[role="button"]', 'Location').click(); cy.get('[data-testid="ArrowDownwardIcon"]').should('have.length', 1); cy.get('.MuiTableSortLabel-iconDirectionAsc').should('not.exist'); + // check icon when hovering over a column cy.contains('[role="button"]', 'Name').trigger('mouseover'); cy.get('[data-testid="ArrowUpwardIcon"]').should('have.length', 1); cy.get('[data-testid="ArrowDownwardIcon"]').should('have.length', 1); + // check icons when shift is held cy.get('.App').trigger('keydown', { key: 'Shift' }); cy.get('[data-testid="AddIcon"]').should('have.length', 2); }); + it('should be able to filter with both text & date filters on multiple columns', () => { // test text filter cy.get('input[aria-label="Filter by Location"]').type('unit'); + cy.get('[aria-rowcount="1"]').should('exist'); cy.get('[aria-rowindex="1"] [aria-colindex="3"]').contains('Datafile 1369'); + // test date filter cy.get('input[aria-label="Create Time filter to"]').type('2019-01-01'); + cy.get('[aria-rowcount="0"]').should('exist'); }); + it('should be able to view details', () => { cy.get('[aria-label="Show details"]').eq(1).click(); + cy.get('#details-panel').should('be.visible'); cy.get('[aria-label="Hide details"]').should('exist'); cy.get('#details-panel').contains('Datafile 1607').should('be.visible'); + cy.get('[aria-label="Show details"]').first().click(); + cy.get('#details-panel').contains('Datafile 1726').should('be.visible'); cy.get('#details-panel').contains('Datafile 1607').should('not.exist'); cy.get('[aria-label="Hide details"]').should('have.length', 1); + cy.get('[aria-label="Hide details"]').first().click(); + cy.get('#details-panel').should('not.exist'); cy.get('[aria-label="Hide details"]').should('not.exist'); }); -}); +}); \ No newline at end of file diff --git a/packages/datagateway-dataview/cypress/e2e/table/dls/datasets.cy.ts b/packages/datagateway-dataview/cypress/e2e/table/dls/datasets.cy.ts index 5525fcec1..378a58a05 100644 --- a/packages/datagateway-dataview/cypress/e2e/table/dls/datasets.cy.ts +++ b/packages/datagateway-dataview/cypress/e2e/table/dls/datasets.cy.ts @@ -21,8 +21,8 @@ describe('DLS - Datasets Table', () => { cy.get('#datagateway-dataview').should('be.visible'); //Default sort - cy.get('[aria-sort="descending"]').should('exist'); - cy.get('.MuiTableSortLabel-iconDirectionDesc').should('be.visible'); + cy.get('[aria-sort="ascending"]').should('exist'); + cy.get('.MuiTableSortLabel-iconDirectionAsc').should('be.visible'); }); it('should not load incorrect URL', () => { @@ -37,7 +37,7 @@ describe('DLS - Datasets Table', () => { cy.location('pathname').should( 'eq', - '/browse/proposal/INVESTIGATION%201/investigation/1/dataset/61/datafile' + '/browse/proposal/INVESTIGATION%201/investigation/1/dataset/1/datafile' ); }); @@ -102,7 +102,8 @@ describe('DLS - Datasets Table', () => { }); it('should change icons when sorting on a column', () => { - // clear the default sort + cy.contains('[role="button"]', 'Create Time').click(); + cy.contains('[role="button"]', 'Create Time').click(); cy.contains('[role="button"]', 'Create Time').click(); cy.get('[data-testid="SortIcon"]').should('have.length', 5); @@ -145,21 +146,21 @@ describe('DLS - Datasets Table', () => { cy.get('#details-panel').should('be.visible'); cy.get('[aria-label="Hide details"]').should('exist'); - cy.get('#details-panel').contains('DATASET 1').should('be.visible'); + cy.get('#details-panel').contains('DATASET 61').should('be.visible'); cy.get('[aria-label="Show details"]').first().click(); - cy.get('#details-panel').contains('DATASET 61').should('be.visible'); - cy.get('#details-panel').contains('DATASET 1').should('not.exist'); + cy.get('#details-panel').contains('DATASET 1').should('be.visible'); + cy.get('#details-panel').contains('DATASET 61').should('not.exist'); cy.get('[aria-label="Hide details"]').should('have.length', 1); cy.get('#details-panel') - .contains('Home down your nice amount successful') + .contains('Suggest shake effort many last prepare small') .should('be.visible'); cy.get('[aria-controls="dataset-type-panel"]').click(); cy.get('#dataset-type-panel').should('not.have.attr', 'hidden'); - cy.get('#details-panel').contains('DATASETTYPE 3'); + cy.get('#details-panel').contains('DATASETTYPE 2'); cy.get('[aria-label="Hide details"]').first().click(); @@ -167,4 +168,4 @@ describe('DLS - Datasets Table', () => { cy.get('[aria-label="Hide details"]').should('not.exist'); }); }); -}); +}); \ No newline at end of file From 078484a79e283efa7a37bb91d11ee62b73c4e00a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 30 Aug 2024 11:05:34 +0000 Subject: [PATCH 17/20] Bump webpack from 5.76.1 to 5.94.0 Bumps [webpack](https://github.com/webpack/webpack) from 5.76.1 to 5.94.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v5.76.1...v5.94.0) --- updated-dependencies: - dependency-name: webpack dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 448 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 305 insertions(+), 143 deletions(-) diff --git a/yarn.lock b/yarn.lock index 154a1212a..e50a2c8c1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2361,6 +2361,17 @@ __metadata: languageName: node linkType: hard +"@jridgewell/gen-mapping@npm:^0.3.5": + version: 0.3.5 + resolution: "@jridgewell/gen-mapping@npm:0.3.5" + dependencies: + "@jridgewell/set-array": ^1.2.1 + "@jridgewell/sourcemap-codec": ^1.4.10 + "@jridgewell/trace-mapping": ^0.3.24 + checksum: ff7a1764ebd76a5e129c8890aa3e2f46045109dabde62b0b6c6a250152227647178ff2069ea234753a690d8f3c4ac8b5e7b267bbee272bffb7f3b0a370ab6e52 + languageName: node + linkType: hard + "@jridgewell/resolve-uri@npm:^3.0.3, @jridgewell/resolve-uri@npm:^3.1.0": version: 3.1.1 resolution: "@jridgewell/resolve-uri@npm:3.1.1" @@ -2375,6 +2386,13 @@ __metadata: languageName: node linkType: hard +"@jridgewell/set-array@npm:^1.2.1": + version: 1.2.1 + resolution: "@jridgewell/set-array@npm:1.2.1" + checksum: 832e513a85a588f8ed4f27d1279420d8547743cc37fcad5a5a76fc74bb895b013dfe614d0eed9cb860048e6546b798f8f2652020b4b2ba0561b05caa8c654b10 + languageName: node + linkType: hard + "@jridgewell/source-map@npm:^0.3.2": version: 0.3.2 resolution: "@jridgewell/source-map@npm:0.3.2" @@ -2385,6 +2403,16 @@ __metadata: languageName: node linkType: hard +"@jridgewell/source-map@npm:^0.3.3": + version: 0.3.6 + resolution: "@jridgewell/source-map@npm:0.3.6" + dependencies: + "@jridgewell/gen-mapping": ^0.3.5 + "@jridgewell/trace-mapping": ^0.3.25 + checksum: c9dc7d899397df95e3c9ec287b93c0b56f8e4453cd20743e2b9c8e779b1949bc3cccf6c01bb302779e46560eb45f62ea38d19fedd25370d814734268450a9f30 + languageName: node + linkType: hard + "@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14": version: 1.4.15 resolution: "@jridgewell/sourcemap-codec@npm:1.4.15" @@ -2412,6 +2440,16 @@ __metadata: languageName: node linkType: hard +"@jridgewell/trace-mapping@npm:^0.3.20, @jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": + version: 0.3.25 + resolution: "@jridgewell/trace-mapping@npm:0.3.25" + dependencies: + "@jridgewell/resolve-uri": ^3.1.0 + "@jridgewell/sourcemap-codec": ^1.4.14 + checksum: 9d3c40d225e139987b50c48988f8717a54a8c994d8a948ee42e1412e08988761d0754d7d10b803061cc3aebf35f92a5dbbab493bd0e1a9ef9e89a2130e83ba34 + languageName: node + linkType: hard + "@leichtgewicht/ip-codec@npm:^2.0.1": version: 2.0.4 resolution: "@leichtgewicht/ip-codec@npm:2.0.4" @@ -3261,17 +3299,7 @@ __metadata: languageName: node linkType: hard -"@types/eslint-scope@npm:^3.7.3": - version: 3.7.4 - resolution: "@types/eslint-scope@npm:3.7.4" - dependencies: - "@types/eslint": "*" - "@types/estree": "*" - checksum: ea6a9363e92f301cd3888194469f9ec9d0021fe0a397a97a6dd689e7545c75de0bd2153dfb13d3ab532853a278b6572c6f678ce846980669e41029d205653460 - languageName: node - linkType: hard - -"@types/eslint@npm:*, @types/eslint@npm:^7.29.0 || ^8.4.1": +"@types/eslint@npm:^7.29.0 || ^8.4.1": version: 8.4.10 resolution: "@types/eslint@npm:8.4.10" dependencies: @@ -3295,10 +3323,10 @@ __metadata: languageName: node linkType: hard -"@types/estree@npm:^0.0.51": - version: 0.0.51 - resolution: "@types/estree@npm:0.0.51" - checksum: e56a3bcf759fd9185e992e7fdb3c6a5f81e8ff120e871641607581fb3728d16c811702a7d40fa5f869b7f7b4437ab6a87eb8d98ffafeee51e85bbe955932a189 +"@types/estree@npm:^1.0.5": + version: 1.0.5 + resolution: "@types/estree@npm:1.0.5" + checksum: dd8b5bed28e6213b7acd0fb665a84e693554d850b0df423ac8076cc3ad5823a6bc26b0251d080bdc545af83179ede51dd3f6fa78cad2c46ed1f29624ddf3e41a languageName: node linkType: hard @@ -3970,154 +3998,154 @@ __metadata: languageName: node linkType: hard -"@webassemblyjs/ast@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/ast@npm:1.11.1" +"@webassemblyjs/ast@npm:1.12.1, @webassemblyjs/ast@npm:^1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/ast@npm:1.12.1" dependencies: - "@webassemblyjs/helper-numbers": 1.11.1 - "@webassemblyjs/helper-wasm-bytecode": 1.11.1 - checksum: 1eee1534adebeece635362f8e834ae03e389281972611408d64be7895fc49f48f98fddbbb5339bf8a72cb101bcb066e8bca3ca1bf1ef47dadf89def0395a8d87 + "@webassemblyjs/helper-numbers": 1.11.6 + "@webassemblyjs/helper-wasm-bytecode": 1.11.6 + checksum: 31bcc64147236bd7b1b6d29d1f419c1f5845c785e1e42dc9e3f8ca2e05a029e9393a271b84f3a5bff2a32d35f51ff59e2181a6e5f953fe88576acd6750506202 languageName: node linkType: hard -"@webassemblyjs/floating-point-hex-parser@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/floating-point-hex-parser@npm:1.11.1" - checksum: b8efc6fa08e4787b7f8e682182d84dfdf8da9d9c77cae5d293818bc4a55c1f419a87fa265ab85252b3e6c1fd323d799efea68d825d341a7c365c64bc14750e97 +"@webassemblyjs/floating-point-hex-parser@npm:1.11.6": + version: 1.11.6 + resolution: "@webassemblyjs/floating-point-hex-parser@npm:1.11.6" + checksum: 29b08758841fd8b299c7152eda36b9eb4921e9c584eb4594437b5cd90ed6b920523606eae7316175f89c20628da14326801090167cc7fbffc77af448ac84b7e2 languageName: node linkType: hard -"@webassemblyjs/helper-api-error@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/helper-api-error@npm:1.11.1" - checksum: 0792813f0ed4a0e5ee0750e8b5d0c631f08e927f4bdfdd9fe9105dc410c786850b8c61bff7f9f515fdfb149903bec3c976a1310573a4c6866a94d49bc7271959 +"@webassemblyjs/helper-api-error@npm:1.11.6": + version: 1.11.6 + resolution: "@webassemblyjs/helper-api-error@npm:1.11.6" + checksum: e8563df85161096343008f9161adb138a6e8f3c2cc338d6a36011aa55eabb32f2fd138ffe63bc278d009ada001cc41d263dadd1c0be01be6c2ed99076103689f languageName: node linkType: hard -"@webassemblyjs/helper-buffer@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/helper-buffer@npm:1.11.1" - checksum: a337ee44b45590c3a30db5a8b7b68a717526cf967ada9f10253995294dbd70a58b2da2165222e0b9830cd4fc6e4c833bf441a721128d1fe2e9a7ab26b36003ce +"@webassemblyjs/helper-buffer@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/helper-buffer@npm:1.12.1" + checksum: c3ffb723024130308db608e86e2bdccd4868bbb62dffb0a9a1530606496f79c87f8565bd8e02805ce64912b71f1a70ee5fb00307258b0c082c3abf961d097eca languageName: node linkType: hard -"@webassemblyjs/helper-numbers@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/helper-numbers@npm:1.11.1" +"@webassemblyjs/helper-numbers@npm:1.11.6": + version: 1.11.6 + resolution: "@webassemblyjs/helper-numbers@npm:1.11.6" dependencies: - "@webassemblyjs/floating-point-hex-parser": 1.11.1 - "@webassemblyjs/helper-api-error": 1.11.1 + "@webassemblyjs/floating-point-hex-parser": 1.11.6 + "@webassemblyjs/helper-api-error": 1.11.6 "@xtuc/long": 4.2.2 - checksum: 44d2905dac2f14d1e9b5765cf1063a0fa3d57295c6d8930f6c59a36462afecc6e763e8a110b97b342a0f13376166c5d41aa928e6ced92e2f06b071fd0db59d3a + checksum: f4b562fa219f84368528339e0f8d273ad44e047a07641ffcaaec6f93e5b76fd86490a009aa91a294584e1436d74b0a01fa9fde45e333a4c657b58168b04da424 languageName: node linkType: hard -"@webassemblyjs/helper-wasm-bytecode@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/helper-wasm-bytecode@npm:1.11.1" - checksum: eac400113127832c88f5826bcc3ad1c0db9b3dbd4c51a723cfdb16af6bfcbceb608170fdaac0ab7731a7e18b291be7af68a47fcdb41cfe0260c10857e7413d97 +"@webassemblyjs/helper-wasm-bytecode@npm:1.11.6": + version: 1.11.6 + resolution: "@webassemblyjs/helper-wasm-bytecode@npm:1.11.6" + checksum: 3535ef4f1fba38de3475e383b3980f4bbf3de72bbb631c2b6584c7df45be4eccd62c6ff48b5edd3f1bcff275cfd605a37679ec199fc91fd0a7705d7f1e3972dc languageName: node linkType: hard -"@webassemblyjs/helper-wasm-section@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/helper-wasm-section@npm:1.11.1" +"@webassemblyjs/helper-wasm-section@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/helper-wasm-section@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.1 - "@webassemblyjs/helper-buffer": 1.11.1 - "@webassemblyjs/helper-wasm-bytecode": 1.11.1 - "@webassemblyjs/wasm-gen": 1.11.1 - checksum: 617696cfe8ecaf0532763162aaf748eb69096fb27950219bb87686c6b2e66e11cd0614d95d319d0ab1904bc14ebe4e29068b12c3e7c5e020281379741fe4bedf + "@webassemblyjs/ast": 1.12.1 + "@webassemblyjs/helper-buffer": 1.12.1 + "@webassemblyjs/helper-wasm-bytecode": 1.11.6 + "@webassemblyjs/wasm-gen": 1.12.1 + checksum: c19810cdd2c90ff574139b6d8c0dda254d42d168a9e5b3d353d1bc085f1d7164ccd1b3c05592a45a939c47f7e403dc8d03572bb686642f06a3d02932f6f0bc8f languageName: node linkType: hard -"@webassemblyjs/ieee754@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/ieee754@npm:1.11.1" +"@webassemblyjs/ieee754@npm:1.11.6": + version: 1.11.6 + resolution: "@webassemblyjs/ieee754@npm:1.11.6" dependencies: "@xtuc/ieee754": ^1.2.0 - checksum: 23a0ac02a50f244471631802798a816524df17e56b1ef929f0c73e3cde70eaf105a24130105c60aff9d64a24ce3b640dad443d6f86e5967f922943a7115022ec + checksum: 13574b8e41f6ca39b700e292d7edf102577db5650fe8add7066a320aa4b7a7c09a5056feccac7a74eb68c10dea9546d4461412af351f13f6b24b5f32379b49de languageName: node linkType: hard -"@webassemblyjs/leb128@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/leb128@npm:1.11.1" +"@webassemblyjs/leb128@npm:1.11.6": + version: 1.11.6 + resolution: "@webassemblyjs/leb128@npm:1.11.6" dependencies: "@xtuc/long": 4.2.2 - checksum: 33ccc4ade2f24de07bf31690844d0b1ad224304ee2062b0e464a610b0209c79e0b3009ac190efe0e6bd568b0d1578d7c3047fc1f9d0197c92fc061f56224ff4a + checksum: 7ea942dc9777d4b18a5ebfa3a937b30ae9e1d2ce1fee637583ed7f376334dd1d4274f813d2e250056cca803e0952def4b954913f1a3c9068bcd4ab4ee5143bf0 languageName: node linkType: hard -"@webassemblyjs/utf8@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/utf8@npm:1.11.1" - checksum: 972c5cfc769d7af79313a6bfb96517253a270a4bf0c33ba486aa43cac43917184fb35e51dfc9e6b5601548cd5931479a42e42c89a13bb591ffabebf30c8a6a0b +"@webassemblyjs/utf8@npm:1.11.6": + version: 1.11.6 + resolution: "@webassemblyjs/utf8@npm:1.11.6" + checksum: 807fe5b5ce10c390cfdd93e0fb92abda8aebabb5199980681e7c3743ee3306a75729bcd1e56a3903980e96c885ee53ef901fcbaac8efdfa480f9c0dae1d08713 languageName: node linkType: hard -"@webassemblyjs/wasm-edit@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/wasm-edit@npm:1.11.1" +"@webassemblyjs/wasm-edit@npm:^1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wasm-edit@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.1 - "@webassemblyjs/helper-buffer": 1.11.1 - "@webassemblyjs/helper-wasm-bytecode": 1.11.1 - "@webassemblyjs/helper-wasm-section": 1.11.1 - "@webassemblyjs/wasm-gen": 1.11.1 - "@webassemblyjs/wasm-opt": 1.11.1 - "@webassemblyjs/wasm-parser": 1.11.1 - "@webassemblyjs/wast-printer": 1.11.1 - checksum: 6d7d9efaec1227e7ef7585a5d7ff0be5f329f7c1c6b6c0e906b18ed2e9a28792a5635e450aca2d136770d0207225f204eff70a4b8fd879d3ac79e1dcc26dbeb9 + "@webassemblyjs/ast": 1.12.1 + "@webassemblyjs/helper-buffer": 1.12.1 + "@webassemblyjs/helper-wasm-bytecode": 1.11.6 + "@webassemblyjs/helper-wasm-section": 1.12.1 + "@webassemblyjs/wasm-gen": 1.12.1 + "@webassemblyjs/wasm-opt": 1.12.1 + "@webassemblyjs/wasm-parser": 1.12.1 + "@webassemblyjs/wast-printer": 1.12.1 + checksum: ae23642303f030af888d30c4ef37b08dfec7eab6851a9575a616e65d1219f880d9223913a39056dd654e49049d76e97555b285d1f7e56935047abf578cce0692 languageName: node linkType: hard -"@webassemblyjs/wasm-gen@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/wasm-gen@npm:1.11.1" +"@webassemblyjs/wasm-gen@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wasm-gen@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.1 - "@webassemblyjs/helper-wasm-bytecode": 1.11.1 - "@webassemblyjs/ieee754": 1.11.1 - "@webassemblyjs/leb128": 1.11.1 - "@webassemblyjs/utf8": 1.11.1 - checksum: 1f6921e640293bf99fb16b21e09acb59b340a79f986c8f979853a0ae9f0b58557534b81e02ea2b4ef11e929d946708533fd0693c7f3712924128fdafd6465f5b + "@webassemblyjs/ast": 1.12.1 + "@webassemblyjs/helper-wasm-bytecode": 1.11.6 + "@webassemblyjs/ieee754": 1.11.6 + "@webassemblyjs/leb128": 1.11.6 + "@webassemblyjs/utf8": 1.11.6 + checksum: 5787626bb7f0b033044471ddd00ce0c9fe1ee4584e8b73e232051e3a4c99ba1a102700d75337151c8b6055bae77eefa4548960c610a5e4a504e356bd872138ff languageName: node linkType: hard -"@webassemblyjs/wasm-opt@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/wasm-opt@npm:1.11.1" +"@webassemblyjs/wasm-opt@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wasm-opt@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.1 - "@webassemblyjs/helper-buffer": 1.11.1 - "@webassemblyjs/wasm-gen": 1.11.1 - "@webassemblyjs/wasm-parser": 1.11.1 - checksum: 21586883a20009e2b20feb67bdc451bbc6942252e038aae4c3a08e6f67b6bae0f5f88f20bfc7bd0452db5000bacaf5ab42b98cf9aa034a6c70e9fc616142e1db + "@webassemblyjs/ast": 1.12.1 + "@webassemblyjs/helper-buffer": 1.12.1 + "@webassemblyjs/wasm-gen": 1.12.1 + "@webassemblyjs/wasm-parser": 1.12.1 + checksum: 0e8fa8a0645304a1e18ff40d3db5a2e9233ebaa169b19fcc651d6fc9fe2cac0ce092ddee927318015ae735d9cd9c5d97c0cafb6a51dcd2932ac73587b62df991 languageName: node linkType: hard -"@webassemblyjs/wasm-parser@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/wasm-parser@npm:1.11.1" +"@webassemblyjs/wasm-parser@npm:1.12.1, @webassemblyjs/wasm-parser@npm:^1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wasm-parser@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.1 - "@webassemblyjs/helper-api-error": 1.11.1 - "@webassemblyjs/helper-wasm-bytecode": 1.11.1 - "@webassemblyjs/ieee754": 1.11.1 - "@webassemblyjs/leb128": 1.11.1 - "@webassemblyjs/utf8": 1.11.1 - checksum: 1521644065c360e7b27fad9f4bb2df1802d134dd62937fa1f601a1975cde56bc31a57b6e26408b9ee0228626ff3ba1131ae6f74ffb7d718415b6528c5a6dbfc2 + "@webassemblyjs/ast": 1.12.1 + "@webassemblyjs/helper-api-error": 1.11.6 + "@webassemblyjs/helper-wasm-bytecode": 1.11.6 + "@webassemblyjs/ieee754": 1.11.6 + "@webassemblyjs/leb128": 1.11.6 + "@webassemblyjs/utf8": 1.11.6 + checksum: 176015de3551ac068cd4505d837414f258d9ade7442bd71efb1232fa26c9f6d7d4e11a5c816caeed389943f409af7ebff6899289a992d7a70343cb47009d21a8 languageName: node linkType: hard -"@webassemblyjs/wast-printer@npm:1.11.1": - version: 1.11.1 - resolution: "@webassemblyjs/wast-printer@npm:1.11.1" +"@webassemblyjs/wast-printer@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wast-printer@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.1 + "@webassemblyjs/ast": 1.12.1 "@xtuc/long": 4.2.2 - checksum: f15ae4c2441b979a3b4fce78f3d83472fb22350c6dc3fd34bfe7c3da108e0b2360718734d961bba20e7716cb8578e964b870da55b035e209e50ec9db0378a3f7 + checksum: 2974b5dda8d769145ba0efd886ea94a601e61fb37114c14f9a9a7606afc23456799af652ac3052f284909bd42edc3665a76bc9b50f95f0794c053a8a1757b713 languageName: node linkType: hard @@ -4176,12 +4204,12 @@ __metadata: languageName: node linkType: hard -"acorn-import-assertions@npm:^1.7.6": - version: 1.8.0 - resolution: "acorn-import-assertions@npm:1.8.0" +"acorn-import-attributes@npm:^1.9.5": + version: 1.9.5 + resolution: "acorn-import-attributes@npm:1.9.5" peerDependencies: acorn: ^8 - checksum: 5c4cf7c850102ba7ae0eeae0deb40fb3158c8ca5ff15c0bca43b5c47e307a1de3d8ef761788f881343680ea374631ae9e9615ba8876fee5268dbe068c98bcba6 + checksum: 1c0c49b6a244503964ae46ae850baccf306e84caf99bc2010ed6103c69a423987b07b520a6c619f075d215388bd4923eccac995886a54309eda049ab78a4be95 languageName: node linkType: hard @@ -4237,6 +4265,15 @@ __metadata: languageName: node linkType: hard +"acorn@npm:^8.8.2": + version: 8.12.1 + resolution: "acorn@npm:8.12.1" + bin: + acorn: bin/acorn + checksum: 677880034aee5bdf7434cc2d25b641d7bedb0b5ef47868a78dadabedccf58e1c5457526d9d8249cd253f2df087e081c3fe7d903b448d8e19e5131a3065b83c07 + languageName: node + linkType: hard + "address@npm:^1.0.1, address@npm:^1.1.2": version: 1.2.2 resolution: "address@npm:1.2.2" @@ -5130,7 +5167,7 @@ __metadata: languageName: node linkType: hard -"browserslist@npm:^4.0.0, browserslist@npm:^4.14.5, browserslist@npm:^4.16.6, browserslist@npm:^4.18.1, browserslist@npm:^4.21.3, browserslist@npm:^4.21.4": +"browserslist@npm:^4.0.0, browserslist@npm:^4.16.6, browserslist@npm:^4.18.1, browserslist@npm:^4.21.3, browserslist@npm:^4.21.4": version: 4.21.4 resolution: "browserslist@npm:4.21.4" dependencies: @@ -5144,6 +5181,20 @@ __metadata: languageName: node linkType: hard +"browserslist@npm:^4.21.10": + version: 4.23.3 + resolution: "browserslist@npm:4.23.3" + dependencies: + caniuse-lite: ^1.0.30001646 + electron-to-chromium: ^1.5.4 + node-releases: ^2.0.18 + update-browserslist-db: ^1.1.0 + bin: + browserslist: cli.js + checksum: 7906064f9970aeb941310b2fcb8b4ace4a1b50aa657c986677c6f1553a8cabcc94ee9c5922f715baffbedaa0e6cf0831b6fed7b059dde6873a4bfadcbe069c7e + languageName: node + linkType: hard + "bser@npm:2.1.1": version: 2.1.1 resolution: "bser@npm:2.1.1" @@ -5305,6 +5356,13 @@ __metadata: languageName: node linkType: hard +"caniuse-lite@npm:^1.0.30001646": + version: 1.0.30001655 + resolution: "caniuse-lite@npm:1.0.30001655" + checksum: 3739c8f6d0fb55cff3c631d28c4fdafc81ab28756ce17a373428042c06f84a5877288d89fbe41be5ac494dd5092dca38ab91c9304e81935b9f2938419d2c23b3 + languageName: node + linkType: hard + "case-sensitive-paths-webpack-plugin@npm:^2.4.0": version: 2.4.0 resolution: "case-sensitive-paths-webpack-plugin@npm:2.4.0" @@ -7121,6 +7179,13 @@ __metadata: languageName: node linkType: hard +"electron-to-chromium@npm:^1.5.4": + version: 1.5.13 + resolution: "electron-to-chromium@npm:1.5.13" + checksum: f18ac84dd3bf9a200654a6a9292b9ec4bced0cf9bd26cec9941b775f4470c581c9d043e70b37a124d9752dcc0f47fc96613d52b2defd8e59632852730cb418b9 + languageName: node + linkType: hard + "emittery@npm:^0.10.2": version: 0.10.2 resolution: "emittery@npm:0.10.2" @@ -7181,13 +7246,13 @@ __metadata: languageName: node linkType: hard -"enhanced-resolve@npm:^5.10.0": - version: 5.12.0 - resolution: "enhanced-resolve@npm:5.12.0" +"enhanced-resolve@npm:^5.17.1": + version: 5.17.1 + resolution: "enhanced-resolve@npm:5.17.1" dependencies: graceful-fs: ^4.2.4 tapable: ^2.2.0 - checksum: bf3f787facaf4ce3439bef59d148646344e372bef5557f0d37ea8aa02c51f50a925cd1f07b8d338f18992c29f544ec235a8c64bcdb56030196c48832a5494174 + checksum: 4bc38cf1cea96456f97503db7280394177d1bc46f8f87c267297d04f795ac5efa81e48115a2f5b6273c781027b5b6bfc5f62b54df629e4d25fa7001a86624f59 languageName: node linkType: hard @@ -7304,10 +7369,10 @@ __metadata: languageName: node linkType: hard -"es-module-lexer@npm:^0.9.0": - version: 0.9.3 - resolution: "es-module-lexer@npm:0.9.3" - checksum: 84bbab23c396281db2c906c766af58b1ae2a1a2599844a504df10b9e8dc77ec800b3211fdaa133ff700f5703d791198807bba25d9667392d27a5e9feda344da8 +"es-module-lexer@npm:^1.2.1": + version: 1.5.4 + resolution: "es-module-lexer@npm:1.5.4" + checksum: a0cf04fb92d052647ac7d818d1913b98d3d3d0f5b9d88f0eafb993436e4c3e2c958599db68839d57f2dfa281fdf0f60e18d448eb78fc292c33c0f25635b6854f languageName: node linkType: hard @@ -7349,6 +7414,13 @@ __metadata: languageName: node linkType: hard +"escalade@npm:^3.1.2": + version: 3.2.0 + resolution: "escalade@npm:3.2.0" + checksum: 47b029c83de01b0d17ad99ed766347b974b0d628e848de404018f3abee728e987da0d2d370ad4574aa3d5b5bfc368754fd085d69a30f8e75903486ec4b5b709e + languageName: node + linkType: hard + "escape-html@npm:~1.0.3": version: 1.0.3 resolution: "escape-html@npm:1.0.3" @@ -8729,6 +8801,13 @@ __metadata: languageName: node linkType: hard +"graceful-fs@npm:^4.2.11": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: ac85f94da92d8eb6b7f5a8b20ce65e43d66761c55ce85ac96df6865308390da45a8d3f0296dd3a663de65d30ba497bd46c696cc1e248c72b13d6d567138a4fc7 + languageName: node + linkType: hard + "graphemer@npm:^1.4.0": version: 1.4.0 resolution: "graphemer@npm:1.4.0" @@ -11578,6 +11657,13 @@ __metadata: languageName: node linkType: hard +"node-releases@npm:^2.0.18": + version: 2.0.18 + resolution: "node-releases@npm:2.0.18" + checksum: ef55a3d853e1269a6d6279b7692cd6ff3e40bc74947945101138745bfdc9a5edabfe72cb19a31a8e45752e1910c4c65c77d931866af6357f242b172b7283f5b3 + languageName: node + linkType: hard + "node-releases@npm:^2.0.6": version: 2.0.8 resolution: "node-releases@npm:2.0.8" @@ -12122,6 +12208,13 @@ __metadata: languageName: node linkType: hard +"picocolors@npm:^1.0.1": + version: 1.0.1 + resolution: "picocolors@npm:1.0.1" + checksum: fa68166d1f56009fc02a34cdfd112b0dd3cf1ef57667ac57281f714065558c01828cdf4f18600ad6851cbe0093952ed0660b1e0156bddf2184b6aaf5817553a5 + languageName: node + linkType: hard + "picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.2, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" @@ -14306,7 +14399,7 @@ __metadata: languageName: node linkType: hard -"schema-utils@npm:^3.0.0, schema-utils@npm:^3.1.0, schema-utils@npm:^3.1.1": +"schema-utils@npm:^3.0.0, schema-utils@npm:^3.1.1": version: 3.1.1 resolution: "schema-utils@npm:3.1.1" dependencies: @@ -14317,6 +14410,17 @@ __metadata: languageName: node linkType: hard +"schema-utils@npm:^3.2.0": + version: 3.3.0 + resolution: "schema-utils@npm:3.3.0" + dependencies: + "@types/json-schema": ^7.0.8 + ajv: ^6.12.5 + ajv-keywords: ^3.5.2 + checksum: ea56971926fac2487f0757da939a871388891bc87c6a82220d125d587b388f1704788f3706e7f63a7b70e49fc2db974c41343528caea60444afd5ce0fe4b85c0 + languageName: node + linkType: hard + "schema-utils@npm:^4.0.0": version: 4.0.0 resolution: "schema-utils@npm:4.0.0" @@ -14411,6 +14515,15 @@ __metadata: languageName: node linkType: hard +"serialize-javascript@npm:^6.0.1": + version: 6.0.2 + resolution: "serialize-javascript@npm:6.0.2" + dependencies: + randombytes: ^2.1.0 + checksum: c4839c6206c1d143c0f80763997a361310305751171dd95e4b57efee69b8f6edd8960a0b7fbfc45042aadff98b206d55428aee0dc276efe54f100899c7fa8ab7 + languageName: node + linkType: hard + "serve-handler@npm:6.1.5": version: 6.1.5 resolution: "serve-handler@npm:6.1.5" @@ -15291,7 +15404,7 @@ __metadata: languageName: node linkType: hard -"terser-webpack-plugin@npm:^5.1.3, terser-webpack-plugin@npm:^5.2.5": +"terser-webpack-plugin@npm:^5.2.5": version: 5.3.6 resolution: "terser-webpack-plugin@npm:5.3.6" dependencies: @@ -15313,6 +15426,28 @@ __metadata: languageName: node linkType: hard +"terser-webpack-plugin@npm:^5.3.10": + version: 5.3.10 + resolution: "terser-webpack-plugin@npm:5.3.10" + dependencies: + "@jridgewell/trace-mapping": ^0.3.20 + jest-worker: ^27.4.5 + schema-utils: ^3.1.1 + serialize-javascript: ^6.0.1 + terser: ^5.26.0 + peerDependencies: + webpack: ^5.1.0 + peerDependenciesMeta: + "@swc/core": + optional: true + esbuild: + optional: true + uglify-js: + optional: true + checksum: bd6e7596cf815f3353e2a53e79cbdec959a1b0276f5e5d4e63e9d7c3c5bb5306df567729da287d1c7b39d79093e56863c569c42c6c24cc34c76aa313bd2cbcea + languageName: node + linkType: hard + "terser@npm:^5.0.0, terser@npm:^5.10.0, terser@npm:^5.14.1": version: 5.16.1 resolution: "terser@npm:5.16.1" @@ -15327,6 +15462,20 @@ __metadata: languageName: node linkType: hard +"terser@npm:^5.26.0": + version: 5.31.6 + resolution: "terser@npm:5.31.6" + dependencies: + "@jridgewell/source-map": ^0.3.3 + acorn: ^8.8.2 + commander: ^2.20.0 + source-map-support: ~0.5.20 + bin: + terser: bin/terser + checksum: 60d3faf39c9ad7acc891e17888bbd206e0b777f442649cf49873a5fa317b8b8a17179a46970d884d5f93e8addde0206193ed1e2e4f1ccb1cafb167f7d1ddee96 + languageName: node + linkType: hard + "test-exclude@npm:^6.0.0": version: 6.0.0 resolution: "test-exclude@npm:6.0.0" @@ -15814,6 +15963,20 @@ __metadata: languageName: node linkType: hard +"update-browserslist-db@npm:^1.1.0": + version: 1.1.0 + resolution: "update-browserslist-db@npm:1.1.0" + dependencies: + escalade: ^3.1.2 + picocolors: ^1.0.1 + peerDependencies: + browserslist: ">= 4.21.0" + bin: + update-browserslist-db: cli.js + checksum: 7b74694d96f0c360f01b702e72353dc5a49df4fe6663d3ee4e5c628f061576cddf56af35a3a886238c01dd3d8f231b7a86a8ceaa31e7a9220ae31c1c1238e562 + languageName: node + linkType: hard + "update-check@npm:1.5.4": version: 1.5.4 resolution: "update-check@npm:1.5.4" @@ -15993,13 +16156,13 @@ __metadata: languageName: node linkType: hard -"watchpack@npm:^2.4.0": - version: 2.4.0 - resolution: "watchpack@npm:2.4.0" +"watchpack@npm:^2.4.1": + version: 2.4.2 + resolution: "watchpack@npm:2.4.2" dependencies: glob-to-regexp: ^0.4.1 graceful-fs: ^4.1.2 - checksum: 23d4bc58634dbe13b86093e01c6a68d8096028b664ab7139d58f0c37d962d549a940e98f2f201cecdabd6f9c340338dc73ef8bf094a2249ef582f35183d1a131 + checksum: 92d9d52ce3d16fd83ed6994d1dd66a4d146998882f4c362d37adfea9ab77748a5b4d1e0c65fa104797928b2d40f635efa8f9b925a6265428a69f1e1852ca3441 languageName: node linkType: hard @@ -16149,39 +16312,38 @@ __metadata: linkType: hard "webpack@npm:^5.64.4": - version: 5.76.1 - resolution: "webpack@npm:5.76.1" - dependencies: - "@types/eslint-scope": ^3.7.3 - "@types/estree": ^0.0.51 - "@webassemblyjs/ast": 1.11.1 - "@webassemblyjs/wasm-edit": 1.11.1 - "@webassemblyjs/wasm-parser": 1.11.1 + version: 5.94.0 + resolution: "webpack@npm:5.94.0" + dependencies: + "@types/estree": ^1.0.5 + "@webassemblyjs/ast": ^1.12.1 + "@webassemblyjs/wasm-edit": ^1.12.1 + "@webassemblyjs/wasm-parser": ^1.12.1 acorn: ^8.7.1 - acorn-import-assertions: ^1.7.6 - browserslist: ^4.14.5 + acorn-import-attributes: ^1.9.5 + browserslist: ^4.21.10 chrome-trace-event: ^1.0.2 - enhanced-resolve: ^5.10.0 - es-module-lexer: ^0.9.0 + enhanced-resolve: ^5.17.1 + es-module-lexer: ^1.2.1 eslint-scope: 5.1.1 events: ^3.2.0 glob-to-regexp: ^0.4.1 - graceful-fs: ^4.2.9 + graceful-fs: ^4.2.11 json-parse-even-better-errors: ^2.3.1 loader-runner: ^4.2.0 mime-types: ^2.1.27 neo-async: ^2.6.2 - schema-utils: ^3.1.0 + schema-utils: ^3.2.0 tapable: ^2.1.1 - terser-webpack-plugin: ^5.1.3 - watchpack: ^2.4.0 + terser-webpack-plugin: ^5.3.10 + watchpack: ^2.4.1 webpack-sources: ^3.2.3 peerDependenciesMeta: webpack-cli: optional: true bin: webpack: bin/webpack.js - checksum: b01fe0bc2dbca0e10d290ddb0bf81e807a031de48028176e2b21afd696b4d3f25ab9accdad888ef4a1f7c7f4d41f13d5bf2395b7653fdf3e5e3dafa54e56dab2 + checksum: 6a3d667be304a69cd6dcb8d676bc29f47642c0d389af514cfcd646eaaa809961bc6989fc4b2621a717dfc461130f29c6e20006d62a32e012dafaa9517813a4e6 languageName: node linkType: hard From 2585251f69880693c816fc331a44c7cb5354d756 Mon Sep 17 00:00:00 2001 From: Louise Davies Date: Mon, 2 Sep 2024 11:07:36 +0100 Subject: [PATCH 18/20] Fix formatting of e2e tests --- .../cypress/e2e/card/dls/datasets.cy.ts | 2 +- .../cypress/e2e/card/isis/datasets.cy.ts | 2 +- .../cypress/e2e/table/dls/datafiles.cy.ts | 36 ++----------------- .../cypress/e2e/table/dls/datasets.cy.ts | 2 +- .../cypress/e2e/table/isis/datafiles.cy.ts | 2 +- .../cypress/e2e/table/isis/datasets.cy.ts | 2 +- 6 files changed, 7 insertions(+), 39 deletions(-) diff --git a/packages/datagateway-dataview/cypress/e2e/card/dls/datasets.cy.ts b/packages/datagateway-dataview/cypress/e2e/card/dls/datasets.cy.ts index f4c29d9ea..683c89886 100644 --- a/packages/datagateway-dataview/cypress/e2e/card/dls/datasets.cy.ts +++ b/packages/datagateway-dataview/cypress/e2e/card/dls/datasets.cy.ts @@ -140,4 +140,4 @@ describe('DLS - Datasets Cards', () => { cy.get('[data-testid="card"]').should('not.exist'); }); -}); \ No newline at end of file +}); diff --git a/packages/datagateway-dataview/cypress/e2e/card/isis/datasets.cy.ts b/packages/datagateway-dataview/cypress/e2e/card/isis/datasets.cy.ts index 07f5689c4..2ecb41ec6 100644 --- a/packages/datagateway-dataview/cypress/e2e/card/isis/datasets.cy.ts +++ b/packages/datagateway-dataview/cypress/e2e/card/isis/datasets.cy.ts @@ -142,4 +142,4 @@ describe('ISIS - Datasets Cards', () => { ); cy.get('[data-testid="card"]').should('not.exist'); }); -}); \ No newline at end of file +}); diff --git a/packages/datagateway-dataview/cypress/e2e/table/dls/datafiles.cy.ts b/packages/datagateway-dataview/cypress/e2e/table/dls/datafiles.cy.ts index 28caed7af..8ef77aff3 100644 --- a/packages/datagateway-dataview/cypress/e2e/table/dls/datafiles.cy.ts +++ b/packages/datagateway-dataview/cypress/e2e/table/dls/datafiles.cy.ts @@ -11,29 +11,24 @@ describe('DLS - Datafiles Table', () => { }); }); - it('should load correctly', () => { cy.title().should('equal', 'DataGateway DataView'); cy.get('#datagateway-dataview').should('be.visible'); - //Default sort cy.get('[aria-sort="ascending"]').should('exist'); cy.get('.MuiTableSortLabel-iconDirectionAsc').should('be.visible'); }); - it('should not load incorrect URL', () => { cy.visit( '/browse/proposal/INVESTIGATION%201/investigation/2/dataset/25/datafile' ); - cy.contains('Oops!').should('be.visible'); cy.get('[role="grid"]').should('not.exist'); }); - // Lazy loading cannot be tested at the moment as there are only 15 files in this dataset it.skip('should be able to scroll down and load more rows', () => { // Will need to figure out a way to have this be mocked. @@ -42,30 +37,25 @@ describe('DLS - Datafiles Table', () => { cy.get('[aria-rowcount="55"]').should('exist'); }); - it('should be able to sort by all sort directions on single and multiple columns', () => { //Revert the default sort cy.contains('[role="button"]', 'Create Time').as('timeSortButton').click(); cy.wait('@datafilesOrder', { timeout: 10000 }); - // ascending order cy.contains('[role="button"]', 'Location').as('locationSortButton').click(); cy.wait('@datafilesOrder', { timeout: 10000 }); - cy.get('[aria-sort="ascending"]').should('exist'); cy.get('.MuiTableSortLabel-iconDirectionAsc').should('be.visible'); cy.get('[aria-rowindex="1"] [aria-colindex="4"]').contains( '/analysis/unit/bank.tiff' ); - // descending order cy.get('@locationSortButton').click(); cy.wait('@datafilesOrder', { timeout: 10000 }); - cy.get('[aria-sort="descending"]').should('exist'); cy.get('.MuiTableSortLabel-iconDirectionDesc').should( 'not.have.css', @@ -76,25 +66,20 @@ describe('DLS - Datafiles Table', () => { '/to/total/according.tiff' ); - // no order cy.get('@locationSortButton').click(); - cy.get('[aria-sort="ascending"]').should('not.exist'); cy.get('[aria-sort="descending"]').should('not.exist'); cy.get('.MuiTableSortLabel-iconDirectionAsc').should('not.exist'); - cy.get('[data-testid="SortIcon"]').should('have.length', 4); cy.get('[data-testid="ArrowUpwardIcon"]').should('not.exist'); - cy.get('[aria-rowindex="1"] [aria-colindex="4"]').contains( '/time/run/drug.jpeg' ); - // multiple columns (shift click) cy.get('@timeSortButton').click(); cy.wait('@datafilesOrder', { timeout: 10000 }); @@ -105,10 +90,8 @@ describe('DLS - Datafiles Table', () => { cy.get('@nameSortButton').click({ shiftKey: true }); cy.wait('@datafilesOrder', { timeout: 10000 }); - cy.get('[aria-rowindex="1"] [aria-colindex="3"]').contains('Datafile 60'); - // should replace previous sort when clicked without shift cy.contains('[role="button"]', 'Location').click(); cy.get('[aria-sort="ascending"]').should('have.length', 1); @@ -117,73 +100,58 @@ describe('DLS - Datafiles Table', () => { ); }); - it('should change icons when sorting on a column', () => { cy.get('[data-testid="SortIcon"]').should('have.length', 3); - // check icon when clicking on a column cy.contains('[role="button"]', 'Location').click(); cy.get('[data-testid="ArrowDownwardIcon"]').should('have.length', 1); cy.get('.MuiTableSortLabel-iconDirectionAsc').should('exist'); - // check icon when clicking on a column again cy.contains('[role="button"]', 'Location').click(); cy.get('[data-testid="ArrowDownwardIcon"]').should('have.length', 1); cy.get('.MuiTableSortLabel-iconDirectionAsc').should('not.exist'); - // check icon when hovering over a column cy.contains('[role="button"]', 'Name').trigger('mouseover'); cy.get('[data-testid="ArrowUpwardIcon"]').should('have.length', 1); cy.get('[data-testid="ArrowDownwardIcon"]').should('have.length', 1); - // check icons when shift is held cy.get('.App').trigger('keydown', { key: 'Shift' }); cy.get('[data-testid="AddIcon"]').should('have.length', 2); }); - it('should be able to filter with both text & date filters on multiple columns', () => { // test text filter cy.get('input[aria-label="Filter by Location"]').type('unit'); - cy.get('[aria-rowcount="1"]').should('exist'); cy.get('[aria-rowindex="1"] [aria-colindex="3"]').contains('Datafile 1369'); - // test date filter cy.get('input[aria-label="Create Time filter to"]').type('2019-01-01'); - cy.get('[aria-rowcount="0"]').should('exist'); }); - - it('should be able to view details', () => { + it.only('should be able to view details', () => { cy.get('[aria-label="Show details"]').eq(1).click(); - cy.get('#details-panel').should('be.visible'); cy.get('[aria-label="Hide details"]').should('exist'); cy.get('#details-panel').contains('Datafile 1607').should('be.visible'); - cy.get('[aria-label="Show details"]').first().click(); - cy.get('#details-panel').contains('Datafile 1726').should('be.visible'); cy.get('#details-panel').contains('Datafile 1607').should('not.exist'); cy.get('[aria-label="Hide details"]').should('have.length', 1); - cy.get('[aria-label="Hide details"]').first().click(); - cy.get('#details-panel').should('not.exist'); cy.get('[aria-label="Hide details"]').should('not.exist'); }); -}); \ No newline at end of file +}); diff --git a/packages/datagateway-dataview/cypress/e2e/table/dls/datasets.cy.ts b/packages/datagateway-dataview/cypress/e2e/table/dls/datasets.cy.ts index 378a58a05..36a151638 100644 --- a/packages/datagateway-dataview/cypress/e2e/table/dls/datasets.cy.ts +++ b/packages/datagateway-dataview/cypress/e2e/table/dls/datasets.cy.ts @@ -168,4 +168,4 @@ describe('DLS - Datasets Table', () => { cy.get('[aria-label="Hide details"]').should('not.exist'); }); }); -}); \ No newline at end of file +}); diff --git a/packages/datagateway-dataview/cypress/e2e/table/isis/datafiles.cy.ts b/packages/datagateway-dataview/cypress/e2e/table/isis/datafiles.cy.ts index 26d536378..095ace710 100644 --- a/packages/datagateway-dataview/cypress/e2e/table/isis/datafiles.cy.ts +++ b/packages/datagateway-dataview/cypress/e2e/table/isis/datafiles.cy.ts @@ -193,4 +193,4 @@ describe('ISIS - Datafiles Table', () => { cy.get('#details-panel').should('not.exist'); cy.get('[aria-label="Hide details"]').should('not.exist'); }); -}); \ No newline at end of file +}); diff --git a/packages/datagateway-dataview/cypress/e2e/table/isis/datasets.cy.ts b/packages/datagateway-dataview/cypress/e2e/table/isis/datasets.cy.ts index 20e34b576..627b276e1 100644 --- a/packages/datagateway-dataview/cypress/e2e/table/isis/datasets.cy.ts +++ b/packages/datagateway-dataview/cypress/e2e/table/isis/datasets.cy.ts @@ -198,4 +198,4 @@ describe('ISIS - Datasets Table', () => { ); }); }); -}); \ No newline at end of file +}); From 2449e8bf9574786951a51bc591e60b5e92b4152f Mon Sep 17 00:00:00 2001 From: Louise Davies Date: Mon, 2 Sep 2024 11:24:47 +0100 Subject: [PATCH 19/20] Fix e2e tests broken by change in default sort --- .../cypress/e2e/card/dls/datasets.cy.ts | 8 +++++--- .../cypress/e2e/card/isis/datasets.cy.ts | 14 ++++++++------ .../cypress/e2e/cartSelection.cy.ts | 8 ++++---- .../cypress/e2e/table/dls/datafiles.cy.ts | 19 +++++++++---------- .../cypress/e2e/table/dls/datasets.cy.ts | 16 +++++++++------- .../cypress/e2e/table/isis/datafiles.cy.ts | 7 +++---- .../cypress/e2e/table/isis/datasets.cy.ts | 3 ++- 7 files changed, 40 insertions(+), 35 deletions(-) diff --git a/packages/datagateway-dataview/cypress/e2e/card/dls/datasets.cy.ts b/packages/datagateway-dataview/cypress/e2e/card/dls/datasets.cy.ts index 683c89886..2498d0a94 100644 --- a/packages/datagateway-dataview/cypress/e2e/card/dls/datasets.cy.ts +++ b/packages/datagateway-dataview/cypress/e2e/card/dls/datasets.cy.ts @@ -52,8 +52,10 @@ describe('DLS - Datasets Cards', () => { }); it('should be able to sort by one field or multiple', () => { - //Revert the default sort - cy.contains('[role="button"]', 'Create Time').as('timeSortButton').click(); + // Revert the default sort + cy.contains('[role="button"]', 'Name').as('nameSortButton').click(); + cy.get('@nameSortButton').click(); + cy.wait('@getDatasetsOrder', { timeout: 10000 }); // ascending @@ -78,7 +80,7 @@ describe('DLS - Datasets Cards', () => { cy.get('[data-testid="card"]').first().contains('DATASET 1'); // multiple fields (shift click) - cy.get('@timeSortButton').click(); + cy.contains('[role="button"]', 'Create Time').as('timeSortButton').click(); cy.wait('@getDatasetsOrder', { timeout: 10000, }); diff --git a/packages/datagateway-dataview/cypress/e2e/card/isis/datasets.cy.ts b/packages/datagateway-dataview/cypress/e2e/card/isis/datasets.cy.ts index 2ecb41ec6..e73570a2d 100644 --- a/packages/datagateway-dataview/cypress/e2e/card/isis/datasets.cy.ts +++ b/packages/datagateway-dataview/cypress/e2e/card/isis/datasets.cy.ts @@ -31,10 +31,11 @@ describe('ISIS - Datasets Cards', () => { }); it('should be able to expand "More Information"', () => { - //Revert the default sort - cy.contains('[role="button"]', 'Create Time').click(); - cy.wait('@getDatasetsOrder', { timeout: 10000 }); + // Revert the default sort + cy.contains('[role="button"]', 'Name').as('nameSortButton').click(); + cy.get('@nameSortButton').click(); + cy.get('[data-testid="card"]').first().contains('DATASET 19'); cy.get('[data-testid="card"]') .first() .contains('More Information') @@ -56,8 +57,9 @@ describe('ISIS - Datasets Cards', () => { }); it('should be able to sort by one field or multiple', () => { - //Revert the default sort - cy.contains('[role="button"]', 'Create Time').as('timeSortButton').click(); + // Revert the default sort + cy.contains('[role="button"]', 'Name').as('nameSortButton').click(); + cy.get('@nameSortButton').click(); cy.wait('@getDatasetsOrder', { timeout: 10000 }); // ascending @@ -83,7 +85,7 @@ describe('ISIS - Datasets Cards', () => { cy.get('[data-testid="card"]').first().contains('DATASET 19'); // multiple fields (shift click) - cy.get('@timeSortButton').click(); + cy.contains('[role="button"]', 'Create Time').as('timeSortButton').click(); cy.wait('@getDatasetsOrder', { timeout: 10000, }); diff --git a/packages/datagateway-dataview/cypress/e2e/cartSelection.cy.ts b/packages/datagateway-dataview/cypress/e2e/cartSelection.cy.ts index d0c4165c7..0ce01b529 100644 --- a/packages/datagateway-dataview/cypress/e2e/cartSelection.cy.ts +++ b/packages/datagateway-dataview/cypress/e2e/cartSelection.cy.ts @@ -311,7 +311,7 @@ describe('Add/remove from cart functionality', () => { .and('eq', 'true'); cy.get('[aria-label="select row 0"]').should('be.checked'); - cy.get('[aria-label="select row 1"]').should('not.be.checked'); + cy.get('[aria-label="select row 2"]').should('not.be.checked'); cy.get('[aria-label="grid"]').scrollTo('bottom', { ensureScrollable: false, @@ -319,8 +319,8 @@ describe('Add/remove from cart functionality', () => { cy.get('[aria-label="grid"]').scrollTo('bottom', { ensureScrollable: false, }); - cy.get('[aria-label="select row 13"]').should('not.be.checked'); - cy.get('[aria-label="select row 14"]').should('be.checked'); + cy.get('[aria-label="select row 12"]').should('not.be.checked'); + cy.get('[aria-label="select row 13"]').should('be.checked'); }); it('by shift clicking', () => { @@ -467,7 +467,7 @@ describe('Add/remove from cart functionality', () => { cy.get('[aria-label="grid"]').scrollTo('bottom', { ensureScrollable: false, }); - cy.get('[aria-label="select row 13"]').should('be.checked'); + cy.get('[aria-label="select row 13"]').should('not.be.checked'); cy.get('[aria-label="select row 14"]').should('be.checked'); }); diff --git a/packages/datagateway-dataview/cypress/e2e/table/dls/datafiles.cy.ts b/packages/datagateway-dataview/cypress/e2e/table/dls/datafiles.cy.ts index 8ef77aff3..62da2bed7 100644 --- a/packages/datagateway-dataview/cypress/e2e/table/dls/datafiles.cy.ts +++ b/packages/datagateway-dataview/cypress/e2e/table/dls/datafiles.cy.ts @@ -38,8 +38,9 @@ describe('DLS - Datafiles Table', () => { }); it('should be able to sort by all sort directions on single and multiple columns', () => { - //Revert the default sort - cy.contains('[role="button"]', 'Create Time').as('timeSortButton').click(); + // Revert the default sort + cy.contains('[role="button"]', 'Name').as('nameSortButton').click(); + cy.get('@nameSortButton').click(); cy.wait('@datafilesOrder', { timeout: 10000 }); // ascending order @@ -81,11 +82,9 @@ describe('DLS - Datafiles Table', () => { ); // multiple columns (shift click) - cy.get('@timeSortButton').click(); + cy.contains('[role="button"]', 'Create Time').click(); cy.wait('@datafilesOrder', { timeout: 10000 }); - cy.contains('[role="button"]', 'Name') - .as('nameSortButton') - .click({ shiftKey: true }); + cy.get('@nameSortButton').click({ shiftKey: true }); cy.wait('@datafilesOrder', { timeout: 10000 }); cy.get('@nameSortButton').click({ shiftKey: true }); cy.wait('@datafilesOrder', { timeout: 10000 }); @@ -136,17 +135,17 @@ describe('DLS - Datafiles Table', () => { cy.get('[aria-rowcount="0"]').should('exist'); }); - it.only('should be able to view details', () => { + it('should be able to view details', () => { cy.get('[aria-label="Show details"]').eq(1).click(); cy.get('#details-panel').should('be.visible'); cy.get('[aria-label="Hide details"]').should('exist'); - cy.get('#details-panel').contains('Datafile 1607').should('be.visible'); + cy.get('#details-panel').contains('Datafile 1131').should('be.visible'); cy.get('[aria-label="Show details"]').first().click(); - cy.get('#details-panel').contains('Datafile 1726').should('be.visible'); - cy.get('#details-panel').contains('Datafile 1607').should('not.exist'); + cy.get('#details-panel').contains('Datafile 1012').should('be.visible'); + cy.get('#details-panel').contains('Datafile 1131').should('not.exist'); cy.get('[aria-label="Hide details"]').should('have.length', 1); cy.get('[aria-label="Hide details"]').first().click(); diff --git a/packages/datagateway-dataview/cypress/e2e/table/dls/datasets.cy.ts b/packages/datagateway-dataview/cypress/e2e/table/dls/datasets.cy.ts index 36a151638..86541eff8 100644 --- a/packages/datagateway-dataview/cypress/e2e/table/dls/datasets.cy.ts +++ b/packages/datagateway-dataview/cypress/e2e/table/dls/datasets.cy.ts @@ -49,11 +49,12 @@ describe('DLS - Datasets Table', () => { }); it('should be able to sort by all sort directions on single and multiple columns', () => { - //Revert the default sort - cy.contains('[role="button"]', 'Create Time').as('timeSortButton').click(); + // Revert the default sort + cy.contains('[role="button"]', 'Name').as('nameSortButton').click(); + cy.get('@nameSortButton').click(); // ascending order - cy.contains('[role="button"]', 'Name').as('nameSortButton').click(); + cy.get('@nameSortButton').click(); cy.wait('@datasets', { timeout: 10000 }); cy.get('[aria-sort="ascending"]').should('exist'); @@ -84,7 +85,8 @@ describe('DLS - Datasets Table', () => { cy.get('[aria-rowindex="1"] [aria-colindex="3"]').contains('DATASET 1'); // multiple columns (shift click) - cy.get('@timeSortButton').click(); + cy.contains('[role="button"]', 'Create Time').as('timeSortButton').click(); + // ascending order cy.wait('@datasets', { timeout: 10000 }); cy.get('@nameSortButton').click({ shiftKey: true }); cy.wait('@datasets', { timeout: 10000 }); @@ -102,9 +104,9 @@ describe('DLS - Datasets Table', () => { }); it('should change icons when sorting on a column', () => { - cy.contains('[role="button"]', 'Create Time').click(); - cy.contains('[role="button"]', 'Create Time').click(); - cy.contains('[role="button"]', 'Create Time').click(); + // clear default sort + cy.contains('[role="button"]', 'Name').click(); + cy.contains('[role="button"]', 'Name').click(); cy.get('[data-testid="SortIcon"]').should('have.length', 5); diff --git a/packages/datagateway-dataview/cypress/e2e/table/isis/datafiles.cy.ts b/packages/datagateway-dataview/cypress/e2e/table/isis/datafiles.cy.ts index 095ace710..b072d69ae 100644 --- a/packages/datagateway-dataview/cypress/e2e/table/isis/datafiles.cy.ts +++ b/packages/datagateway-dataview/cypress/e2e/table/isis/datafiles.cy.ts @@ -119,9 +119,8 @@ describe('ISIS - Datafiles Table', () => { it('should change icons when sorting on a column', () => { // clear default sort - cy.contains('[role="button"]', 'Modified Time').click(); - cy.contains('[role="button"]', 'Modified Time').click(); - cy.contains('[role="button"]', 'Modified Time').click(); + cy.contains('[role="button"]', 'Name').click(); + cy.contains('[role="button"]', 'Name').click(); cy.get('[data-testid="SortIcon"]').should('have.length', 4); @@ -154,7 +153,7 @@ describe('ISIS - Datafiles Table', () => { ); cy.get('[aria-rowcount="15"]').should('exist'); - cy.get('[aria-rowindex="1"] [aria-colindex="3"]').contains('Datafile 1744'); + cy.get('[aria-rowindex="1"] [aria-colindex="3"]').contains('Datafile 1030'); // test text filter cy.get('[aria-label="Filter by Location"]').first().type('action'); diff --git a/packages/datagateway-dataview/cypress/e2e/table/isis/datasets.cy.ts b/packages/datagateway-dataview/cypress/e2e/table/isis/datasets.cy.ts index 627b276e1..2b7dda93f 100644 --- a/packages/datagateway-dataview/cypress/e2e/table/isis/datasets.cy.ts +++ b/packages/datagateway-dataview/cypress/e2e/table/isis/datasets.cy.ts @@ -101,7 +101,8 @@ describe('ISIS - Datasets Table', () => { it('should change icons when sorting on a column', () => { // clear default sort - cy.contains('[role="button"]', 'Create Time').click(); + cy.contains('[role="button"]', 'Name').click(); + cy.contains('[role="button"]', 'Name').click(); cy.get('[data-testid="SortIcon"]').should('have.length', 3); From bef76d985f47376a0007f608d2801b15a23c343f Mon Sep 17 00:00:00 2001 From: Louise Davies Date: Mon, 2 Sep 2024 11:42:09 +0100 Subject: [PATCH 20/20] Fix typescript errors for AxiosProgressEvent mocks --- .../views/datafilePreview/datafilePreviewer.component.test.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/datagateway-dataview/src/views/datafilePreview/datafilePreviewer.component.test.tsx b/packages/datagateway-dataview/src/views/datafilePreview/datafilePreviewer.component.test.tsx index a4e2eb3f2..d550945b5 100644 --- a/packages/datagateway-dataview/src/views/datafilePreview/datafilePreviewer.component.test.tsx +++ b/packages/datagateway-dataview/src/views/datafilePreview/datafilePreviewer.component.test.tsx @@ -89,6 +89,7 @@ describe('DatafilePreviewer', () => { loaded: 10, bytes: 10, total: 10, + lengthComputable: true, }); // this is download datafile content query, resolve with mock datafile content return Promise.resolve({ @@ -208,6 +209,7 @@ describe('DatafilePreviewer', () => { loaded: 2, bytes: 10, total: 10, + lengthComputable: true, }); return new Promise((_) => { // never resolve the promise to pretend it is loading