From e29d5093209e65c936cbd683b9d3bf3533ee943a Mon Sep 17 00:00:00 2001 From: ailZhou Date: Mon, 7 Aug 2023 16:15:44 -0400 Subject: [PATCH] Update commands.js --- tests/cypress/support/commands.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/cypress/support/commands.js b/tests/cypress/support/commands.js index ec453d065..0830a7110 100644 --- a/tests/cypress/support/commands.js +++ b/tests/cypress/support/commands.js @@ -41,10 +41,10 @@ Cypress.Commands.add("authenticate", (userType, userCredentials) => { } else if (userType) { switch (userType) { case "adminUser": - credentials = "cms.admin@test.com"; + credentials = adminUser; break; case "stateUser": - credentials = "stateuser2@test.com"; + credentials = stateUser; break; case "reviewer": credentials = reviewer; @@ -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(); });