Skip to content

Commit

Permalink
Facility creation error resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
Rishith25 committed Dec 14, 2024
1 parent 8f0b0f2 commit c951801
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions cypress/e2e/facility_spec/FacilityCreation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ describe("Facility Creation", () => {
facilityPage.fillLocationDetails(testFacilityData.location);
facilityPage.fillOxygenDetails(testFacilityData.oxygen);
facilityPage.submitForm();
cy.verifyNotification("Facility added successfully");
cy.closeNotification();
// add the bed capacity
facilityPage.selectBedType("Oxygen Supported Bed");
Expand Down
2 changes: 2 additions & 0 deletions cypress/pageobject/Facility/FacilityCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ class FacilityPage {
}

submitForm() {
cy.intercept("POST", "**/api/v1/facility/").as("postFacility");
cy.get("button#submit").click();
cy.wait("@postFacility").its("response.statusCode").should("eq", 201);
}

selectBedType(bedType: string) {
Expand Down

0 comments on commit c951801

Please sign in to comment.