Skip to content

Commit

Permalink
Merge branch 'develop' into issues/8480/tooltip-Removal-CoverImage
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacobjeevan committed Sep 17, 2024
2 parents abe503c + b54bcc5 commit 872e353
Show file tree
Hide file tree
Showing 167 changed files with 4,395 additions and 602 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ stats.json
public/build-meta.json
.vscode/*
!.vscode/launch.json
src/supportedBrowsers.ts


# Reason React
# Reason React
/lib/bs/**
.merlin
*.bs.js
Expand Down
3 changes: 0 additions & 3 deletions .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,5 @@
"arrowParens": "always",
"tailwindFunctions": [
"classNames"
],
"plugins": [
"prettier-plugin-tailwindcss"
]
}
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@
```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
2 changes: 2 additions & 0 deletions crowdin.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
files:
- source: /src/Locale/en/*.json
translation: /src/Locale/%two_letters_code%/%original_file_name%
bundles:
- 2
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ describe("Edit Profile Testing", () => {
cy.get("div").contains("Import/Export").click();
cy.get("div").contains("Import Results").click();
cy.get("[data-testid=import-file]")
.selectFile("cypress/fixtures/externalresultsample.csv", { force: true })
.selectFile("cypress/fixtures/external-result-sample.csv", {
force: true,
})
.wait(100);
cy.submitButton("Import");
cy.wait("@import").then((interception) => {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe("Facility Manage Functions", () => {
// It's only button functionality because we can't access S3 bucket in local
facilityManage.clickCoverImage();
facilityManage.verifyUploadButtonVisible();
facilityManage.uploadCoverImage("facilitycoverimage.jpg");
facilityManage.uploadCoverImage("facility-cover-image.jpg");
facilityManage.clickSaveCoverImage();
});

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();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
const patientSpo2 = "15";
const patientRhythmType = "Regular";
const patientRhythm = "Normal Rhythm";
const patientEtco2 = "50";
const patientOxygenFlowRate = "40";
const patientBloodSugar = "52";
const patientInsulinDosage = "56";
const patientFluidBalance = "500";
const patientNetBalance = "1000";

before(() => {
loginPage.loginAsDisctrictAdmin();
Expand All @@ -39,6 +45,88 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
cy.awaitUrl("/patients");
});

it("Create a basic critical care log update for a admitted patient and edit it", () => {
patientPage.visitPatient("Dummy Patient 10");
patientLogupdate.clickLogupdate();
cy.verifyNotification("Please assign a bed to the patient");
patientLogupdate.selectBed("Dummy Bed 2");
cy.closeNotification();
patientLogupdate.clickLogupdate();
patientLogupdate.selectPatientCategory(patientCategory);
patientLogupdate.selectRoundType("Detailed Update");
cy.submitButton("Save and Continue");
cy.verifyNotification("Detailed Update log created successfully");
cy.closeNotification();
// Select two Section - First One is Respiratory Support
patientLogupdate.selectCriticalCareSection("Respiratory Support");
patientLogupdate.selectNoBilateralAirFlow();
patientLogupdate.typeEtco2(patientEtco2);
patientLogupdate.selectOxygenSupport();
patientLogupdate.typeOxygenFlowRate(patientOxygenFlowRate);
patientLogupdate.typeVentilatorSpo2(patientSpo2);
cy.submitButton("Update Details");
cy.verifyNotification("Respiratory Support details succesfully updated.");
cy.closeNotification();
// Second Section will be Blood Sugar
patientLogupdate.selectCriticalCareSection("Blood Sugar");
patientLogupdate.typeBloodSugar(patientBloodSugar);
patientLogupdate.typeInsulinDosage(patientInsulinDosage);
cy.get("#insulin_intake_frequency-option-BD").click();
cy.submitButton("Update Details");
cy.verifyNotification("Blood Sugar details succesfully updated.");
// Submit the form and verify the details
cy.submitButton("Complete");
cy.verifyNotification("Detailed Log Update filed successfully");
cy.closeNotification();
cy.contains("button", "Daily Rounds").click();
patientLogupdate.clickLogUpdateViewDetails(
"#dailyround-entry",
patientCategory,
);
cy.verifyContentPresence("#respiratory-support", [
patientEtco2,
patientOxygenFlowRate,
]);
cy.verifyContentPresence("#blood-sugar", [
patientBloodSugar,
patientInsulinDosage,
]);
// Go back and edit the data on a third section
patientLogupdate.clickGoBackConsultation();
cy.contains("button", "Daily Rounds").click();
patientLogupdate.clickLogUpdateUpdateLog(
"#dailyround-entry",
patientCategory,
);
patientLogupdate.selectCriticalCareSection("Dialysis");
patientLogupdate.typeFluidBalance(patientFluidBalance);
patientLogupdate.typeNetBalance(patientNetBalance);
cy.submitButton("Update Details");
cy.verifyNotification("Dialysis details succesfully updated.");
cy.closeNotification();
cy.submitButton("Complete");
cy.verifyNotification("Detailed Log Update filed successfully");
cy.closeNotification();
//Reverify the editted and newly added data
cy.contains("button", "Daily Rounds").click();
patientLogupdate.clickLogUpdateViewDetails(
"#dailyround-entry",
patientCategory,
);
cy.verifyContentPresence("#respiratory-support", [
patientEtco2,
patientOxygenFlowRate,
]);
cy.verifyContentPresence("#blood-sugar", [
patientBloodSugar,
patientInsulinDosage,
]);
cy.verifyContentPresence("#dialysis", [
patientFluidBalance,
patientNetBalance,
]);
});

it("Create a new Progress log update for a admitted patient and edit it", () => {
patientPage.visitPatient("Dummy Patient 12");
patientLogupdate.clickLogupdate();
Expand Down Expand Up @@ -77,7 +165,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
cy.verifyNotification("Progress Note log created successfully");
cy.closeNotification();
// modify the relevant critical care log update
cy.contains("button", "Neurological Monitoring").click();
patientLogupdate.selectCriticalCareSection("Neurological Monitoring");
cy.get("#consciousness_level-option-RESPONDS_TO_PAIN").click();
cy.get("#left_pupil_light_reaction-option-FIXED").click();
cy.submitButton("Update Details");
Expand All @@ -91,7 +179,10 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
cy.closeNotification();
// Verify the data reflection
cy.contains("button", "Daily Rounds").click();
patientLogupdate.clickLogupdateCard("#dailyround-entry", patientCategory);
patientLogupdate.clickLogUpdateViewDetails(
"#dailyround-entry",
patientCategory,
);
cy.verifyContentPresence("#consultation-preview", [
patientCategory,
patientTemperature,
Expand Down Expand Up @@ -158,7 +249,10 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
cy.closeNotification();
// edit the card and verify the data.
cy.contains("button", "Daily Rounds").click();
patientLogupdate.clickLogupdateCard("#dailyround-entry", patientCategory);
patientLogupdate.clickLogUpdateViewDetails(
"#dailyround-entry",
patientCategory,
);
cy.verifyContentPresence("#consultation-preview", [
patientCategory,
patientDiastolic,
Expand All @@ -179,7 +273,10 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
cy.submitButton("Continue");
cy.verifyNotification("Brief Update log updated successfully");
cy.contains("button", "Daily Rounds").click();
patientLogupdate.clickLogupdateCard("#dailyround-entry", patientCategory);
patientLogupdate.clickLogUpdateViewDetails(
"#dailyround-entry",
patientCategory,
);
cy.verifyContentPresence("#consultation-preview", [
patientModifiedDiastolic,
patientModifiedSystolic,
Expand Down
48 changes: 0 additions & 48 deletions cypress/e2e/patient_spec/patient_manage.cy.ts

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 872e353

Please sign in to comment.