diff --git a/cypress/e2e/facility_spec/locations.cy.ts b/cypress/e2e/facility_spec/locations.cy.ts index b9bc9d1948f..bad772ac410 100644 --- a/cypress/e2e/facility_spec/locations.cy.ts +++ b/cypress/e2e/facility_spec/locations.cy.ts @@ -55,9 +55,7 @@ describe("Location Management Section", () => { cy.restoreLocalStorage(); cy.clearLocalStorage(/filters--.+/); cy.awaitUrl("/"); - facilityPage.visitAlreadyCreatedFacility(); - facilityPage.clickManageFacilityDropdown(); - facilityLocation.clickFacilityLocationManagement(); + facilityLocation.loadLocationManagementPage("Dummy Shifting Center"); }); it("Add a Bed to facility location along with duplication and deleting a bed", () => { @@ -238,7 +236,6 @@ describe("Location Management Section", () => { assetPage.createAsset(); assetPage.selectFacility("Dummy Shifting Center"); assetPage.selectLocation("Test Location with linked Assets"); - assetPage.selectAssetType("Internal"); assetPage.enterAssetDetails( "Test Asset linked to Facility", "Test Description", diff --git a/cypress/pageobject/Facility/FacilityLocation.ts b/cypress/pageobject/Facility/FacilityLocation.ts index 23036f4b08f..be14e9a8c81 100644 --- a/cypress/pageobject/Facility/FacilityLocation.ts +++ b/cypress/pageobject/Facility/FacilityLocation.ts @@ -2,7 +2,7 @@ class FacilityLocation { loadLocationManagementPage(name: string) { cy.awaitUrl("/"); cy.intercept("GET", "**/api/v1/facility/**").as("getFacilities"); - cy.get("[id='facility-details']").contains(name).click(); + cy.get("[id='facility-name-card']").contains(name).click(); cy.wait("@getFacilities").its("response.statusCode").should("eq", 200); cy.get("h1.text-3xl.font-bold", { timeout: 10000 }).should("be.visible"); cy.get("#manage-facility-dropdown button").should("be.visible");