Skip to content
Open
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1e74696
wip: for now findbyId, findAll and count has been changed to v4
abdimo101 May 18, 2026
6c4ce27
wip: creating dataset has been changed to v4
abdimo101 May 20, 2026
16d26e5
calling public endpoints for unauthenticated users
abdimo101 May 28, 2026
509434a
eslint fix
abdimo101 May 28, 2026
c01c30d
fixed tests
abdimo101 May 28, 2026
234bb7b
Merge branch 'master' into change-dataset-endpoints-to-v4
abdimo101 May 28, 2026
d89d231
wip: fixed cypress tests, updated cypress commands, replaced old Dtos…
abdimo101 Jun 1, 2026
4ab6691
Merge branch 'master' into change-dataset-endpoints-to-v4
abdimo101 Jun 1, 2026
29dc498
eslint fix
abdimo101 Jun 1, 2026
940ffaf
wip: tests fix
abdimo101 Jun 1, 2026
021f93a
wip: e2e test fix
abdimo101 Jun 1, 2026
bd7687a
Merge branch 'change-dataset-endpoints-to-v4' of github.com:SciCatPro…
abdimo101 Jun 1, 2026
d0c1048
replaced fullfacet and findbyidandupdate v3 to v4, fixed some test er…
abdimo101 Jun 3, 2026
97e0bbc
Merge branch 'master' into change-dataset-endpoints-to-v4
abdimo101 Jun 3, 2026
113e082
wip: tests fix
abdimo101 Jun 3, 2026
ac614ee
wip: e2e tests fix
abdimo101 Jun 3, 2026
c62b5be
Merge branch 'change-dataset-endpoints-to-v4' of github.com:SciCatPro…
abdimo101 Jun 3, 2026
4dd1d38
temporarily skipping metadata tests since datasets v4 controller does…
abdimo101 Jun 3, 2026
62fcc0d
fixed a bug that would not accept decimals inside range values & adde…
abdimo101 Jun 22, 2026
b35065c
implemented scientific metadata query for findAllV4
abdimo101 Jun 22, 2026
e28660e
Merge branch 'master' into change-dataset-endpoints-to-v4
abdimo101 Jun 22, 2026
b058964
removed debug logs
abdimo101 Jun 22, 2026
a679cee
Merge branch 'change-dataset-endpoints-to-v4' of github.com:SciCatPro…
abdimo101 Jun 22, 2026
26d55d2
fixed post-mergeconflict syntax error in e2e file
abdimo101 Jun 22, 2026
576a383
copilot review changes
abdimo101 Jun 24, 2026
10b810c
unit tests fix
abdimo101 Jun 24, 2026
e7b03c5
Merge branch 'master' into change-dataset-endpoints-to-v4
abdimo101 Jun 29, 2026
1c67624
small type fix
abdimo101 Jun 29, 2026
4a9ed95
Merge branch 'master' into change-dataset-endpoints-to-v4
abdimo101 Jun 30, 2026
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
2 changes: 1 addition & 1 deletion cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { defineConfig } from "cypress";

export default defineConfig({
env: {
baseUrl: "http://localhost:3000/api/v3",
baseUrl: "http://localhost:3000/api",
loginEndpoint: "/auth/login",
tokenPrefix: "Bearer",
username: "admin",
Expand Down
41 changes: 39 additions & 2 deletions cypress/e2e/datasets/datasets-general.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe("Datasets general", () => {
cy.createDataset({
type: "raw",
dataFileSize: "small",
proposalId,
proposalIds: [proposalId],
});
cy.visit("/datasets");

Expand Down Expand Up @@ -114,7 +114,7 @@ describe("Datasets general", () => {
unit: "celsius",
human_name: "Temperature Human Name",
},
test_number: { type: "number", value: 5, unit: "" },
test_number: { type: "number", value: 5, unit: "km" },
test_string: { type: "string", value: "hello", unit: "" },
},
isPublished: true,
Expand Down Expand Up @@ -295,6 +295,7 @@ describe("Datasets general", () => {
.first()
.within(() => {
cy.get("input[matInput]").eq(0).clear().type("5");
cy.get("input[matInput]").eq(1).clear().type("km");
});

cy.get(".condition-panel")
Expand Down Expand Up @@ -363,6 +364,42 @@ describe("Datasets general", () => {

cy.get('[data-cy="remove-condition-button"]').click();
});

it("should be able to add a condition with range values that contains decimals", () => {
cy.visit("/datasets");

cy.get('[data-cy="scientific-condition-filter-list"]').within(() => {
cy.get('[data-cy="add-condition-button"]').click();
});

cy.get('input[name="lhs"]').type("temperature");

cy.get("mat-dialog-container").find('button[type="submit"]').click();

cy.get(".condition-panel").first().click();

cy.get(".condition-panel")
.first()
.within(() => {
cy.get("mat-select").click();
});

cy.get("mat-option").contains("is in range").click();

cy.get(".condition-panel")
.first()
.within(() => {
cy.get("input[matInput]").eq(0).clear().type("24.5");
cy.get("input[matInput]").eq(1).clear().type("25.5");
cy.get("input[matInput]").eq(2).clear().type("celcius");
});
Comment thread
abdimo101 marked this conversation as resolved.

cy.get('[data-cy="filter-search-button"]').click();

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

cy.get('[data-cy="remove-condition-button"]').click();
});

it("should search a metadata key when pressing Enter", () => {
cy.readFile("CI/e2e/frontend.config.e2e.json").then((baseConfig) => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/datasets/datasets-keyword.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ describe("Datasets", () => {
beforeEach(() => {
cy.login(Cypress.env("username"), Cypress.env("password"));

cy.intercept("PATCH", "/api/v3/datasets/**/*").as("keyword");
cy.intercept("PATCH", "/api/v4/datasets/**/*").as("keyword");
cy.intercept("GET", "*").as("fetch");
});

Expand Down
5 changes: 3 additions & 2 deletions cypress/e2e/datasets/datasets-metadata.cy.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
describe("Datasets", () => {
describe.skip("Datasets", () => {
// Skipped: Backend Datasets V4 controller does not yet support scientific metadata key encoding/decoding
const metadataName = "some name";
const metadataValue = "some value";
const metadataValidJson = {
Expand All @@ -12,7 +13,7 @@ describe("Datasets", () => {
beforeEach(() => {
cy.login(Cypress.env("username"), Cypress.env("password"));

cy.intercept("PATCH", "/api/v3/datasets/**/*").as("metadata");
cy.intercept("PATCH", "/api/v4/datasets/**/*").as("metadata");
cy.intercept("GET", "*").as("fetch");
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/datasets/datasets-public.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ describe("Datasets", () => {

cy.createDataset({ type: "raw" });

cy.intercept("PATCH", "/api/v3/datasets/**/*").as("change");
cy.intercept("PATCH", "/api/v4/datasets/**/*").as("change");
cy.intercept("GET", "*").as("fetch");
});

Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/mainPage/main-page.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ describe("Main Page", () => {
type: "raw",
dataFileSize: "small",
datasetName: "Main Page Dataset Public",
proposalId: "20150729",
proposalIds: ["20150729"],
isPublished: true,
});
cy.createDataset({
type: "raw",
dataFileSize: "small",
datasetName: "Main Page Dataset Non Public",
proposalId: "20150729",
proposalIds: ["20150729"],
isPublished: true,
});
});
Expand Down
7 changes: 3 additions & 4 deletions cypress/fixtures/testData.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const testData = {
isPublished: false,
},
rawDataset: {
principalInvestigator: "string",
principalInvestigators: ["string"],
endTime: "2019-10-31T14:44:46.143Z",
creationLocation: "Cypress",
dataFormat: "Nexus Version x.y",
Expand All @@ -109,12 +109,11 @@ export const testData = {
datasetName: "Cypress Dataset",
classification: "AV=medium,CO=low",
license: "string",
version: "string",
isPublished: false,
ownerGroup: "ess",
accessGroups: [],
sampleId: "string",
proposalId: "20170266",
sampleIds: ["string"],
proposalIds: ["20170266"],
datasetlifecycle: {
archivable: true,
retrievable: false,
Expand Down
Loading
Loading