Skip to content

Commit

Permalink
Merge branch 'coronasafe:develop' into Fix-ohcnetwork#7708
Browse files Browse the repository at this point in the history
  • Loading branch information
AshrafMd-1 authored May 17, 2024
2 parents 75693c4 + aa6d33f commit 5be6262
Show file tree
Hide file tree
Showing 63 changed files with 4,334 additions and 2,380 deletions.
2 changes: 0 additions & 2 deletions .npmrc

This file was deleted.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN if [ "$(uname -m)" = "aarch64" ] || [ "$(uname -m)" = "arm64" ]; then apt-ge

COPY package.json package-lock.json ./

RUN npm install --legacy-peer-deps
RUN npm install

COPY . .

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#### Install the required dependencies

```sh
npm install --legacy-peer-deps
npm install
```

#### 🏃 Run the app in development mode
Expand Down
10 changes: 6 additions & 4 deletions cypress/e2e/facility_spec/facility_manage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ describe("Facility Manage Functions", () => {
facilityManage.clickButtonWithText(facilityHfridUpdateButton);
facilityManage.verifySuccessMessageVisibilityAndContent(
facilityHfridToastNotificationText,
true,
);
// update the existing middleware
facilityPage.clickManageFacilityDropdown();
Expand All @@ -98,6 +99,7 @@ describe("Facility Manage Functions", () => {
facilityManage.clickButtonWithText(facilityHfridUpdateButton);
facilityManage.verifySuccessMessageVisibilityAndContent(
facilityHfridToastNotificationText,
true,
);
// verify its reflection
facilityPage.clickManageFacilityDropdown();
Expand All @@ -108,26 +110,26 @@ describe("Facility Manage Functions", () => {
it("Modify doctor capacity in Facility detail page", () => {
// Add a doctor capacity
facilityManage.clickFacilityAddDoctorTypeButton();
facilityPage.selectAreaOfSpecialization("General Medicine");
facilityPage.selectAreaOfSpecialization("Pulmonology");
facilityPage.fillDoctorCount(doctorCapacity);
facilityPage.saveAndExitDoctorForm();
facilityManage.verifySuccessMessageVisibilityAndContent(
"Doctor count added successfully",
"Staff count added successfully",
);
facilityManage.verifyTotalDoctorCapacity(doctorCapacity);
// edit a existing doctor
facilityManage.clickEditFacilityDoctorCapacity();
facilityPage.fillDoctorCount(doctorModifiedCapacity);
facilityPage.clickdoctorcapacityaddmore();
facilityManage.verifySuccessMessageVisibilityAndContent(
"Doctor count updated successfully",
"Staff count updated successfully",
);
facilityManage.verifyTotalDoctorCapacity(doctorModifiedCapacity);
// delete a bed
facilityManage.clickDeleteFacilityDoctorCapacity();
facilityManage.clickButtonWithText("Delete");
facilityManage.verifySuccessMessageVisibilityAndContent(
"Doctor specialization type deleted successfully",
"Staff specialization type deleted successfully",
);
});

Expand Down
15 changes: 2 additions & 13 deletions cypress/e2e/patient_spec/patient_logupdate.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,6 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
cy.verifyNotification(
"Telemedicine Log Updates details created successfully",
);
// verify the copied previous value
cy.closeNotification();
patientLogupdate.clickLogupdate();
patientLogupdate.clickCopyPreviousValue();
patientLogupdate.selectPatientCategory(patientCategory);
cy.submitButton("Save");
cy.closeNotification();
cy.verifyContentPresence("#physical_examination_info", [
physicalExamination,
]);
cy.verifyContentPresence("#rhythm_detail", [patientRhythm]);
cy.submitButton("Continue");
cy.verifyNotification("Normal Log Updates details updated successfully");
});

it("Create a new log normal update for a domicilary care patient and edit it", () => {
Expand Down Expand Up @@ -102,6 +89,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
cy.verifyNotification("Normal Log Updates details created successfully");
cy.closeNotification();
// edit the card and verify the data.
cy.contains("Daily Rounds").click();
patientLogupdate.clickLogupdateCard("#dailyround-entry", patientCategory);
cy.verifyContentPresence("#consultation-preview", [
patientCategory,
Expand All @@ -122,6 +110,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
patientLogupdate.typeDiastolic(patientModifiedDiastolic);
cy.submitButton("Continue");
cy.verifyNotification("Normal Log Updates details updated successfully");
cy.contains("Daily Rounds").click();
patientLogupdate.clickLogupdateCard("#dailyround-entry", patientCategory);
cy.verifyContentPresence("#consultation-preview", [
patientModifiedDiastolic,
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/resource_spec/resources.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ describe("Resource Page", () => {
"Dummy",
"Test title",
"10",
"Test description"
"Test description",
);
facilityPage.clickSubmitRequestButton();
facilityPage.verifySuccessNotification(
"Resource request created successfully"
"Resource request created successfully",
);
facilityPage.verifyresourcenewurl();
cy.url().then((url) => {
Expand All @@ -71,7 +71,7 @@ describe("Resource Page", () => {
resourcePage.updateStatus("APPROVED");
resourcePage.clickSubmitButton();
resourcePage.verifySuccessNotification(
"Resource request updated successfully"
"Resource request updated successfully",
);
});

Expand Down
8 changes: 6 additions & 2 deletions cypress/pageobject/Facility/FacilityManage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,12 @@ class FacilityManage {
cy.get("#hf_id").click().clear().click().type(address);
}

verifySuccessMessageVisibilityAndContent(text) {
cy.get(".pnotify-text").should("be.visible").contains(text);
verifySuccessMessageVisibilityAndContent(text, isRegex = false) {
if (isRegex) {
cy.get(".pnotify-text").should("be.visible").contains(text);
} else {
cy.get(".pnotify-text").should("be.visible").and("contain.text", text);
}
}

verifyMiddlewareAddressValue(expectedValue) {
Expand Down
4 changes: 0 additions & 4 deletions cypress/pageobject/Patient/PatientLogupdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,5 @@ class PatientLogupdate {
cy.get("#consultation_tab_nav").scrollIntoView();
cy.verifyAndClickElement("#consultation_tab_nav", "Vitals");
}

clickCopyPreviousValue() {
cy.get("#clone_last").click();
}
}
export default PatientLogupdate;
Loading

0 comments on commit 5be6262

Please sign in to comment.