Skip to content

Commit

Permalink
Merge branch 'ohcnetwork:develop' into issue/ohcnetwork#9339/notice-card
Browse files Browse the repository at this point in the history
  • Loading branch information
AnveshNalimela authored Dec 11, 2024
2 parents 3d8ec40 + e89530d commit 46e2883
Show file tree
Hide file tree
Showing 68 changed files with 4,956 additions and 2,730 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cypress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
node-version: "22.11.0"

- name: Install dependencies 📦
run: npm run install-all
Expand Down
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
279 changes: 251 additions & 28 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 46e2883

Please sign in to comment.