-
Notifications
You must be signed in to change notification settings - Fork 543
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/develop' into remove-dnd
- Loading branch information
Showing
90 changed files
with
4,312 additions
and
2,966 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
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 |
---|---|---|
|
@@ -28,3 +28,6 @@ jobs: | |
|
||
- name: Run lint | ||
run: npm run lint -- --quiet | ||
|
||
- name: Run unimported | ||
run: npm run unimported |
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,54 @@ | ||
{ | ||
"ignorePatterns": [ | ||
"node_modules/**", | ||
"**/*.d.ts" | ||
], | ||
"ignoreUnimported": [ | ||
"src/Locale/update_locale.js", | ||
"src/PluginRegistry.ts", | ||
"src/pluginTypes.ts", | ||
"src/service-worker.ts" | ||
], | ||
"ignoreUnused": [ | ||
"@fontsource/figtree", | ||
"@originjs/vite-plugin-federation", | ||
"@vitejs/plugin-react", | ||
"browserslist-useragent-regexp", | ||
"cross-env", | ||
"postcss-loader" | ||
], | ||
"ignoreUnresolved": [ | ||
[ | ||
"./pluginMap", | ||
[ | ||
"src/pluginTypes.ts" | ||
] | ||
], | ||
[ | ||
"@/supportedBrowsers", | ||
[ | ||
"src/components/ErrorPages/BrowserWarning.tsx" | ||
] | ||
], | ||
[ | ||
"tsx/cjs", | ||
[ | ||
"node_modules/find-cypress-specs/src/index.js" | ||
] | ||
], | ||
[ | ||
"virtual:pwa-register", | ||
[ | ||
"src/index.tsx" | ||
] | ||
] | ||
], | ||
"respectGitignore": true, | ||
"entry": [ | ||
"src/index.tsx", | ||
"vite.config.mts", | ||
"tailwind.config.js", | ||
"cypress.config.ts", | ||
"scripts/**" | ||
] | ||
} |
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,35 @@ | ||
import { PatientDetails } from "@/pageObject/Patients/PatientDetails"; | ||
import { PatientEncounter } from "@/pageObject/Patients/PatientEncounter"; | ||
import { FacilityCreation } from "@/pageObject/facility/FacilityCreation"; | ||
|
||
const facilityCreation = new FacilityCreation(); | ||
const patientEncounter = new PatientEncounter(); | ||
const patientDetails = new PatientDetails(); | ||
|
||
describe("Patient Management", () => { | ||
beforeEach(() => { | ||
cy.loginByApi("doctor"); | ||
cy.visit("/"); | ||
}); | ||
|
||
it("Assign users to a patient", () => { | ||
const userName = "nihal-nurse"; | ||
const userRole = "Nurse"; | ||
facilityCreation.selectFacility("GHC Trikaripur"); | ||
patientEncounter | ||
.navigateToEncounters() | ||
.openFirstEncounterDetails() | ||
.clickPatientDetailsButton(); | ||
patientDetails | ||
.clickUsersTab() | ||
.clickAssignUserButton() | ||
.selectUserToAssign(userName) | ||
.selectUserRole(userRole) | ||
.confirmUserAssignment() | ||
.verifyUserAssignmentSuccess() | ||
.verifyUserContent([userName]) | ||
.clickRemoveUserButton() | ||
.confirmUserRemoval() | ||
.verifyUserRemovalSuccess(); | ||
}); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
export class PatientDetails { | ||
clickUsersTab() { | ||
cy.verifyAndClickElement('[data-cy="tab-users"]', "Users"); | ||
return this; | ||
} | ||
|
||
clickAssignUserButton() { | ||
cy.verifyAndClickElement('[data-cy="assign-user-button"]', "Assign User"); | ||
return this; | ||
} | ||
|
||
selectUserToAssign(username: string) { | ||
cy.typeAndSelectOption( | ||
'[data-cy="patient-user-selector-container"]', | ||
username, | ||
false, | ||
); | ||
return this; | ||
} | ||
|
||
selectUserRole(role: string) { | ||
cy.clickAndSelectOption('[data-cy="patient-user-role-select"]', role); | ||
return this; | ||
} | ||
|
||
confirmUserAssignment() { | ||
cy.verifyAndClickElement( | ||
'[data-cy="patient-user-assign-button"]', | ||
"Assign to Patient", | ||
); | ||
return this; | ||
} | ||
|
||
verifyUserAssignmentSuccess() { | ||
cy.verifyNotification("User added to patient successfully"); | ||
return this; | ||
} | ||
|
||
clickRemoveUserButton() { | ||
cy.get('[data-cy="patient-user-remove-button"]').first().click(); | ||
return this; | ||
} | ||
|
||
confirmUserRemoval() { | ||
cy.verifyAndClickElement( | ||
'[data-cy="patient-user-remove-confirm-button"]', | ||
"Remove", | ||
); | ||
return this; | ||
} | ||
|
||
verifyUserContent(expectedTexts: string[]) { | ||
cy.verifyContentPresence('[data-cy="patient-users"]', expectedTexts); | ||
return this; | ||
} | ||
|
||
verifyUserRemovalSuccess() { | ||
cy.verifyNotification("User removed successfully"); | ||
return this; | ||
} | ||
} |
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.