Skip to content

Commit

Permalink
Fixed Add a better search UI for patients index page ohcnetwork#8691 (o…
Browse files Browse the repository at this point in the history
…hcnetwork#8834)

Co-authored-by: Bodhish Thomas <[email protected]>
Co-authored-by: Shivank Kacker <[email protected]>
  • Loading branch information
3 people authored Dec 5, 2024
1 parent 6e3f6e3 commit a24b9ca
Show file tree
Hide file tree
Showing 18 changed files with 1,489 additions and 285 deletions.
3 changes: 2 additions & 1 deletion cypress/e2e/patient_spec/PatientHomepage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,15 @@ describe("Patient Homepage present functionalities", () => {
patientHome.verifyPatientExportRequest();
});

it("Verify the functionality of the patient tab pagination", () => {
it("Test Pagination on Patient List Page", () => {
let firstPatientPageOne: string;
cy.get('[data-cy="patient"]')
.first()
.invoke("text")
.then((patientOne: string) => {
firstPatientPageOne = patientOne.trim();
pageNavigation.navigateToNextPage();
cy.wait(2000);
pageNavigation.verifyCurrentPageNumber(2);
cy.get('[data-cy="patient"]')
.first()
Expand Down
3 changes: 1 addition & 2 deletions cypress/pageobject/Facility/FacilityHome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ class FacilityHome {
}

typeFacilitySearch(facilityName: string) {
cy.get("#search-by-facility").click().clear();
cy.get("#search-by-facility").click().type(facilityName);
cy.get("#facility-search").click().clear().type(facilityName);
}

clickMenuItem(itemName: string) {
Expand Down
6 changes: 4 additions & 2 deletions cypress/pageobject/Patient/PatientCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export class PatientPage {
}

visitPatient(patientName: string) {
cy.get("#name").click().type(patientName);
cy.get('[data-test-id="patient-search__name"]').click();
cy.get("#patient-search").click().type(patientName); // Type the patient name
cy.intercept("GET", "**/api/v1/consultation/**").as("getPatient");
cy.get("#patient-name-list").contains(patientName).click();
cy.wait(2000);
Expand Down Expand Up @@ -66,7 +67,8 @@ export class PatientPage {
}

typePatientNameList(patientName: string) {
cy.get("#name").click().type(patientName);
cy.get('[data-test-id="patient-search__name"]').click();
cy.get("#patient-search").click().type(patientName);
}

typePatientAddress(address: string) {
Expand Down
Loading

0 comments on commit a24b9ca

Please sign in to comment.