diff --git a/cypress/e2e/users_spec/UsersManage.cy.ts b/cypress/e2e/users_spec/UsersManage.cy.ts index 39075b8b96f..c7d237efb43 100644 --- a/cypress/e2e/users_spec/UsersManage.cy.ts +++ b/cypress/e2e/users_spec/UsersManage.cy.ts @@ -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); }); diff --git a/cypress/pageobject/Users/ManageUserPage.ts b/cypress/pageobject/Users/ManageUserPage.ts index 92e2008bfd8..24c056a70eb 100644 --- a/cypress/pageobject/Users/ManageUserPage.ts +++ b/cypress/pageobject/Users/ManageUserPage.ts @@ -193,19 +193,15 @@ 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) { - cy.get("#view-average_weekly_working_hours").should( - "contain.text", + cy.verifyContentPresence("#averageworkinghour-profile-details", [ expectedHours, - ); + ] as string[]); } navigateToManageUser() {