Skip to content

Commit

Permalink
fix tests for new assets page
Browse files Browse the repository at this point in the history
  • Loading branch information
Pranshu1902 committed Feb 15, 2024
1 parent 0389cac commit cf5b39b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions cypress/e2e/facility_spec/locations.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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", () => {
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion cypress/pageobject/Facility/FacilityLocation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit cf5b39b

Please sign in to comment.