Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nihal467 committed Dec 4, 2023
1 parent 8876e57 commit e5be748
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions cypress/e2e/facility_spec/facility_creation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ describe("Facility Creation", () => {
cy.get("[role='option']").contains(featureText).click();
});
facilityPage.fillPincode("682001");
facilityPage.selectState("Kerala");
facilityPage.selectDistrict("Ernakulam");
facilityPage.selectLocalBody("Aluva");
facilityPage.selectWard("4");
facilityPage.fillAddress(facilityAddress);
Expand Down Expand Up @@ -144,23 +142,17 @@ describe("Facility Creation", () => {
facilityPage.visitCreateFacilityPage();
facilityPage.fillFacilityName(facilityName);
facilityPage.fillPincode("682001");
facilityPage.selectState("Kerala");
facilityPage.selectDistrict("Ernakulam");
facilityPage.selectLocalBody("Aluva");
facilityPage.selectWard("4");
facilityPage.fillAddress(facilityAddress);
facilityPage.fillPhoneNumber(facilityNumber);
facilityPage.submitForm();
// add the bed capacity and verify form error message
facilityPage.saveAndExitBedCapacityForm();
userCreationPage.verifyErrorMessages(bedErrorMessage);
// add the bed capacity
facilityPage.selectBedType("Oxygen beds");
facilityPage.fillTotalCapacity(oxygenCapacity);
facilityPage.fillCurrentlyOccupied(oxygenExpected);
facilityPage.saveAndExitBedCapacityForm();
// add the doctor capacity and verify form error message
facilityPage.saveAndExitDoctorForm();
userCreationPage.verifyErrorMessages(doctorErrorMessage);
// add the doctor capacity
facilityPage.selectAreaOfSpecialization("General Medicine");
facilityPage.fillDoctorCount(doctorCapacity);
facilityPage.saveAndExitDoctorForm();
Expand All @@ -187,18 +179,20 @@ describe("Facility Creation", () => {
facilityPage.visitCreateFacilityPage();
facilityPage.fillFacilityName(facilityName);
facilityPage.fillPincode("682001");
facilityPage.selectState("Kerala");
facilityPage.selectDistrict("Ernakulam");
facilityPage.selectLocalBody("Aluva");
facilityPage.selectWard("4");
facilityPage.fillAddress(facilityAddress);
facilityPage.fillPhoneNumber(facilityNumber);
facilityPage.submitForm();
// add no bed capacity
// add no bed capacity and verify form error message
facilityPage.isVisibleselectBedType();
facilityPage.saveAndExitBedCapacityForm();
userCreationPage.verifyErrorMessages(bedErrorMessage);
facilityPage.clickcancelbutton();
// add no doctor capacity
// add no doctor capacity and verify form error message
facilityPage.isVisibleAreaOfSpecialization();
facilityPage.saveAndExitDoctorForm();
userCreationPage.verifyErrorMessages(doctorErrorMessage);
facilityPage.clickcancelbutton();
cy.url().then((newUrl) => {
facilityUrl1 = newUrl;
Expand Down

0 comments on commit e5be748

Please sign in to comment.