-
Notifications
You must be signed in to change notification settings - Fork 486
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 issues/8430/fixingSpacing
- Loading branch information
Showing
144 changed files
with
3,781 additions
and
241 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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
files: | ||
- source: /src/Locale/en/*.json | ||
translation: /src/Locale/%two_letters_code%/%original_file_name% | ||
bundles: | ||
- 2 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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(); | ||
}); | ||
}); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,151 @@ | ||
import LoginPage from "../../pageobject/Login/LoginPage"; | ||
import { UserPage } from "../../pageobject/Users/UserSearch"; | ||
import ManageUserPage from "../../pageobject/Users/ManageUserPage"; | ||
import { UserCreationPage } from "../../pageobject/Users/UserCreation"; | ||
|
||
describe("Manage User", () => { | ||
const loginPage = new LoginPage(); | ||
const userPage = new UserPage(); | ||
const manageUserPage = new ManageUserPage(); | ||
const usernametolinkfacilitydoc1 = "dummydoctor4"; | ||
const usernametolinkfacilitydoc2 = "dummydoctor5"; | ||
const usernametolinkfacilitydoc3 = "dummydoctor6"; | ||
const usernametolinkskill = "devdoctor"; | ||
const userCreationPage = new UserCreationPage(); | ||
const usernameforworkinghour = "devdistrictadmin"; | ||
const usernamerealname = "Dummy Doctor"; | ||
const facilitytolinkusername = "Dummy Shifting Center"; | ||
const facilitytolinkskill = "Dummy Facility 40"; | ||
const workinghour = "23"; | ||
const linkedskill = "General Medicine"; | ||
|
||
before(() => { | ||
loginPage.loginAsDisctrictAdmin(); | ||
cy.saveLocalStorage(); | ||
}); | ||
|
||
beforeEach(() => { | ||
cy.restoreLocalStorage(); | ||
console.log(localStorage); | ||
cy.clearLocalStorage(/filters--.+/); | ||
console.log(localStorage); | ||
cy.awaitUrl("/users"); | ||
}); | ||
|
||
it("linking skills for users and verify its reflection in profile", () => { | ||
// select the district user and select one skill link and verify its profile reflection | ||
userPage.typeInSearchInput(usernameforworkinghour); | ||
userPage.checkUsernameText(usernameforworkinghour); | ||
manageUserPage.clicklinkedskillbutton(); | ||
manageUserPage.selectSkillFromDropdown(linkedskill); | ||
manageUserPage.clickAddSkillButton(); | ||
manageUserPage.clickCloseSlideOver(); | ||
cy.wait(5000); | ||
manageUserPage.clicklinkedskillbutton(); | ||
manageUserPage.assertSkillInAddedUserSkills(linkedskill); | ||
manageUserPage.clickCloseSlideOver(); | ||
cy.wait(5000); | ||
manageUserPage.navigateToProfile(); | ||
userCreationPage.verifyElementContainsText( | ||
"username-profile-details", | ||
usernameforworkinghour, | ||
); | ||
manageUserPage.assertSkillInAlreadyLinkedSkills(linkedskill); | ||
}); | ||
|
||
it("linking skills for a doctor users and verify its reflection in doctor connect", () => { | ||
// select a doctor user and link and unlink same skill twice and verify the badge is only shown once in doctor connect | ||
userPage.typeInSearchInput(usernametolinkskill); | ||
userPage.checkUsernameText(usernametolinkskill); | ||
manageUserPage.clicklinkedskillbutton(); | ||
manageUserPage.selectSkillFromDropdown(linkedskill); | ||
manageUserPage.clickAddSkillButton(); | ||
manageUserPage.clickCloseSlideOver(); | ||
cy.wait(5000); // temporary hack to fix the failure | ||
manageUserPage.clicklinkedskillbutton(); | ||
manageUserPage.assertSkillInAddedUserSkills(linkedskill); | ||
manageUserPage.clickUnlinkSkill(); | ||
manageUserPage.clickSubmit(); | ||
manageUserPage.selectSkillFromDropdown(linkedskill); | ||
manageUserPage.clickAddSkillButton(); | ||
manageUserPage.clickCloseSlideOver(); | ||
// verifying the doctor connect | ||
manageUserPage.navigateToFacility(); | ||
manageUserPage.typeFacilitySearch(facilitytolinkskill); | ||
manageUserPage.assertFacilityInCard(facilitytolinkskill); | ||
manageUserPage.clickFacilityPatients(); | ||
manageUserPage.clickDoctorConnectButton(); | ||
manageUserPage.assertSkillIndoctorconnect(linkedskill); | ||
}); | ||
|
||
it("add working hour for a user and verify its reflection in card and user profile", () => { | ||
// verify mandatory field error and select working hour for a user | ||
userPage.typeInSearchInput(usernameforworkinghour); | ||
userPage.checkUsernameText(usernameforworkinghour); | ||
manageUserPage.clicksetaveragehourbutton(); | ||
manageUserPage.clearweeklyhourfield(); | ||
manageUserPage.clickSubmit(); | ||
manageUserPage.verifyErrorText("Value should be between 0 and 168"); | ||
// verify the data is reflected in user card and profile page | ||
manageUserPage.typeInWeeklyWorkingHours(workinghour); | ||
manageUserPage.clickSubmit(); | ||
manageUserPage.verifyWorkingHours(workinghour); | ||
manageUserPage.navigateToProfile(); | ||
manageUserPage.verifyProfileWorkingHours(workinghour); | ||
}); | ||
|
||
it("linking and unlinking facility for multiple users, and confirm reflection in user cards and doctor connect", () => { | ||
// verify the user doesn't have any home facility | ||
userPage.typeInSearchInput(usernametolinkfacilitydoc1); | ||
userPage.checkUsernameText(usernametolinkfacilitydoc1); | ||
manageUserPage.assertHomeFacility("No Home Facility"); | ||
// Link a new facility and ensure it is under linked facility - doctor username (1) | ||
manageUserPage.clickFacilitiesTab(); | ||
manageUserPage.selectFacilityFromDropdown(facilitytolinkusername); | ||
manageUserPage.clickLinkFacility(); | ||
manageUserPage.assertLinkedFacility(facilitytolinkusername); | ||
// Verify in the already linked facility are not present in droplist | ||
manageUserPage.assertFacilityNotInDropdown(facilitytolinkusername); | ||
manageUserPage.clickCloseSlideOver(); | ||
// Link a new facility and ensure it is under home facility - doctor username (2) | ||
userPage.clearSearchInput(); | ||
userPage.typeInSearchInput(usernametolinkfacilitydoc2); | ||
userPage.checkUsernameText(usernametolinkfacilitydoc2); | ||
manageUserPage.clickFacilitiesTab(); | ||
manageUserPage.selectFacilityFromDropdown(facilitytolinkusername); | ||
manageUserPage.clickLinkFacility(); | ||
manageUserPage.clickHomeFacilityIcon(); | ||
manageUserPage.assertnotLinkedFacility(facilitytolinkusername); | ||
manageUserPage.assertHomeFacilitylink(facilitytolinkusername); | ||
manageUserPage.clickCloseSlideOver(); | ||
// verify the home facility doctor id have reflection in user card | ||
userPage.clearSearchInput(); | ||
userPage.typeInSearchInput(usernametolinkfacilitydoc2); | ||
userPage.checkUsernameText(usernametolinkfacilitydoc2); | ||
manageUserPage.assertHomeFacility(facilitytolinkusername); | ||
// Link a new facility and unlink the facility from the doctor username (3) | ||
userPage.clearSearchInput(); | ||
userPage.typeInSearchInput(usernametolinkfacilitydoc3); | ||
userPage.checkUsernameText(usernametolinkfacilitydoc3); | ||
manageUserPage.clickFacilitiesTab(); | ||
manageUserPage.selectFacilityFromDropdown(facilitytolinkusername); | ||
manageUserPage.clickLinkFacility(); | ||
manageUserPage.clickUnlinkFacilityButton(); | ||
manageUserPage.clickSubmit(); | ||
manageUserPage.assertnotLinkedFacility; | ||
manageUserPage.linkedfacilitylistnotvisible(); | ||
manageUserPage.clickCloseSlideOver(); | ||
// Go to particular facility doctor connect and all user-id are reflected based on there access | ||
// Path will be facility page to patient page then doctor connect button | ||
manageUserPage.navigateToFacility(); | ||
manageUserPage.typeFacilitySearch(facilitytolinkusername); | ||
manageUserPage.assertFacilityInCard(facilitytolinkusername); | ||
manageUserPage.clickFacilityPatients(); | ||
manageUserPage.clickDoctorConnectButton(); | ||
manageUserPage.assertDoctorConnectVisibility(usernamerealname); | ||
}); | ||
|
||
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,84 @@ | ||
import LoginPage from "../../pageobject/Login/LoginPage"; | ||
import UserProfilePage from "../../pageobject/Users/UserProfilePage"; | ||
import ManageUserPage from "../../pageobject/Users/ManageUserPage"; | ||
|
||
describe("Manage User Profile", () => { | ||
const loginPage = new LoginPage(); | ||
const userProfilePage = new UserProfilePage(); | ||
const manageUserPage = new ManageUserPage(); | ||
|
||
const date_of_birth = "01011999"; | ||
const gender = "Male"; | ||
const email = "[email protected]"; | ||
const phone = "+918899887788"; | ||
const workinghours = "8"; | ||
const doctorQualification = "MBBS"; | ||
const doctorYoE = "10"; | ||
const medicalCouncilRegistration = "1234567890"; | ||
|
||
const facilitySearch = "Dummy Facility 40"; | ||
|
||
before(() => { | ||
loginPage.loginAsDevDoctor(); | ||
cy.saveLocalStorage(); | ||
}); | ||
|
||
beforeEach(() => { | ||
cy.restoreLocalStorage(); | ||
console.log(localStorage); | ||
cy.clearLocalStorage(/filters--.+/); | ||
console.log(localStorage); | ||
cy.awaitUrl("/user/profile"); | ||
}); | ||
|
||
it("Set Dob, Gender, Email, Phone and Working Hours for a user and verify its reflection in user profile", () => { | ||
userProfilePage.clickEditProfileButton(); | ||
|
||
userProfilePage.typedate_of_birth(date_of_birth); | ||
userProfilePage.selectGender(gender); | ||
userProfilePage.typeEmail(email); | ||
userProfilePage.typePhone(phone); | ||
userProfilePage.typeWhatsApp(phone); | ||
userProfilePage.typeWorkingHours(workinghours); | ||
userProfilePage.typeDoctorQualification(doctorQualification); | ||
userProfilePage.typeDoctorYoE(doctorYoE); | ||
userProfilePage.typeMedicalCouncilRegistration(medicalCouncilRegistration); | ||
|
||
userProfilePage.clickUpdateButton(); | ||
|
||
cy.verifyNotification("Details updated successfully"); | ||
|
||
userProfilePage.assertdate_of_birth("01/01/1999"); | ||
userProfilePage.assertGender(gender); | ||
userProfilePage.assertEmail(email); | ||
userProfilePage.assertPhone(phone); | ||
userProfilePage.assertWhatsApp(phone); | ||
userProfilePage.assertWorkingHours(workinghours); | ||
}); | ||
|
||
it("Adding video connect link for a user and verify its reflection in user profile and doctor connect", () => { | ||
// verify the user doesn't have any video connect link | ||
userProfilePage.assertVideoConnectLink("-"); | ||
// Link a new video connect link and ensure it is under video connect link | ||
userProfilePage.clickEditProfileButton(); | ||
userProfilePage.typeVideoConnectLink("https://www.example.com"); | ||
userProfilePage.clickUpdateButton(); | ||
userProfilePage.assertVideoConnectLink("https://www.example.com"); | ||
// Edit the video connect link and ensure it is updated | ||
userProfilePage.clickEditProfileButton(); | ||
userProfilePage.typeVideoConnectLink("https://www.test.com"); | ||
userProfilePage.clickUpdateButton(); | ||
userProfilePage.assertVideoConnectLink("https://www.test.com"); | ||
// Go to particular facility doctor connect and verify the video connect link is present | ||
manageUserPage.navigateToFacility(); | ||
manageUserPage.typeFacilitySearch(facilitySearch); | ||
manageUserPage.assertFacilityInCard(facilitySearch); | ||
manageUserPage.clickFacilityPatients(); | ||
manageUserPage.clickDoctorConnectButton(); | ||
manageUserPage.assertVideoConnectLink("Dev Doctor", "https://www.test.com"); | ||
}); | ||
|
||
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 was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes
File renamed without changes.
Oops, something went wrong.