From 09cfa2ccdc0889b40b4bead952b981e027558c8a Mon Sep 17 00:00:00 2001 From: JavidSumra Date: Fri, 27 Dec 2024 14:34:52 +0530 Subject: [PATCH] Fix cypress failing test --- cypress/pageobject/Facility/FacilityHome.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cypress/pageobject/Facility/FacilityHome.ts b/cypress/pageobject/Facility/FacilityHome.ts index e6abc4426ca..f9b9c69b456 100644 --- a/cypress/pageobject/Facility/FacilityHome.ts +++ b/cypress/pageobject/Facility/FacilityHome.ts @@ -16,9 +16,9 @@ class FacilityHome { }) .should("be.visible"); } else { - cy.get(`[data-testid="sidebar-text-${expectedText}"]`).should( - "not.be.visible", - ); + cy.get( + `[data-testid="sidebar-text-${expectedText.replace(" ", "-")}"]`, + ).should("not.be.visible"); } }