forked from ohcnetwork/care_fe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into issues/8470/config-validation
- Loading branch information
Showing
38 changed files
with
642 additions
and
3,629 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import LoginPage from "pageobject/Login/LoginPage"; | ||
|
||
const loginPage = new LoginPage(); | ||
const userName = "dummy_user_1"; | ||
const forgotPasswordHeading = "Forgot password?"; | ||
|
||
describe("User login workflow with correct and incorrect passwords", () => { | ||
beforeEach(() => { | ||
cy.awaitUrl("/", true); | ||
}); | ||
|
||
it("Log in as admin with correct password", () => { | ||
loginPage.loginManuallyAsDistrictAdmin(); | ||
loginPage.interceptFacilityReq(); | ||
loginPage.verifyFacilityReq(); | ||
loginPage.ensureLoggedIn(); | ||
loginPage.clickSignOutBtn(); | ||
loginPage.verifyLoginPageUrl(); | ||
}); | ||
|
||
it("Display an error when logging in as admin with incorrect password", () => { | ||
loginPage.interceptLoginReq(); | ||
loginPage.loginManuallyAsDistrictAdmin(false); | ||
loginPage.verifyLoginReq(); | ||
cy.verifyNotification("No active account found with the given credentials"); | ||
cy.closeNotification(); | ||
}); | ||
}); | ||
|
||
describe("Reset user's password using email", () => { | ||
beforeEach(() => { | ||
cy.awaitUrl("/", true); | ||
}); | ||
|
||
it("Send a password reset link and navigate back to the login page", () => { | ||
loginPage.clickForgotPasswordButton(forgotPasswordHeading); | ||
loginPage.verifyForgotPasswordHeading([forgotPasswordHeading]); | ||
loginPage.fillUserNameInForgotPasswordForm(userName); | ||
loginPage.interceptResetLinkReq(); | ||
loginPage.clickSendResetLinkBtn(); | ||
loginPage.verifyResetLinkReq(); | ||
cy.verifyNotification("Password Reset Email Sent"); | ||
cy.closeNotification(); | ||
loginPage.clickBackButton(); | ||
loginPage.verifyLoginPageUrl(); | ||
loginPage.verifyLoginButtonPresence(); | ||
}); | ||
}); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.