Skip to content

Commit

Permalink
Merge pull request #8600 from ohcnetwork/staging
Browse files Browse the repository at this point in the history
Production release v24.39.0
  • Loading branch information
gigincg authored Sep 23, 2024
2 parents 46259c1 + 00a67ee commit 8a9ae60
Show file tree
Hide file tree
Showing 93 changed files with 1,970 additions and 2,314 deletions.
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@
```sh
npm install
```
#### Run the following command to generate the `supportedBrowsers.ts` file:

```bash
npm run supported-browsers
```
This script just generates regex expression for matching the list of compatible browsers, so that we can show a warning notification for unsupported browsers.

#### 🏃 Run the app in development mode

Expand Down
61 changes: 61 additions & 0 deletions cypress/e2e/patient_spec/PatientDoctorNotes.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import LoginPage from "../../pageobject/Login/LoginPage";
import { PatientPage } from "../../pageobject/Patient/PatientCreation";
import { PatientDoctorNotes } from "../../pageobject/Patient/PatientDoctorNotes";

describe("Patient Discussion notes in the consultation page", () => {
const loginPage = new LoginPage();
const patientPage = new PatientPage();
const patientDoctorNotes = new PatientDoctorNotes();
const patientName = "Dummy Patient 4";
const patientNurseNote = "Test nurse Notes";
const patientNurseReplyNote = "Test nurse reply Notes";
const discussionNotesSubscribeWarning =
"Please subscribe to notifications to get live updates on discussion notes.";
const discussionNotesSuccessMessage = "Note added successfully";

before(() => {
loginPage.loginAsDisctrictAdmin();
cy.saveLocalStorage();
});

beforeEach(() => {
cy.restoreLocalStorage();
cy.clearLocalStorage(/filters--.+/);
cy.awaitUrl("/patients");
});

it("Create a nurse note for a patient and verify both ID received the messages", () => {
// Create a doctor notes a with a district admin
patientPage.visitPatient(patientName);
patientDoctorNotes.visitDiscussionNotesPage();
cy.verifyNotification(discussionNotesSubscribeWarning);
cy.closeNotification();
// switch the switch to nurse note, as the bydefault is doctornotes
patientDoctorNotes.selectNurseDiscussion();
patientDoctorNotes.addDiscussionNotes(patientNurseNote);
patientDoctorNotes.postDiscussionNotes();
cy.verifyNotification(discussionNotesSuccessMessage);
cy.closeNotification();
// verify the auto-switching of tab to nurse notes if the user is a nurse
cy.get("p").contains("Sign Out").click();
loginPage.loginManuallyAsNurse();
loginPage.ensureLoggedIn();
cy.visit("/patients");
patientPage.visitPatient(patientName);
patientDoctorNotes.visitDiscussionNotesPage();
// verify the message is received from admin
cy.verifyNotification(discussionNotesSubscribeWarning);
cy.closeNotification();
patientDoctorNotes.verifyDiscussionMessage(patientNurseNote);
// Post a reply comment to the message
patientDoctorNotes.addDiscussionNotes(patientNurseReplyNote);
patientDoctorNotes.postDiscussionNotes();
cy.verifyNotification(discussionNotesSuccessMessage);
cy.closeNotification();
patientDoctorNotes.verifyDiscussionMessage(patientNurseReplyNote);
});

afterEach(() => {
cy.saveLocalStorage();
});
});
20 changes: 10 additions & 10 deletions cypress/e2e/patient_spec/PatientLogUpdate.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
patientLogupdate.selectPatientCategory(patientCategory);
patientLogupdate.selectRoundType("Detailed Update");
cy.submitButton("Save and Continue");
cy.verifyNotification("Detailed Update log created successfully");
cy.verifyNotification("Detailed Update created successfully");
cy.closeNotification();
// Select two Section - First One is Respiratory Support
patientLogupdate.selectCriticalCareSection("Respiratory Support");
Expand Down Expand Up @@ -162,7 +162,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
cy.closeNotification();
// Submit the doctors log update
cy.submitButton("Save and Continue");
cy.verifyNotification("Progress Note log created successfully");
cy.verifyNotification("Progress Note created successfully");
cy.closeNotification();
// modify the relevant critical care log update
patientLogupdate.selectCriticalCareSection("Neurological Monitoring");
Expand Down Expand Up @@ -192,7 +192,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
patientLogupdate.typeSystolic(patientModifiedSystolic);
patientLogupdate.typeDiastolic(patientModifiedDiastolic);
cy.submitButton("Continue");
cy.verifyNotification("Progress Note log updated successfully");
cy.verifyNotification("Progress Note updated successfully");
});

it("Create a new TeleIcu log update for a domicilary care patient", () => {
Expand All @@ -204,7 +204,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
cy.closeNotification();
patientLogupdate.clickLogupdate();
patientLogupdate.typePhysicalExamination(physicalExamination);
patientLogupdate.selectRoundType("Telemedicine");
patientLogupdate.selectRoundType("Tele-medicine Log");
patientLogupdate.typeOtherDetails(otherExamination);
patientLogupdate.selectSymptomsDate("01012024");
patientLogupdate.typeAndMultiSelectSymptoms("fe", ["Fever"]);
Expand All @@ -219,7 +219,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
patientLogupdate.typeRhythm(patientRhythm);
cy.get("#consciousness_level-option-RESPONDS_TO_PAIN").click();
cy.submitButton("Save");
cy.verifyNotification("Telemedicine log created successfully");
cy.verifyNotification("Tele-medicine Log created successfully");
});

it("Create a new Normal Log update for a domicilary care patient and edit it", () => {
Expand All @@ -245,7 +245,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
patientLogupdate.typeRhythm(patientRhythm);
cy.get("#consciousness_level-option-RESPONDS_TO_PAIN").click();
cy.submitButton("Save");
cy.verifyNotification("Brief Update log created successfully");
cy.verifyNotification("Brief Update created successfully");
cy.closeNotification();
// edit the card and verify the data.
cy.contains("button", "Daily Rounds").click();
Expand All @@ -271,7 +271,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
patientLogupdate.clickClearButtonInElement("#diastolic");
patientLogupdate.typeDiastolic(patientModifiedDiastolic);
cy.submitButton("Continue");
cy.verifyNotification("Brief Update log updated successfully");
cy.verifyNotification("Brief Update updated successfully");
cy.contains("button", "Daily Rounds").click();
patientLogupdate.clickLogUpdateViewDetails(
"#dailyround-entry",
Expand Down Expand Up @@ -307,7 +307,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
cy.get("#consciousness_level-option-RESPONDS_TO_PAIN").click();
cy.submitButton("Save");
cy.wait(2000);
cy.verifyNotification("Brief Update log created successfully");
cy.verifyNotification("Brief Update created successfully");
// Verify the card content
cy.get("#basic-information").scrollIntoView();
cy.verifyContentPresence("#encounter-symptoms", [additionalSymptoms]);
Expand All @@ -330,7 +330,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
patientLogupdate.typeRespiratory(patientRespiratory);
cy.get("#consciousness_level-option-RESPONDS_TO_PAIN").click();
cy.submitButton("Save");
cy.verifyNotification("Brief Update log created successfully");
cy.verifyNotification("Brief Update created successfully");
cy.closeNotification();
cy.verifyContentPresence("#consultation-buttons", ["9"]);
// Verify the Incomplete data will give blank info
Expand All @@ -340,7 +340,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
patientLogupdate.typeDiastolic(patientDiastolic);
patientLogupdate.typePulse(patientPulse);
cy.submitButton("Save");
cy.verifyNotification("Brief Update log created successfully");
cy.verifyNotification("Brief Update created successfully");
cy.closeNotification();
cy.verifyContentPresence("#consultation-buttons", ["-"]);
});
Expand Down
48 changes: 0 additions & 48 deletions cypress/e2e/patient_spec/PatientManage.cy.ts

This file was deleted.

4 changes: 4 additions & 0 deletions cypress/e2e/patient_spec/PatientRegistration.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ describe("Patient Creation with consultation", () => {
facilityPage.selectLocalBody(patientOneLocalbody);
facilityPage.selectWard(patientOneWard);
patientPage.selectPatientOccupation(patientOccupation);
patientPage.selectSocioeconomicStatus("MIDDLE_CLASS");
patientPage.selectDomesticHealthcareSupport("FAMILY_MEMBER");
// Patient Medical History
patientMedicalHistory.typePatientPresentHealth(patientOnePresentHealth);
patientMedicalHistory.typePatientOngoingMedication(
Expand Down Expand Up @@ -130,6 +132,8 @@ describe("Patient Creation with consultation", () => {
yearOfBirth,
patientOneBloodGroup,
patientOccupation,
"Middle Class",
"Family member",
);
patientMedicalHistory.verifyPatientMedicalDetails(
patientOnePresentHealth,
Expand Down
149 changes: 0 additions & 149 deletions cypress/e2e/users_spec/user_manage.cy.ts

This file was deleted.

Loading

0 comments on commit 8a9ae60

Please sign in to comment.