Skip to content

Commit

Permalink
Change e2e container test case (merge commit)
Browse files Browse the repository at this point in the history
Merge branch 'test/e2e-test-container' into 'main'
* Change e2e container test case

Closes #1251
See merge request https://gitlab.ci.csc.fi/sds-dev/sd-connect/swift-browser-ui/-/merge_requests/379

Approved-by: Monika Radaviciute <[email protected]>
Co-authored-by: Mariia <[email protected]>
Merged by Joonatan Mäkinen <[email protected]>
  • Loading branch information
Joonatan Mäkinen committed Nov 26, 2024
2 parents 6556e89 + 6a96c3a commit baace6c
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions tests/cypress/integration/container.cy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//container

describe("Create a container", function () {

beforeEach(() => {
cy.task("resetDB");
cy.deleteDB();
Expand All @@ -10,7 +9,6 @@ describe("Create a container", function () {
});

it("Creates a container with a random unique name and deletes it", () => {

//create a unique name
const folderName = Math.random().toString(36).substring(2, 7);

Expand Down Expand Up @@ -49,9 +47,7 @@ describe("Create a container", function () {
//check the folder 1 exists with search field
cy.searchFolder(nameOne);
cy.wait(3000);
cy.get("[data-testid='search-result']")
.contains(nameOne)
.should("exist");
cy.get("[data-testid='search-result']").contains(nameOne).should("exist");

cy.addFolder(nameTwo);
cy.reload();
Expand All @@ -60,9 +56,7 @@ describe("Create a container", function () {
//check the folder 2 exists with search field
cy.searchFolder(nameTwo);
cy.wait(3000);
cy.get("[data-testid='search-result']")
.contains(nameTwo)
.should("exist");
cy.get("[data-testid='search-result']").contains(nameTwo).should("exist");

//check there are multiple folders in the project
cy.get("[data-testid='container-table']")
Expand All @@ -84,9 +78,6 @@ describe("Create a container", function () {
cy.addFolder(folderName);

//folder name input field should have a validation error
cy.get("[data-testid='create-folder-modal']")
.find("c-message")
.should("be.visible");
cy.get("[data-testid='cancel-save-folder']").click();
cy.get("#error-newFolder-input_1").should("be.visible");
});
});

0 comments on commit baace6c

Please sign in to comment.