Skip to content

Commit

Permalink
Merge branch 'develop' into doctor-notes-enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
UdaySagar-Git authored Dec 11, 2024
2 parents b910707 + 1f173e8 commit af5d5aa
Show file tree
Hide file tree
Showing 69 changed files with 5,212 additions and 2,894 deletions.
9 changes: 3 additions & 6 deletions cypress/e2e/users_spec/UsersCreation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe("User Creation", () => {
"Please enter valid phone number",
"Please enter the username",
"Please enter date in DD/MM/YYYY format",
"Please enter the password",
"Password is required",
"Confirm password is required",
"First Name is required",
"Last Name is required",
Expand Down Expand Up @@ -164,13 +164,10 @@ describe("User Creation", () => {
cy.verifyNotification("User added successfully");
userPage.typeInSearchInput(username);
userPage.checkUsernameText(username);
cy.verifyContentPresence("#name", [newUserFirstName]);
cy.verifyContentPresence(`#name-${username}`, [newUserFirstName]);
cy.verifyContentPresence("#role", [role]);
cy.verifyContentPresence("#district", [district]);
cy.verifyContentPresence("#home_facility", [homeFacility]);
cy.verifyContentPresence("#qualification", [qualification]);
cy.verifyContentPresence("#doctor-experience", [experience]);
cy.verifyContentPresence("#medical-council-registration", [regNo]);
cy.verifyContentPresence("#home-facility", [homeFacility]);
});

it("create new user form throwing mandatory field error", () => {
Expand Down
12 changes: 12 additions & 0 deletions cypress/e2e/users_spec/UsersHomepage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@ describe("User Homepage", () => {
pageNavigation.verifyCurrentPageNumber(1);
});

it("Switch to list view, search by username and verify the results", () => {
userPage.switchToListView();
userPage.verifyListView();
userPage.checkSearchInputVisibility();
userPage.typeInSearchInput(doctorUserName);
userPage.checkUrlForUsername(doctorUserName);
userPage.checkUsernameText(doctorUserName);
userPage.checkUsernameBadgeVisibility(true);
userPage.clearSearchInput();
userPage.verifyListView();
});

afterEach(() => {
cy.saveLocalStorage();
});
Expand Down
274 changes: 248 additions & 26 deletions cypress/e2e/users_spec/UsersManage.cy.ts

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions cypress/pageobject/Login/LoginPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ class LoginPage {
cy.clickSubmitButton("Login");
}

loginManuallyAsNurse(): void {
loginManuallyAsNurse(password?: string): void {
cy.get("input[id='username']").click().type("dummynurse1");
cy.get("input[id='password']").click().type("Coronasafe@123");
cy.get("input[id='password']")
.click()
.type(password || "Coronasafe@123");
cy.clickSubmitButton("Login");
}

Expand Down
Loading

0 comments on commit af5d5aa

Please sign in to comment.