-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added test of patient_crud.cy.ts (#6135)
* Added test for importing and configuring an asset * Revert few changes * nits * Migrated to POM approach * Migrated patient_crud to POM approach * reverted some chnages * FIx * Merge conflicts * Fixed test * Added test for patient_test * nits * add responsiveness to virtual nursing assistant card (#6130) * allow use stock as well (#6115) * fixed responsive issue of 'Update Log' button in patient consultation page (#6113) * fix multiple bed bug (#6111) * Fixed typo in Date format in Asset management (#6105) * Added padding to count block on patients page * fixed date format in asset manage page * show only items with no min value (#6103) * check for id in response (#6100) * Added Responsiveness to File upload (#6096) * add responsiveness * refactor * remove overlap (#6094) * fixed failing test * Fix * Fixed comments * fix comments * Fixed all comments * Migrated test to new test suite * Added upload file test * fixed failing test * Fix failing test * Revert unwanted changes * fixed conflict * random failure fixed * temporary fixed medicine selection --------- Co-authored-by: Pranshu Aggarwal <[email protected]> Co-authored-by: Gokulram A <[email protected]> Co-authored-by: Kshitij Verma <[email protected]> Co-authored-by: Mohammed Nihal <[email protected]>
- Loading branch information
1 parent
33f103d
commit e452bb5
Showing
8 changed files
with
256 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress"; | ||
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.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 doctor notes for an already created patient", () => { | ||
patientPage.visitPatient(); | ||
patientConsultationPage.visitDoctorNotesPage(); | ||
patientConsultationPage.addDoctorsNotes("Test Doctor Notes"); | ||
patientConsultationPage.postDoctorNotes(); | ||
patientConsultationPage.verifySuccessNotification( | ||
"Note added successfully" | ||
); | ||
}); | ||
|
||
it("Edit prescription for an already created patient", () => { | ||
patientPage.visitPatient(); | ||
patientConsultationPage.visitEditPrescriptionPage(); | ||
patientConsultationPage.clickAddPrescription(); | ||
patientConsultationPage.interceptMediaBase(); | ||
patientConsultationPage.selectMedicinebox(); | ||
patientConsultationPage.waitForMediabaseStatusCode(); | ||
patientConsultationPage.prescribesecondMedicine(); | ||
patientConsultationPage.enterDosage("4"); | ||
patientConsultationPage.selectDosageFrequency("Twice daily"); | ||
patientConsultationPage.submitPrescription(); | ||
}); | ||
|
||
it("Upload consultations file ", () => { | ||
patientPage.visitPatient(); | ||
patientConsultationPage.visitFilesPage(); | ||
patientConsultationPage.uploadFile(); | ||
patientConsultationPage.clickUploadFile(); | ||
}); | ||
|
||
it("Discharge a patient", () => { | ||
patientPage.visitPatient(); | ||
patientConsultationPage.clickDischargePatient(); | ||
patientConsultationPage.selectDischargeReason("Recovered"); | ||
patientConsultationPage.addDischargeNotes("Discharge notes"); | ||
patientConsultationPage.confirmDischarge(); | ||
}); | ||
|
||
afterEach(() => { | ||
cy.saveLocalStorage(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters