diff --git a/cypress/e2e/facility_spec/FacilityHomepage.cy.ts b/cypress/e2e/facility_spec/FacilityHomepage.cy.ts index f6e0c1759e..05a1d4ccdf 100644 --- a/cypress/e2e/facility_spec/FacilityHomepage.cy.ts +++ b/cypress/e2e/facility_spec/FacilityHomepage.cy.ts @@ -166,7 +166,7 @@ describe("Facility Homepage Function", () => { facilityNotify.verifyGetNotificationReq(); cy.verifyContentPresence("#notification-message", [noitificationMessage]); facilityNotify.interceptGetNotificationReq(); - cy.verifyAndClickElement("#notification-slide-btn", "Notifications"); + facilityNotify.openNotificationSlide(); facilityNotify.verifyGetNotificationReq(); cy.verifyContentPresence("#notification-slide-msg", [noitificationMessage]); }); diff --git a/cypress/pageobject/Facility/FacilityNotify.ts b/cypress/pageobject/Facility/FacilityNotify.ts index c0f7d54f4f..590ce2d425 100644 --- a/cypress/pageobject/Facility/FacilityNotify.ts +++ b/cypress/pageobject/Facility/FacilityNotify.ts @@ -3,6 +3,10 @@ export class FacilityNotify { cy.get("#NotifyModalMessageInput").should("be.visible").type(message); } + openNotificationSlide(): void { + cy.get("#notification-slide-btn").should("be.visible").click(); + } + visitNoticeBoard(): void { cy.get("a[href='/notice_board']").should("be.visible").click(); }