-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
148 changed files
with
6,260 additions
and
2,687 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,31 @@ | ||
name: Lint Code Base | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
- master | ||
merge_group: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: read | ||
statuses: write | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "18" | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run lint | ||
run: npm run lint -- --quiet |
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
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(); | ||
}); | ||
}); |
Oops, something went wrong.