-
Notifications
You must be signed in to change notification settings - Fork 516
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fix-issue-6366
- Loading branch information
Showing
83 changed files
with
2,234 additions
and
1,493 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/// <reference types="cypress" /> | ||
|
||
import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress"; | ||
import LoginPage from "../../pageobject/Login/LoginPage"; | ||
import { UserPage } from "../../pageobject/Users/UserSearch"; | ||
|
||
describe("Asset Tab", () => { | ||
const userPage = new UserPage(); | ||
const usernameToTest = "devdoctor"; | ||
const currentuser = "devdistrictadmin"; | ||
const loginPage = new LoginPage(); | ||
before(() => { | ||
loginPage.loginAsDisctrictAdmin(); | ||
cy.saveLocalStorage(); | ||
}); | ||
|
||
beforeEach(() => { | ||
cy.restoreLocalStorage(); | ||
cy.awaitUrl("/users"); | ||
}); | ||
|
||
it("Search by username", () => { | ||
userPage.checkSearchInputVisibility(); | ||
userPage.typeInSearchInput(usernameToTest); | ||
userPage.checkUrlForUsername(usernameToTest); | ||
userPage.checkUsernameText(usernameToTest); | ||
userPage.checkUsernameBadgeVisibility(true); | ||
userPage.clearSearchInput(); | ||
userPage.checkUsernameBadgeVisibility(false); | ||
userPage.typeInSearchInput(usernameToTest); | ||
userPage.checkUsernameText(usernameToTest); | ||
userPage.clickRemoveIcon(); | ||
userPage.checkUsernameBadgeVisibility(false); | ||
userPage.checkUsernameText(currentuser); | ||
}); | ||
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
Oops, something went wrong.