Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 17-02-2025 #1749

Open
wants to merge 40 commits into
base: release
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
d3f75a8
chore(deps-dev): bump eslint-config-prettier from 9.1.0 to 10.0.1
dependabot[bot] Jan 31, 2025
14f4407
chore(deps-dev): bump eslint-config-prettier from 9.1.0 to 10.0.1 (#1…
github-actions[bot] Jan 31, 2025
aed9710
feat: related proposals and table improvements (#1703)
martin-trajanovski Feb 3, 2025
8ec50ff
chore(deps-dev): bump the eslint group with 2 updates
dependabot[bot] Feb 3, 2025
da95b52
chore(deps-dev): bump the eslint group with 2 updates (#1738)
github-actions[bot] Feb 3, 2025
6ae6294
chore(deps-dev): bump @types/node in the types group
dependabot[bot] Feb 3, 2025
f95ceba
chore(deps-dev): bump @types/node from 22.12.0 to 22.13.0 in the type…
github-actions[bot] Feb 3, 2025
2ded711
feat: implement dynamic loading for dataset details component based o…
Junjiequan Feb 4, 2025
d79d7e9
Solved conflicts from merging with master
nitrosx Feb 4, 2025
e314d45
more conflicts solved
nitrosx Feb 4, 2025
1dd83b3
remove metadata edit for proposals
nitrosx Jan 24, 2025
bcce2a5
fixed proposal unit test
nitrosx Jan 24, 2025
6f23139
added metadata editing
nitrosx Feb 3, 2025
3de0803
solving test failing
nitrosx Feb 3, 2025
7cd383b
more conflicts
nitrosx Feb 4, 2025
c21bc99
wip before merge with master
nitrosx Feb 4, 2025
1c1b212
change translate to use the current config
nitrosx Feb 4, 2025
e3de60e
remove metadata edit for proposals
nitrosx Jan 24, 2025
d5e5741
added metadata editing
nitrosx Feb 3, 2025
146e2e0
fix unit test
Junjiequan Feb 4, 2025
443a365
fix e2e test
Junjiequan Feb 4, 2025
2ddfa7d
e2e test for proposal
Junjiequan Feb 4, 2025
53edef6
fix e2e
Junjiequan Feb 4, 2025
d70575d
remove .only from cypress
Junjiequan Feb 4, 2025
ba565bb
fix e2e test error on electron browser
Junjiequan Feb 7, 2025
5467614
e2e test consistant datafiles action url
Junjiequan Feb 7, 2025
9906e90
fix: ensure scientific metadata table display correctly when unit is …
Junjiequan Feb 7, 2025
e324764
replace syntax with optional operator
Junjiequan Feb 7, 2025
9977cfd
feat: swap 4462 proposal metadata and label localization (#1717)
nitrosx Feb 7, 2025
d1be644
Merge branch 'master' into scientific-metadata-table-ui-error
nitrosx Feb 7, 2025
a505802
fix: ensure scientific metadata table display correctly when unit is …
nitrosx Feb 7, 2025
327a53d
fix: ensure user cookies are cleared before logout redirect (#1748)
Junjiequan Feb 17, 2025
14a1cb7
chore(deps-dev): bump the eslint group with 2 updates
dependabot[bot] Feb 17, 2025
9fcbc7f
chore(deps-dev): bump the eslint group with 2 updates (#1750)
github-actions[bot] Feb 17, 2025
8bc302a
chore(deps-dev): bump @types/node in the types group
dependabot[bot] Feb 17, 2025
1bbe938
chore(deps-dev): bump @types/node from 22.13.0 to 22.13.4 in the type…
github-actions[bot] Feb 17, 2025
8ffa1fe
chore(deps-dev): bump jasmine-core from 5.5.0 to 5.6.0
dependabot[bot] Feb 17, 2025
2919bcf
chore(deps-dev): bump jasmine-core from 5.5.0 to 5.6.0 (#1752)
github-actions[bot] Feb 17, 2025
9e1d019
chore: allow setting the date format via app configuration (#1754)
Junjiequan Feb 20, 2025
05ed3be
feat: add dynamic material table (#1735)
martin-trajanovski Feb 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CI/e2e/frontend.config.e2e.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"files": "all",
"mat_icon": "download",
"type": "form",
"url": "https://www.scicat.info/download/all",
"url": "http://localhost:4200/download/all",
"target": "_blank",
"enabled": "#SizeLimit",
"authorization": ["#datasetAccess", "#datasetPublic"]
Expand All @@ -77,7 +77,7 @@
"files": "selected",
"mat_icon": "download",
"type": "form",
"url": "https://www.scicat.info/download/selected",
"url": "http://localhost:4200/download/selected",
"target": "_blank",
"enabled": "#Selected && #SizeLimit",
"authorization": ["#datasetAccess", "#datasetPublic"]
Expand All @@ -89,7 +89,7 @@
"files": "all",
"icon": "/assets/icons/jupyter_logo.png",
"type": "form",
"url": "https://www.scicat.info/notebook/all",
"url": "http://localhost:4200/notebook/all",
"target": "_blank",
"authorization": ["#datasetAccess", "#datasetPublic"]
},
Expand All @@ -100,7 +100,7 @@
"files": "selected",
"icon": "/assets/icons/jupyter_logo.png",
"type": "form",
"url": "https://www.scicat.info/notebook/selected",
"url": "http://localhost:4200/notebook/selected",
"target": "_blank",
"enabled": "#Selected",
"authorization": ["#datasetAccess", "#datasetPublic"]
Expand Down
4 changes: 2 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
"maximumWarning": "8kb",
"maximumError": "8kb"
}
],
"fileReplacements": [
Expand Down
14 changes: 10 additions & 4 deletions cypress/e2e/datasets/datasets-datafiles.cy.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
describe("Dataset datafiles", () => {
beforeEach(() => {
cy.readFile("CI/e2e/frontend.config.e2e.json").then((baseConfig) => {
cy.intercept("GET", "**/admin/config", baseConfig).as(
"getFrontendConfig",
);
});
cy.login(Cypress.env("username"), Cypress.env("password"));
cy.intercept("PATCH", "/api/v3/datasets/**/*").as("change");
cy.intercept("GET", "*").as("fetch");
cy.visit("/");
});

after(() => {
Expand All @@ -11,10 +17,10 @@ describe("Dataset datafiles", () => {

describe("Datafiles action test", () => {
const actionUrl = {
downloadSelected: "https://www.scicat.info/download/selected",
downloadAll: "https://www.scicat.info/download/all",
notebookSelected: "https://www.scicat.info/notebook/selected",
notebookAll: "https://www.scicat.info/notebook/all",
downloadSelected: "http://localhost:4200/download/selected",
downloadAll: "http://localhost:4200/download/all",
notebookSelected: "http://localhost:4200/notebook/selected",
notebookAll: "http://localhost:4200/notebook/all",
};
it("Should be able to download/notebook with selected/all", () => {
cy.createDataset("raw", undefined, "small");
Expand Down
58 changes: 58 additions & 0 deletions cypress/e2e/datasets/datasets-detail-default.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import { testConfig } from "../../fixtures/testData";
import { mergeConfig } from "../../support/utils";

describe("Datasets Detail View Default", () => {
const defaultComponentConfig = testConfig.defaultDetailViewComponent;

beforeEach(() => {
cy.readFile("CI/e2e/frontend.config.e2e.json").then((baseConfig) => {
const mergedConfig = mergeConfig(baseConfig, defaultComponentConfig);
cy.intercept("GET", "**/admin/config", mergedConfig).as(
"getFrontendConfig",
);
});

cy.login(Cypress.env("username"), Cypress.env("password"));
cy.createDataset("raw");
cy.visit("/datasets");
cy.wait("@getFrontendConfig");
});

after(() => {
cy.removeDatasets();
});

it("should load datasets with fallback labels when no custom labels are available", () => {
const fallbackLabelsToCheck = ["Creator Information", "Orcid"];
const customizedLabelsToCheck = [
"Test Dataset name",
"Test General Information",
"Test Description",
];

cy.get(".dataset-table mat-table mat-header-row").should("exist");

cy.finishedLoading();

cy.get('[data-cy="text-search"] input[type="search"]')
.clear()
.type("Cypress");

cy.isLoading();

cy.get("mat-row").contains("Cypress Dataset").click();

cy.isLoading();

cy.wrap([...fallbackLabelsToCheck, ...customizedLabelsToCheck]).each(
(value) => {
cy.get("mat-card").should(($matCards) => {
const matchFound = [...$matCards].some((card) =>
card.innerText.includes(value),
);
expect(matchFound).to.be.true;
});
},
);
});
});
143 changes: 143 additions & 0 deletions cypress/e2e/datasets/datasets-detail-dynamic.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
import { testConfig } from "../../fixtures/testData";
import { mergeConfig } from "../../support/utils";

describe("Datasets Detail View Dynamic", () => {
const dynamicComponentConfig = testConfig.dynamicDetialViewComponent;
const customizedLabelSets =
dynamicComponentConfig.labelsLocalization.datasetCustom;
const customizedComponents =
dynamicComponentConfig.datasetDetailComponent.customization;

beforeEach(() => {
cy.readFile("CI/e2e/frontend.config.e2e.json").then((baseConfig) => {
const mergedConfig = mergeConfig(baseConfig, dynamicComponentConfig);
cy.intercept("GET", "**/admin/config", mergedConfig).as(
"getFrontendConfig",
);
});

cy.login(Cypress.env("username"), Cypress.env("password"));
cy.createDataset("raw");
cy.visit("/datasets");
cy.wait("@getFrontendConfig");
});

after(() => {
cy.removeDatasets();
});

it("should load datasets with customized labels", () => {
cy.get(".dataset-table mat-table mat-header-row").should("exist");

cy.finishedLoading();

cy.get('[data-cy="text-search"] input[type="search"]')
.clear()
.type("Cypress");

cy.isLoading();

cy.get("mat-row").contains("Cypress Dataset").click();

cy.isLoading();
cy.wrap(Object.values(customizedLabelSets)).each((value) => {
cy.get("body")
.find('[data-cy="section-label"], [data-cy="field-label"]')
.should("contain", value);
});
});

it("should order sections based on customized settings", () => {
cy.get(".dataset-table mat-table mat-header-row").should("exist");

cy.finishedLoading();

cy.get('[data-cy="text-search"] input[type="search"]')
.clear()
.type("Cypress");

cy.isLoading();

cy.get("mat-row").contains("Cypress Dataset").click();

cy.isLoading();
const sortedLabels = customizedComponents
.sort((a, b) => a.order - b.order)
.map((section) => section.label);

cy.wrap(sortedLabels).each((label, index) => {
cy.get('[data-cy="section-label"]')
.eq(index)
.should("contain", customizedLabelSets[label]);
});
});

it("should order fields based on customized settings", () => {
cy.get(".dataset-table mat-table mat-header-row").should("exist");

cy.finishedLoading();

cy.get('[data-cy="text-search"] input[type="search"]')
.clear()
.type("Cypress");

cy.isLoading();

cy.get("mat-row").contains("Cypress Dataset").click();

cy.isLoading();
const componentLabel = "Section Label Regular";
const sectionToTest = customizedComponents.find(
(section) => section.label === componentLabel,
);
cy.wrap(sectionToTest).should("not.be.undefined");

cy.wrap(sectionToTest.fields)
.then((fields) => fields.sort((a, b) => a.order - b.order))
.each((field, index) => {
cy.get('[data-cy="field-label"]')
.eq(index)
.should("contain", customizedLabelSets[field.source]);
});
});

it("should render attachments section with customized settings", () => {
cy.get(".dataset-table mat-table mat-header-row").should("exist");

cy.finishedLoading();

cy.get('[data-cy="text-search"] input[type="search"]')
.clear()
.type("Cypress");

cy.isLoading();

cy.get("mat-row").contains("Cypress Dataset").click();

cy.isLoading();
const componentLabel = "Section Label Attachments";
const sectionToTest = customizedComponents.find(
(section) => section.label === componentLabel,
);
const actualImageCount = 5;
const expectedImageCount = sectionToTest.options.limit;
const expectedSize = sectionToTest.options.size;

cy.get(".mat-mdc-tab-link").contains("Attachments").click();

cy.uploadDatasetAttachments(actualImageCount);

cy.isLoading();

cy.get(".mat-mdc-tab-link").contains("Details").click();

cy.get('[data-cy="section-label"]')
.contains(customizedLabelSets["Section Label Attachments"])
.parent()
.find("img")
.should("have.length", expectedImageCount)
.each(($img) => {
cy.wrap($img).should("have.attr", "class").and("contain", expectedSize);
});
});
});
2 changes: 1 addition & 1 deletion cypress/e2e/datasets/datasets-general.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ describe("Datasets general", () => {
});
});

describe.only("Dataset page filter and scientific condition UI test", () => {
describe("Dataset page filter and scientific condition UI test", () => {
it("should not be able to add duplicated conditions ", () => {
cy.visit("/datasets");

Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/datasets/datasets-metadata.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,13 +304,13 @@ describe("Datasets", () => {
cy.get(".unit-input")
.contains(`${metadataValidJson.unitSI}`)
.within(() => {
cy.get(".unit-input--warning").should("not.exist");
cy.get(".general-warning").should("not.exist");
});

cy.get(".unit-input")
.contains(`${metadataInvalidUnitValue}`)
.within(() => {
cy.get(".unit-input--warning").should("exist");
cy.get(".general-warning").should("exist");
});
});

Expand Down
Loading
Loading