diff --git a/cypress/e2e/auth_spec/redirect.cy.ts b/cypress/e2e/auth_spec/redirect.cy.ts index ad319c74dc8..3d47ff3328b 100644 --- a/cypress/e2e/auth_spec/redirect.cy.ts +++ b/cypress/e2e/auth_spec/redirect.cy.ts @@ -12,21 +12,21 @@ describe("redirect", () => { it("Check if login redirects to the right url", () => { cy.awaitUrl("/resource/board", true); - loginPage.loginManuallyAsStaff(); + loginPage.loginAsDisctrictAdmin(); loginPage.CheckIfLoggedIn(); cy.url().should("include", "/resource/board"); }); it("Check if the redirect param works", () => { cy.awaitUrl("login?redirect=http://localhost:4000/resource/board", true); - loginPage.loginManuallyAsStaff(); + loginPage.loginAsDisctrictAdmin(); loginPage.CheckIfLoggedIn(); cy.url().should("include", "/resource/board"); }); it("Check to ensure that redirect is the same origin", () => { cy.awaitUrl("login?redirect=https://google.com", true); - loginPage.loginManuallyAsStaff(); + loginPage.loginAsDisctrictAdmin(); loginPage.CheckIfLoggedIn(); cy.url().should("include", "/facility"); }); diff --git a/cypress/pageobject/Login/LoginPage.ts b/cypress/pageobject/Login/LoginPage.ts index 322eb11d37a..2cc9839e0a7 100644 --- a/cypress/pageobject/Login/LoginPage.ts +++ b/cypress/pageobject/Login/LoginPage.ts @@ -14,8 +14,8 @@ class LoginPage { cy.loginByApi("staffdev", "Coronasafe@123"); } - loginManuallyAsStaff(): void { - cy.get("input[id='username']").type("staffdev"); + loginManuallyAsDistrictAdmin(): void { + cy.get("input[id='username']").type("devdistrictadmin"); cy.get("input[id='password']").type("Coronasafe@123"); cy.get("button").contains("Login").click(); }