-
Notifications
You must be signed in to change notification settings - Fork 425
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8600 from ohcnetwork/staging
Production release v24.39.0
- Loading branch information
Showing
93 changed files
with
1,970 additions
and
2,314 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,61 @@ | ||
import LoginPage from "../../pageobject/Login/LoginPage"; | ||
import { PatientPage } from "../../pageobject/Patient/PatientCreation"; | ||
import { PatientDoctorNotes } from "../../pageobject/Patient/PatientDoctorNotes"; | ||
|
||
describe("Patient Discussion notes in the consultation page", () => { | ||
const loginPage = new LoginPage(); | ||
const patientPage = new PatientPage(); | ||
const patientDoctorNotes = new PatientDoctorNotes(); | ||
const patientName = "Dummy Patient 4"; | ||
const patientNurseNote = "Test nurse Notes"; | ||
const patientNurseReplyNote = "Test nurse reply Notes"; | ||
const discussionNotesSubscribeWarning = | ||
"Please subscribe to notifications to get live updates on discussion notes."; | ||
const discussionNotesSuccessMessage = "Note added successfully"; | ||
|
||
before(() => { | ||
loginPage.loginAsDisctrictAdmin(); | ||
cy.saveLocalStorage(); | ||
}); | ||
|
||
beforeEach(() => { | ||
cy.restoreLocalStorage(); | ||
cy.clearLocalStorage(/filters--.+/); | ||
cy.awaitUrl("/patients"); | ||
}); | ||
|
||
it("Create a nurse note for a patient and verify both ID received the messages", () => { | ||
// Create a doctor notes a with a district admin | ||
patientPage.visitPatient(patientName); | ||
patientDoctorNotes.visitDiscussionNotesPage(); | ||
cy.verifyNotification(discussionNotesSubscribeWarning); | ||
cy.closeNotification(); | ||
// switch the switch to nurse note, as the bydefault is doctornotes | ||
patientDoctorNotes.selectNurseDiscussion(); | ||
patientDoctorNotes.addDiscussionNotes(patientNurseNote); | ||
patientDoctorNotes.postDiscussionNotes(); | ||
cy.verifyNotification(discussionNotesSuccessMessage); | ||
cy.closeNotification(); | ||
// verify the auto-switching of tab to nurse notes if the user is a nurse | ||
cy.get("p").contains("Sign Out").click(); | ||
loginPage.loginManuallyAsNurse(); | ||
loginPage.ensureLoggedIn(); | ||
cy.visit("/patients"); | ||
patientPage.visitPatient(patientName); | ||
patientDoctorNotes.visitDiscussionNotesPage(); | ||
// verify the message is received from admin | ||
cy.verifyNotification(discussionNotesSubscribeWarning); | ||
cy.closeNotification(); | ||
patientDoctorNotes.verifyDiscussionMessage(patientNurseNote); | ||
// Post a reply comment to the message | ||
patientDoctorNotes.addDiscussionNotes(patientNurseReplyNote); | ||
patientDoctorNotes.postDiscussionNotes(); | ||
cy.verifyNotification(discussionNotesSuccessMessage); | ||
cy.closeNotification(); | ||
patientDoctorNotes.verifyDiscussionMessage(patientNurseReplyNote); | ||
}); | ||
|
||
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 was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.