Skip to content

Commit

Permalink
Merge branch 'develop' into shift-details-tab-enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahendar0701 committed Dec 16, 2024
2 parents 3ec979f + 96bc802 commit 034fd4b
Show file tree
Hide file tree
Showing 41 changed files with 484 additions and 3,040 deletions.
374 changes: 62 additions & 312 deletions cypress/e2e/facility_spec/FacilityCreation.cy.ts

Large diffs are not rendered by default.

18 changes: 0 additions & 18 deletions cypress/e2e/facility_spec/FacilityHomepage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ describe("Facility Homepage Function", () => {
const patientPage = new PatientPage();
const facilityLocation = new FacilityLocation();
const facilitiesAlias = "downloadFacilitiesCSV";
const doctorsAlias = "downloadDoctorsCSV";
const triagesAlias = "downloadTriagesCSV";
const facilityName = "Dummy Facility 40";
const facilityLocaion = "Dummy Location";
const stateName = "Kerala";
Expand Down Expand Up @@ -118,23 +116,7 @@ describe("Facility Homepage Function", () => {
// Verify Facility Export
facilityHome.csvDownloadIntercept(facilitiesAlias, "");
facilityHome.clickExportButton();
facilityHome.clickMenuItem("Facilities");
facilityHome.verifyDownload(facilitiesAlias);
// Verify Doctor Export
facilityHome.csvDownloadIntercept(doctorsAlias, "&doctors");
facilityHome.clickExportButton();
facilityHome.clickMenuItem("Doctors");
facilityHome.verifyDownload(doctorsAlias);
// Verify Triage Export
facilityHome.csvDownloadIntercept(triagesAlias, "&triage");
facilityHome.clickExportButton();
facilityHome.clickMenuItem("Triages");
facilityHome.verifyDownload(triagesAlias);
});

it("Verify Capacity Export Functionality", () => {
facilityHome.clickExportButton();
facilityHome.clickMenuItem("Capacities");
});

it("Verify Facility Detail page redirection to CNS and Live Minitoring ", () => {
Expand Down
64 changes: 0 additions & 64 deletions cypress/e2e/facility_spec/FacilityManage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ describe("Facility Manage Functions", () => {
/Health Facility config updated successfully|Health ID registration failed/;
const facilityHfrId = "IN180000018";
const facilityUpdatedHfrId = "IN180000020";
const doctorCapacity = "5";
const doctorModifiedCapacity = "7";
const totalCapacity = "100";
const currentOccupied = "80";
const totalUpdatedCapacity = "120";
const currentUpdatedOccupied = "100";

before(() => {
loginPage.loginByRole("districtAdmin");
Expand Down Expand Up @@ -116,64 +110,6 @@ describe("Facility Manage Functions", () => {
facilityManage.verifyHfrIdValue(facilityUpdatedHfrId);
});

it("Modify doctor capacity in Facility detail page", () => {
// Add a doctor capacity
facilityManage.clickFacilityAddDoctorTypeButton();
facilityPage.selectAreaOfSpecialization("Pulmonology");
facilityPage.fillDoctorCount(doctorCapacity);
facilityPage.saveAndExitDoctorForm();
facilityManage.verifySuccessMessageVisibilityAndContent(
"Staff count added successfully",
);
facilityManage.verifyTotalDoctorCapacity(doctorCapacity);
// edit a existing doctor
facilityManage.clickEditFacilityDoctorCapacity();
facilityPage.fillDoctorCount(doctorModifiedCapacity);
facilityPage.clickdoctorcapacityaddmore();
facilityManage.verifySuccessMessageVisibilityAndContent(
"Staff count updated successfully",
);
facilityManage.verifyTotalDoctorCapacity(doctorModifiedCapacity);
// delete a bed
facilityManage.clickDeleteFacilityDoctorCapacity();
facilityManage.clickButtonWithText("Delete");
facilityManage.verifySuccessMessageVisibilityAndContent(
"Staff specialization type deleted successfully",
);
});

it("Modify bed capacity in Facility detail page", () => {
// add multiple new bed capacity
facilityManage.clickFacilityAddBedTypeButton();
facilityPage.selectBedType("Isolation Bed");
facilityPage.fillTotalCapacity(totalCapacity);
facilityPage.fillCurrentlyOccupied(currentOccupied);
facilityPage.saveAndExitBedCapacityForm();
facilityManage.verifySuccessMessageVisibilityAndContent(
"Bed capacity added successfully",
);
cy.closeNotification();
facilityManage.verifyFacilityBedCapacity(totalCapacity);
facilityManage.verifyFacilityBedCapacity(currentOccupied);
// edit a existing bed
facilityManage.clickEditFacilityBedCapacity();
facilityPage.fillTotalCapacity(totalUpdatedCapacity);
facilityPage.fillCurrentlyOccupied(currentUpdatedOccupied);
facilityPage.clickbedcapcityaddmore();
facilityManage.verifySuccessMessageVisibilityAndContent(
"Bed capacity updated successfully",
);
cy.closeNotification();
facilityManage.verifyFacilityBedCapacity(totalUpdatedCapacity);
facilityManage.verifyFacilityBedCapacity(currentUpdatedOccupied);
// delete a bed
facilityManage.clickDeleteFacilityBedCapacity();
facilityManage.clickButtonWithText("Delete");
facilityManage.verifySuccessMessageVisibilityAndContent(
"Bed type deleted successfully",
);
});

afterEach(() => {
cy.saveLocalStorage();
});
Expand Down
4 changes: 0 additions & 4 deletions cypress/e2e/patient_spec/PatientHomepage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ describe("Patient Homepage present functionalities", () => {
patientHome.verifyPatientAdmittedBeforeDate(patientToDateBadge);
patientHome.verifyPatientAdmittedAfterDate(patientFromDateBadge);
cy.clearAllFilters();
patientHome.verifyTotalPatientCount("1");
});

it("Facility Geography based advance filters applied in the patient tab", () => {
Expand All @@ -71,7 +70,6 @@ describe("Patient Homepage present functionalities", () => {
patientHome.verifyFacilityLsgBadgeContent(facilityLsgBody);
patientHome.verifyFacilityDistrictContent(facilityDistrict);
cy.clearAllFilters();
patientHome.verifyTotalPatientCount("1");
});

it("Patient diagnosis based advance filters applied in the patient tab", () => {
Expand Down Expand Up @@ -104,7 +102,6 @@ describe("Patient Homepage present functionalities", () => {
patientHome.verifyDifferentialDiagnosisBadgeContent(patientIcdDiagnosis);
// Clear the badges and verify the patient count along with badges
cy.clearAllFilters();
patientHome.verifyTotalPatientCount("1");
// Apply Any and confirmed diagonsis to verify patient count 17
advanceFilters.clickAdvancedFiltersButton();
patientHome.selectAnyIcdDiagnosis(patientIcdDiagnosis, patientIcdDiagnosis);
Expand Down Expand Up @@ -142,7 +139,6 @@ describe("Patient Homepage present functionalities", () => {
patientHome.verifyMedicoBadgeContent("false");
// Clear the badges and verify the patient count along with badges
cy.clearAllFilters();
patientHome.verifyTotalPatientCount("1");
});

it("Export the live patient list based on a date range", () => {
Expand Down
8 changes: 5 additions & 3 deletions cypress/e2e/resource_spec/ResourcesHomepage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ describe("Resource Page", () => {
beforeEach(() => {
cy.restoreLocalStorage();
cy.clearLocalStorage(/filters--.+/);
cy.awaitUrl("/resource");
});

it("Checks if all download button works", () => {
resourcePage.navigationToResourcePage();
resourcePage.verifyDownloadButtonWorks();
});

it("Switch between active/completed", () => {
resourcePage.navigationToResourcePage();
resourcePage.spyResourceApi();
resourcePage.clickCompletedResources();
resourcePage.verifyCompletedResources();
Expand All @@ -37,6 +38,7 @@ describe("Resource Page", () => {
});

it("Switch between list view and board view", () => {
resourcePage.navigationToResourcePage();
resourcePage.clickListViewButton();
resourcePage.clickBoardViewButton();
});
Expand Down Expand Up @@ -68,7 +70,7 @@ describe("Resource Page", () => {
});

it("Update the status of resource", () => {
cy.visit(createdResource);
cy.awaitUrl(createdResource);
resourcePage.clickUpdateStatus();
resourcePage.updateStatus("APPROVED");
resourcePage.clickSubmitButton();
Expand All @@ -78,7 +80,7 @@ describe("Resource Page", () => {
});

it("Post comment for a resource", () => {
cy.visit(createdResource);
cy.awaitUrl(createdResource);
resourcePage.addCommentForResource("Test comment");
resourcePage.clickPostCommentButton();
resourcePage.verifySuccessNotification("Comment added successfully");
Expand Down
Loading

0 comments on commit 034fd4b

Please sign in to comment.