Skip to content

Commit

Permalink
Revert "Merge Develop to Staging v24.39.0 (#8559)"
Browse files Browse the repository at this point in the history
This reverts commit 6d1b2c2.
  • Loading branch information
khavinshankar authored Sep 18, 2024
1 parent 6d1b2c2 commit f5931ca
Show file tree
Hide file tree
Showing 80 changed files with 2,028 additions and 1,713 deletions.
61 changes: 0 additions & 61 deletions cypress/e2e/patient_spec/PatientDoctorNotes.cy.ts

This file was deleted.

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 created successfully");
cy.verifyNotification("Detailed Update log 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 created successfully");
cy.verifyNotification("Progress Note log 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 updated successfully");
cy.verifyNotification("Progress Note log 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("Tele-medicine Log");
patientLogupdate.selectRoundType("Telemedicine");
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("Tele-medicine Log created successfully");
cy.verifyNotification("Telemedicine 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 created successfully");
cy.verifyNotification("Brief Update log 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 updated successfully");
cy.verifyNotification("Brief Update log 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 created successfully");
cy.verifyNotification("Brief Update log 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 created successfully");
cy.verifyNotification("Brief Update log 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 created successfully");
cy.verifyNotification("Brief Update log created successfully");
cy.closeNotification();
cy.verifyContentPresence("#consultation-buttons", ["-"]);
});
Expand Down
48 changes: 48 additions & 0 deletions cypress/e2e/patient_spec/PatientManage.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import LoginPage from "../../pageobject/Login/LoginPage";
import { PatientConsultationPage } from "../../pageobject/Patient/PatientConsultation";
import { PatientPage } from "../../pageobject/Patient/PatientCreation";

describe("Patient", () => {
const loginPage = new LoginPage();
const patientPage = new PatientPage();
const patientConsultationPage = new PatientConsultationPage();

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

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

// it("Create Patient shift requests.", () => {
// patientPage.visitPatient();
// patientConsultationPage.visitShiftRequestPage();
// patientConsultationPage.enterPatientShiftDetails(
// "Test User",
// phone_number,
// "Dummy Shifting",
// "Reason"
// );
// patientConsultationPage.createShiftRequest();
// patientConsultationPage.verifySuccessNotification(
// "Shift request created successfully"
// );
// });
// commented out the shifting request, as logic need to be re-visited

it("Post discussion notes for an already created patient", () => {
patientPage.visitPatient("Dummy Patient 3");
patientConsultationPage.visitDoctorNotesPage();
patientConsultationPage.addDoctorsNotes("Test Doctor Notes");
patientConsultationPage.postDoctorNotes();
cy.verifyNotification("Note added successfully");
});

afterEach(() => {
cy.saveLocalStorage();
});
});
2 changes: 1 addition & 1 deletion cypress/pageobject/Asset/AssetFilters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export class AssetFilters {
facilityName: string,
assetStatus: string,
assetClass: string,
assetLocation: string,
assetLocation: string
) {
cy.contains("Advanced Filters").click();
cy.get("input[name='Facilities']")
Expand Down
4 changes: 2 additions & 2 deletions cypress/pageobject/Asset/AssetSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class AssetSearchPage {
verifyBadgeContent(expectedText: string) {
cy.get("[data-testid='Name/Serial No./QR ID']").should(
"contain",
expectedText,
expectedText
);
}

Expand Down Expand Up @@ -54,7 +54,7 @@ export class AssetSearchPage {
verifyAssetListContains(dummyCameraText: string) {
cy.get("[data-testid='created-asset-list']").should(
"contain",
dummyCameraText,
dummyCameraText
);
}
}
6 changes: 0 additions & 6 deletions cypress/pageobject/Login/LoginPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ class LoginPage {
cy.get("button").contains("Login").click();
}

loginManuallyAsNurse(): void {
cy.get("input[id='username']").click().type("dummynurse1");
cy.get("input[id='password']").click().type("Coronasafe@123");
cy.get("button").contains("Login").click();
}

login(username: string, password: string): void {
cy.loginByApi(username, password);
}
Expand Down
26 changes: 26 additions & 0 deletions cypress/pageobject/Patient/PatientConsultation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,30 @@ export class PatientConsultationPage {
);
cy.wait(3000);
}

visitShiftRequestPage() {
cy.get("#create_shift_request").click();
}

createShiftRequest() {
cy.intercept("POST", "**/api/v1/shift/").as("createShiftRequest");
cy.get("#submit").click();
cy.wait("@createShiftRequest").its("response.statusCode").should("eq", 201);
}

visitDoctorNotesPage() {
cy.get("#patient_doctor_notes").scrollIntoView();
cy.get("#patient_doctor_notes").click();
}

addDoctorsNotes(notes: string) {
cy.get("#doctor_notes_textarea").scrollIntoView();
cy.get("#doctor_notes_textarea").click().type(notes);
}

postDoctorNotes() {
cy.intercept("POST", "**/api/v1/patient/*/notes").as("postDoctorNotes");
cy.get("#add_doctor_note_button").click();
cy.wait("@postDoctorNotes").its("response.statusCode").should("eq", 201);
}
}
1 change: 0 additions & 1 deletion cypress/pageobject/Patient/PatientCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export class PatientPage {
cy.get("#name").click().type(patientName);
cy.intercept("GET", "**/api/v1/consultation/**").as("getPatient");
cy.get("#patient-name-list").contains(patientName).click();
cy.wait(2000);
cy.wait("@getPatient").its("response.statusCode").should("eq", 200);
cy.get("#patient-name-consultation")
.should("be.visible")
Expand Down
29 changes: 0 additions & 29 deletions cypress/pageobject/Patient/PatientDoctorNotes.ts

This file was deleted.

2 changes: 1 addition & 1 deletion cypress/pageobject/Patient/PatientInsurance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class PatientInsurance {
typePatientInsuranceDetail(
containerId: string,
fieldId: string,
value: string,
value: string
) {
cy.get(`#${containerId}`).within(() => {
cy.get(`#${fieldId}`).click().type(value);
Expand Down
4 changes: 2 additions & 2 deletions cypress/pageobject/Patient/PatientMedicalHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class PatientMedicalHistory {
patientSymptoms4,
patientSymptoms5,
patientSymptoms6,
patientSymptoms7,
patientSymptoms7
) {
cy.get("[data-testid=patient-details]").then(($dashboard) => {
cy.url().should("include", "/facility/");
Expand All @@ -51,7 +51,7 @@ class PatientMedicalHistory {
verifyNoSymptosPresent(patientSymptoms1: string) {
cy.get("[data-testid=patient-details]").should(
"not.contain",
patientSymptoms1,
patientSymptoms1
);
}
}
Expand Down
Loading

0 comments on commit f5931ca

Please sign in to comment.