Skip to content

Commit

Permalink
Update commands.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ailZhou committed Aug 7, 2023
1 parent 2c2c7a4 commit e29d509
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ Cypress.Commands.add("authenticate", (userType, userCredentials) => {
} else if (userType) {
switch (userType) {
case "adminUser":
credentials = "[email protected]";
credentials = adminUser;
break;
case "stateUser":
credentials = "[email protected]";
credentials = stateUser;
break;
case "reviewer":
credentials = reviewer;
Expand All @@ -55,8 +55,8 @@ Cypress.Commands.add("authenticate", (userType, userCredentials) => {
} else {
throw new Error("Must specify either userType or userCredentials.");
}
cy.xpath(emailForCognito).type(credentials);
cy.xpath(passwordForCognito).type("Dm!H@wP2YBdQ");
cy.xpath(emailForCognito).type(credentials.email);
cy.xpath(passwordForCognito).type(credentials.password);
cy.get('[data-cy="login-with-cognito-button"]').click();
});

Expand Down

0 comments on commit e29d509

Please sign in to comment.