Skip to content

Commit beea3ed

Browse files
Abdi AbdulleJunjiequan
authored andcommitted
added cypress test
1 parent 6634e7a commit beea3ed

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

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

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,4 +401,52 @@ describe("Datasets general", () => {
401401
});
402402
});
403403
});
404+
405+
describe("Scientific notation in condition panel test", () => {
406+
beforeEach(() => {
407+
cy.login(Cypress.env("username"), Cypress.env("password"));
408+
cy.createDataset({
409+
type: "raw",
410+
dataFileSize: "small",
411+
scientificMetadata: {
412+
extra_entry_end_time: { type: "number", value: 310000, unit: "" },
413+
},
414+
isPublished: true,
415+
});
416+
417+
cy.visit("/datasets");
418+
});
419+
it("should be able to add condition with scientific notation value", () => {
420+
421+
cy.get('[data-cy="scientific-condition-filter-list"]').within(() => {
422+
cy.get('[data-cy="add-condition-button"]').click();
423+
});
424+
425+
cy.get('input[name="lhs"]').type("extra_entry_end_time");
426+
427+
cy.get("mat-dialog-container").find('button[type="submit"]').click();
428+
429+
cy.get(".condition-panel").first().click();
430+
431+
cy.get(".condition-panel")
432+
.first()
433+
.within(() => {
434+
cy.get("mat-select").click();
435+
});
436+
437+
cy.get("mat-option").contains("=").click();
438+
439+
cy.get(".condition-panel")
440+
.first()
441+
.within(() => {
442+
cy.get("input[matInput]").eq(0).clear().type("3.1e4");
443+
});
444+
445+
cy.get('[data-cy="search-button"]').click();
446+
447+
cy.get(".dataset-table mat-table").should("exist");
448+
449+
cy.get('[data-cy="remove-condition-button"]').click();
450+
});
451+
})
404452
});

0 commit comments

Comments
 (0)