-
Notifications
You must be signed in to change notification settings - Fork 560
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prescription test to add and remove medicines
- Loading branch information
1 parent
d58936d
commit abf92d1
Showing
6 changed files
with
106 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { PatientEncounter } from "@/pageObject/Patients/PatientEncounter"; | ||
import { FacilityCreation } from "@/pageObject/facility/FacilityCreation"; | ||
|
||
const facilityCreation = new FacilityCreation(); | ||
const patientEncounter = new PatientEncounter(); | ||
|
||
describe("Patient Prescription Management", () => { | ||
beforeEach(() => { | ||
cy.loginByApi("devnurse"); | ||
cy.visit("/"); | ||
}); | ||
|
||
it("should add a new medicine for the patient", () => { | ||
facilityCreation.selectFacility("GHC payyanur"); | ||
const medicineName = "Senna 15 mg oral tablet"; | ||
const dosage = 6; | ||
const frequency = "BID (1-0-1)"; | ||
const instructions = "Until symptoms improve"; | ||
const route = "Sublabial route"; | ||
const site = "Structure of left deltoid muscle"; | ||
const method = "Bathe"; | ||
const notes = "testing notes"; | ||
patientEncounter | ||
.navigateToEncounters() | ||
.openFirstEncounterDetails() | ||
.clickMedicinesTab() | ||
.clickEditPrescription() | ||
.addMedication( | ||
medicineName, | ||
dosage, | ||
frequency, | ||
instructions, | ||
route, | ||
site, | ||
method, | ||
notes, | ||
); | ||
}); | ||
it("should delete prescription", () => { | ||
facilityCreation.selectFacility("GHC payyanur"); | ||
|
||
patientEncounter | ||
.navigateToEncounters() | ||
.openFirstEncounterDetails() | ||
.clickMedicinesTab() | ||
.clickEditPrescription() | ||
.removeMedication(); | ||
}); | ||
}); |
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