Skip to content

Commit e37223c

Browse files
authored
RELEASE 2025-11-11 (#2094)
## Description Short description of the pull request ## Motivation Background on use case, changes needed ## Fixes: Please provide a list of the fixes implemented in this PR * Items added ## Changes: Please provide a list of the changes implemented by this PR * changes made ## Tests included - [ ] Included for each change/fix? - [ ] Passing? (Merge will not be approved unless this is checked) ## Documentation - [ ] swagger documentation updated \[required\] - [ ] official documentation updated \[nice-to-have\] ### official documentation info If you have updated the official documentation, please provide PR # and URL of the pages where the updates are included ## Backend version - [ ] Does it require a specific version of the backend - which version of the backend is required: ## Summary by Sourcery Implement advanced proposal and dataset filtering capabilities, enhance shared filter and multi-select components, streamline application configuration loading, improve metadata display control, and update CI workflows and tests for robust coverage. New Features: - Introduce proposal filter management actions and selectors (add, remove, clear, and initial filters) with state and effect integration - Auto-set filter end dates to the current date when only a start date is provided for datasets and proposals - Introduce a hideEmptyMetadataTable configuration flag to conditionally suppress empty metadata sections across detail views - Enable dynamic facet parameter handling in proposal effects using front-end configuration Bug Fixes: - Fix DynamicMatTable getColumnValue to correctly handle comma-separated field names - Ensure proposal filters reset pagination skip when adding or removing filters - Prevent empty or null IDs from appearing in checkbox facet lists Enhancements: - Refactor SharedFilterComponent to improve checkbox facet search, ordering, deduplication, and display threshold - Enhance MultiSelectFilterComponent to map facet IDs to labels and emit structured selection events - Consolidate application configuration merging in AppConfigService with array-replace behavior and support for override toggling - Provide custom date formats for proposal date pickers via MAT_DATE_FORMATS in the proposals module - Refactor instrument selectors to return arrays of {_id,label} pairs and update related selectors and components CI: - Upgrade GitHub Actions setup-node to v6 and upload-artifact to v5 across CI workflows Tests: - Add unit tests for proposal filter actions, selectors, reducers, and SharedFilter behaviors - Extend Cypress end-to-end tests to cover filter auto-end-date logic and dynamic detail view reloads Chores: - Bump dependencies: @SciCatProject SDK, luxon, mathjs - Add CODEOWNERS file - Update package and lock files versions
2 parents e3b661b + 519f1de commit e37223c

File tree

46 files changed

+1608
-677
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1608
-677
lines changed

.github/workflows/release-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- uses: actions/checkout@v5
2121

2222
- name: Set up Node.js
23-
uses: actions/setup-node@v5
23+
uses: actions/setup-node@v6
2424
with:
2525
node-version: ${{ env.NODE_VERSION }}
2626

.github/workflows/test.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/checkout@v5
1818

1919
- name: Set up Node.js
20-
uses: actions/setup-node@v5
20+
uses: actions/setup-node@v6
2121
with:
2222
node-version: 18.x
2323

@@ -42,7 +42,7 @@ jobs:
4242
uses: actions/checkout@v5
4343

4444
- name: Set up Node.js
45-
uses: actions/setup-node@v5
45+
uses: actions/setup-node@v6
4646
with:
4747
node-version: ${{ env.NODE_VERSION }}
4848

@@ -65,7 +65,7 @@ jobs:
6565
uses: actions/checkout@v5
6666

6767
- name: Set up Node.js
68-
uses: actions/setup-node@v5
68+
uses: actions/setup-node@v6
6969
with:
7070
node-version: ${{ env.NODE_VERSION }}
7171

@@ -89,7 +89,7 @@ jobs:
8989
- name: Save PR number
9090
run: |
9191
echo ${{ github.event.number }} > ./coverage/PR
92-
- uses: actions/upload-artifact@v4
92+
- uses: actions/upload-artifact@v5
9393
with:
9494
name: coverage
9595
path: coverage/
@@ -102,7 +102,7 @@ jobs:
102102
uses: actions/checkout@v5
103103

104104
- name: Set up Node.js
105-
uses: actions/setup-node@v5
105+
uses: actions/setup-node@v6
106106
with:
107107
node-version: ${{ env.NODE_VERSION }}
108108

@@ -143,13 +143,13 @@ jobs:
143143
run: |
144144
docker compose down -v
145145
146-
- uses: actions/upload-artifact@v4
146+
- uses: actions/upload-artifact@v5
147147
if: ${{ failure() }}
148148
with:
149149
name: cypress-screenshots
150150
path: cypress/screenshots
151151

152-
- uses: actions/upload-artifact@v4
152+
- uses: actions/upload-artifact@v5
153153
if: ${{ failure() }}
154154
with:
155155
name: cypress-videos

cypress/e2e/datasets/datasets-detail-dynamic.cy.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import { mergeConfig } from "../../support/utils";
33

44
describe("Datasets Detail View Dynamic", () => {
55
const dynamicComponentConfig = testConfig.dynamicDetialViewComponent;
6-
const customizedLabelSets =
7-
dynamicComponentConfig.labelsLocalization.dataset;
6+
const customizedLabelSets = dynamicComponentConfig.labelsLocalization.dataset;
87
const customizedComponents =
98
dynamicComponentConfig.datasetDetailComponent.customization;
109

@@ -136,4 +135,15 @@ describe("Datasets Detail View Dynamic", () => {
136135
cy.wrap($img).should("have.attr", "class").and("contain", expectedSize);
137136
});
138137
});
138+
139+
it("should render tabs correctly on reload", () => {
140+
cy.get("mat-row").contains("Cypress Dataset").click();
141+
142+
cy.reload();
143+
144+
cy.get(".mat-mdc-tab-link").contains("Details").should("exist");
145+
cy.get(".mat-mdc-tab-link").contains("Attachments").should("exist");
146+
cy.get(".mat-mdc-tab-link").contains("Logbook").should("exist");
147+
cy.get(".mat-mdc-tab-link").contains("Datafiles").should("exist");
148+
});
139149
});

cypress/e2e/datasets/datasets-general.cy.js

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,4 +401,68 @@ describe("Datasets general", () => {
401401
});
402402
});
403403
});
404+
405+
describe("Dataset filter end date auto-set", () => {
406+
it("should set end date to today if only start date is provided", () => {
407+
cy.createDataset({
408+
type: "raw",
409+
creationTime: "2025-10-08T15:00:00.000Z",
410+
});
411+
cy.visit("/datasets");
412+
413+
cy.get('[data-cy="creation-time-begin"]').type("2025-10-07");
414+
415+
cy.get('[data-cy="filter-search-button"]').click();
416+
417+
cy.get(".dataset-table mat-row").contains("Cypress Dataset").should("exist");
418+
});
419+
});
420+
421+
describe("Scientific notation in condition panel test", () => {
422+
beforeEach(() => {
423+
cy.login(Cypress.env("username"), Cypress.env("password"));
424+
cy.createDataset({
425+
type: "raw",
426+
dataFileSize: "small",
427+
scientificMetadata: {
428+
extra_entry_end_time: { type: "number", value: 310000, unit: "" },
429+
},
430+
isPublished: true,
431+
});
432+
433+
cy.visit("/datasets");
434+
});
435+
it("should be able to add condition with scientific notation value", () => {
436+
437+
cy.get('[data-cy="scientific-condition-filter-list"]').within(() => {
438+
cy.get('[data-cy="add-condition-button"]').click();
439+
});
440+
441+
cy.get('input[name="lhs"]').type("extra_entry_end_time");
442+
443+
cy.get("mat-dialog-container").find('button[type="submit"]').click();
444+
445+
cy.get(".condition-panel").first().click();
446+
447+
cy.get(".condition-panel")
448+
.first()
449+
.within(() => {
450+
cy.get("mat-select").click();
451+
});
452+
453+
cy.get("mat-option").contains("=").click();
454+
455+
cy.get(".condition-panel")
456+
.first()
457+
.within(() => {
458+
cy.get("input[matInput]").eq(0).clear().type("3.1e4");
459+
});
460+
461+
cy.get('[data-cy="search-button"]').click();
462+
463+
cy.get(".dataset-table mat-table").should("exist");
464+
465+
cy.get('[data-cy="remove-condition-button"]').click();
466+
});
467+
})
404468
});

cypress/e2e/proposals/proposals-general.cy.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,4 +577,25 @@ describe("Proposals general", () => {
577577
});
578578
});
579579
});
580+
581+
describe("Proposals filter end date auto-set", () => {
582+
it("should auto-set end date when start date is set and end date is empty", () => {
583+
const newProposal = {
584+
...testData.proposal,
585+
proposalId: Math.floor(100000 + Math.random() * 900000).toString(),
586+
startTime: "2025-10-08T15:00:00.000Z",
587+
};
588+
589+
cy.createProposal(newProposal);
590+
591+
cy.visit("/proposals");
592+
593+
cy.get('[data-cy="creation-time-begin"]').type("2025-10-08");
594+
595+
cy.get('[data-cy="apply-button-filter"]').click();
596+
597+
cy.get("mat-table mat-row").should("contain", newProposal.proposalId);
598+
599+
});
600+
});
580601
});

cypress/fixtures/testData.js

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,29 @@ export const testConfig = {
314314
enabled: true,
315315
},
316316
],
317-
filters: [],
317+
filters: [
318+
{
319+
key: "instrumentIds",
320+
label: "Instrument",
321+
type: "checkbox",
322+
description: "Filter by instrument name",
323+
enabled: true,
324+
},
325+
{
326+
key: "pi_lastname",
327+
label: "PI Last Name",
328+
type: "checkbox",
329+
description: "Filter by dataset start time",
330+
enabled: true,
331+
},
332+
{
333+
key: "startTime",
334+
label: "Start Time",
335+
type: "dateRange",
336+
description: "Filter by dataset start time",
337+
enabled: true,
338+
},
339+
],
318340
conditions: [],
319341
},
320342
},

0 commit comments

Comments
 (0)