Skip to content

Commit

Permalink
Collect postpartum data (#6993)
Browse files Browse the repository at this point in the history
* Collect postpartum data

* Make is_postpartum a frontend only field and fix validtion issue

* Typo fix

* fix failing test: type last menstruation date

* show post partum badge in patient details page

* show perinatal status in consultation dashboard

* fix cypress

* reverse the diff check for post partum and antenatal checks

* hide antental filters

---------

Co-authored-by: rithviknishad <[email protected]>
Co-authored-by: Mohammed Nihal <[email protected]>
  • Loading branch information
3 people authored May 8, 2024
1 parent d567d2b commit 5c4c8b3
Show file tree
Hide file tree
Showing 29 changed files with 350 additions and 144 deletions.
10 changes: 5 additions & 5 deletions cypress/e2e/assets_spec/assets_creation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe("Asset", () => {
"Vendor's Name",
serialNumber,
"25122021",
"Test note for asset creation!"
"Test note for asset creation!",
);

assetPage.clickCreateAddMore();
Expand All @@ -80,7 +80,7 @@ describe("Asset", () => {
"Vendor's Name",
serialNumber,
"25122021",
"Test note for asset creation!"
"Test note for asset creation!",
);

assetPage.interceptAssetCreation();
Expand All @@ -106,7 +106,7 @@ describe("Asset", () => {
"Customer Support's Name Edited",
"Vendor's Name Edited",
"Test note for asset creation edited!",
"25122021"
"25122021",
);

assetPage.clickUpdateAsset();
Expand All @@ -128,7 +128,7 @@ describe("Asset", () => {
"192.168.1.64",
"remote_user",
"2jCkrCRSeahzKEU",
"d5694af2-21e2-4a39-9bad-2fb98d9818bd"
"d5694af2-21e2-4a39-9bad-2fb98d9818bd",
);
assetPage.clickConfigureAsset();
assetPage.verifyAssetConfiguration(200);
Expand All @@ -155,7 +155,7 @@ describe("Asset", () => {
"Vendor's Name",
serialNumber,
"25122021",
"Test note for asset creation!"
"Test note for asset creation!",
);
assetPage.interceptAssetCreation();
assetPage.clickCreateAsset();
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/facility_spec/facility_creation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ describe("Facility Creation", () => {
initialTriageValue,
initialTriageValue,
initialTriageValue,
initialTriageValue
initialTriageValue,
);
manageUserPage.clickSubmit();
// edit the entry and verify reflection
Expand All @@ -106,7 +106,7 @@ describe("Facility Creation", () => {
modifiedTriageValue,
modifiedTriageValue,
modifiedTriageValue,
modifiedTriageValue
modifiedTriageValue,
);
manageUserPage.clickSubmit();
facilityPage.scrollToFacilityTriage();
Expand Down Expand Up @@ -318,7 +318,7 @@ describe("Facility Creation", () => {
facilityPage.fillMiddleWareAddress("dev_middleware.coronasafe.live");
facilityPage.clickupdateMiddleWare();
facilityPage.verifySuccessNotification(
"Facility middleware updated successfully"
"Facility middleware updated successfully",
);
});

Expand Down
24 changes: 12 additions & 12 deletions cypress/e2e/facility_spec/facility_manage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ describe("Facility Manage Functions", () => {
// verify mandatory field error message
facilityManage.clickButtonWithText(facilityMiddlewareUpdateButton);
facilityManage.checkErrorMessageVisibility(
"Middleware Address is required"
"Middleware Address is required",
);
// add middleware and verify the notification
facilityManage.typeMiddlewareAddress(facilityMiddleware);
facilityManage.clickButtonWithText(facilityMiddlewareUpdateButton);
facilityManage.verifySuccessMessageVisibilityAndContent(
facilityMiddlewareSuccessfullNotification
facilityMiddlewareSuccessfullNotification,
);
// update the existing middleware
facilityPage.clickManageFacilityDropdown();
Expand All @@ -68,7 +68,7 @@ describe("Facility Manage Functions", () => {
facilityManage.typeMiddlewareAddress(facilityUpdatedMiddleware);
facilityManage.clickButtonWithText(facilityMiddlewareUpdateButton);
facilityManage.verifySuccessMessageVisibilityAndContent(
facilityMiddlewareSuccessfullNotification
facilityMiddlewareSuccessfullNotification,
);
// verify the updated middleware
facilityPage.clickManageFacilityDropdown();
Expand All @@ -83,21 +83,21 @@ describe("Facility Manage Functions", () => {
facilityManage.clearHfrId();
facilityManage.clickButtonWithText(facilityHfridUpdateButton);
facilityManage.checkErrorMessageVisibility(
"Health Facility Id is required"
"Health Facility Id is required",
);
// add facility health ID and verify notification
facilityManage.typeHfrId(facilityHfrId);
facilityManage.clickButtonWithText(facilityHfridUpdateButton);
facilityManage.verifySuccessMessageVisibilityAndContent(
facilityHfridToastNotificationText
facilityHfridToastNotificationText,
);
// update the existing middleware
facilityPage.clickManageFacilityDropdown();
facilityManage.clickFacilityConfigureButton();
facilityManage.typeHfrId(facilityUpdatedHfrId);
facilityManage.clickButtonWithText(facilityHfridUpdateButton);
facilityManage.verifySuccessMessageVisibilityAndContent(
facilityHfridToastNotificationText
facilityHfridToastNotificationText,
);
// verify its reflection
facilityPage.clickManageFacilityDropdown();
Expand All @@ -112,22 +112,22 @@ describe("Facility Manage Functions", () => {
facilityPage.fillDoctorCount(doctorCapacity);
facilityPage.saveAndExitDoctorForm();
facilityManage.verifySuccessMessageVisibilityAndContent(
"Doctor count added successfully"
"Doctor count added successfully",
);
facilityManage.verifyTotalDoctorCapacity(doctorCapacity);
// edit a existing doctor
facilityManage.clickEditFacilityDoctorCapacity();
facilityPage.fillDoctorCount(doctorModifiedCapacity);
facilityPage.clickdoctorcapacityaddmore();
facilityManage.verifySuccessMessageVisibilityAndContent(
"Doctor count updated successfully"
"Doctor count updated successfully",
);
facilityManage.verifyTotalDoctorCapacity(doctorModifiedCapacity);
// delete a bed
facilityManage.clickDeleteFacilityDoctorCapacity();
facilityManage.clickButtonWithText("Delete");
facilityManage.verifySuccessMessageVisibilityAndContent(
"Doctor specialization type deleted successfully"
"Doctor specialization type deleted successfully",
);
});

Expand All @@ -139,7 +139,7 @@ describe("Facility Manage Functions", () => {
facilityPage.fillCurrentlyOccupied(currentOccupied);
facilityPage.saveAndExitBedCapacityForm();
facilityManage.verifySuccessMessageVisibilityAndContent(
"Bed capacity added successfully"
"Bed capacity added successfully",
);
cy.closeNotification();
facilityManage.verifyFacilityBedCapacity(totalCapacity);
Expand All @@ -150,7 +150,7 @@ describe("Facility Manage Functions", () => {
facilityPage.fillCurrentlyOccupied(currentUpdatedOccupied);
facilityPage.clickbedcapcityaddmore();
facilityManage.verifySuccessMessageVisibilityAndContent(
"Bed capacity updated successfully"
"Bed capacity updated successfully",
);
cy.closeNotification();
facilityManage.verifyFacilityBedCapacity(totalUpdatedCapacity);
Expand All @@ -159,7 +159,7 @@ describe("Facility Manage Functions", () => {
facilityManage.clickDeleteFacilityBedCapacity();
facilityManage.clickButtonWithText("Delete");
facilityManage.verifySuccessMessageVisibilityAndContent(
"Bed type deleted successfully"
"Bed type deleted successfully",
);
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/facility_spec/inventory.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe("Inventory Management Section", () => {
facilityPage.fillInventoryMinimumDetails(inventoryName, "1");
facilityPage.clickSetButton();
facilityPage.verifySuccessNotification(
"Minimum quantiy updated successfully"
"Minimum quantiy updated successfully",
);
}
});
Expand Down
Loading

0 comments on commit 5c4c8b3

Please sign in to comment.