Skip to content

Commit

Permalink
fixed the user management flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
nihal467 committed Dec 11, 2024
1 parent 113dddd commit 40ea811
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions cypress/e2e/users_spec/UsersManage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ describe("Manage User", () => {
manageUserPage.clickSubmit();
// verify the data is reflected in the page
manageUserPage.verifyWorkingHours(workinghour);
manageUserPage.navigateToProfile();
manageUserPage.verifyProfileWorkingHours(workinghour);
});

Expand Down
7 changes: 2 additions & 5 deletions cypress/pageobject/Users/ManageUserPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,9 @@ export class ManageUserPage {
}

verifyWorkingHours(expectedHours: string) {
cy.get("input[name='weekly_working_hours']").scrollIntoView();
cy.get("input[name='weekly_working_hours']").should("be.visible");
cy.get("input[name='weekly_working_hours']").should(
"have.value",
cy.verifyContentPresence("#view-average_weekly_working_hours", [
expectedHours,
);
] as string[]);
}

verifyProfileWorkingHours(expectedHours: string) {
Expand Down

0 comments on commit 40ea811

Please sign in to comment.