Skip to content

Commit

Permalink
increase wait
Browse files Browse the repository at this point in the history
  • Loading branch information
ailZhou committed Aug 17, 2023
1 parent 26870e4 commit 6cf521d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Cypress.Commands.add("logout", () => {
cy.wait(3000);
cy.get(headerDropdownMenu).click();
cy.get(logoutButton).click();
cy.wait(3000); // let logout settle
cy.wait(5000); // let logout settle
cy.visit("/");
});

Expand Down
6 changes: 4 additions & 2 deletions tests/cypress/tests/integration/login.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,29 @@ const headerDropdownMenu = "[data-testid='headerDropDownMenu']";

describe("CARTS Login Integration Tests", () => {
before(() => {
cy.wait(5000);
cy.visit("/");
});

it("Should authenticate as a State User", () => {
cy.authenticate("stateUser");
cy.get(headerDropdownMenu).click();
cy.get(logoutButton).click();
cy.wait(3000); // let logout settle
cy.wait(5000); // let logout settle
cy.visit("/");
});

it("Should authenticate as Admin User", () => {
cy.authenticate("adminUser");
cy.get(headerDropdownMenu).click();
cy.get(logoutButton).click();
cy.wait(3000); // let logout settle
cy.wait(5000); // let logout settle
cy.visit("/");
});

it("Should display Login screen after logging out", () => {
cy.location("pathname").should("match", /\//);
cy.wait(5000);
cy.get(cognitoLoginButton).should("be.visible");
});
});

0 comments on commit 6cf521d

Please sign in to comment.