Skip to content

Commit

Permalink
improve test reliability
Browse files Browse the repository at this point in the history
  • Loading branch information
gmrabian committed May 10, 2024
1 parent 467d2a5 commit 3cc749a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/cypress/support/authentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ Cypress.Commands.add("navigateToHomePage", () => {
if (cy.location("pathname") !== "/") cy.visit("/");
});

Cypress.Commands.add("clearSession", () => {
cy.session([], () => {});
});

Cypress.Commands.add("authenticate", (userType, userCredentials) => {
//Defeats the purpose of sessions, but does improve performance when switching between users
Cypress.session.clearAllSavedSessions();
cy.session([userType, userCredentials], () => {
cy.visit("/");
cy.wait(2000);
Expand Down
2 changes: 2 additions & 0 deletions tests/cypress/tests/e2e/mcpar/form.stepdef.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ When("I try to submit an incomplete {string} program", (form) => {
const template = templateMap[form];
traverseRoutes([template.routes[0]]);

//Finish loading the form route before moving to review and submit
cy.wait(1000);
cy.get('a[href*="review-and-submit"]').click();
});

Expand Down

0 comments on commit 3cc749a

Please sign in to comment.