diff --git a/cypress/e2e/patient_spec/PatientHomepage.cy.ts b/cypress/e2e/patient_spec/PatientHomepage.cy.ts index cb0474eb008..8f5ac03a9ef 100644 --- a/cypress/e2e/patient_spec/PatientHomepage.cy.ts +++ b/cypress/e2e/patient_spec/PatientHomepage.cy.ts @@ -160,9 +160,7 @@ describe("Patient Homepage present functionalities", () => { .invoke("text") .then((patientOne: string) => { firstPatientPageOne = patientOne.trim(); - pageNavigation.interceptPatientNavigation(); pageNavigation.navigateToNextPage(); - pageNavigation.verifyPatientNavigation(); pageNavigation.verifyCurrentPageNumber(2); cy.get('[data-cy="patient"]') .first() diff --git a/cypress/e2e/patient_spec/PatientRegistration.cy.ts b/cypress/e2e/patient_spec/PatientRegistration.cy.ts index 9cf6d5b79e5..5601f994c53 100644 --- a/cypress/e2e/patient_spec/PatientRegistration.cy.ts +++ b/cypress/e2e/patient_spec/PatientRegistration.cy.ts @@ -247,7 +247,7 @@ describe("Patient Creation with consultation", () => { // allow the transfer button of a patient patientTransfer.clickAllowPatientTransferButton(); // Verify the patient error message for the same facility - cy.awaitUrl("/patients"); + cy.visit("/patients"); patientPage.createPatient(); patientPage.selectFacility(patientTransferFacility); patientPage.patientformvisibility(); diff --git a/cypress/pageobject/Patient/PatientCreation.ts b/cypress/pageobject/Patient/PatientCreation.ts index e219e235218..bdc65c7d431 100644 --- a/cypress/pageobject/Patient/PatientCreation.ts +++ b/cypress/pageobject/Patient/PatientCreation.ts @@ -183,7 +183,7 @@ export class PatientPage { visitPatientUrl() { this.interceptGetPatient(); - cy.visit(patient_url); + cy.awaitUrl(patient_url); this.verifyGetPatientResponse(); } @@ -240,7 +240,7 @@ export class PatientPage { expect($dashboard).to.contain(patientName); expect($dashboard).to.contain(phoneNumber); expect($dashboard).to.contain(emergencyPhoneNumber); - //expect($dashboard).to.contain(yearOfBirth); //Commented out because new proposed UI does not have DOB. Can change later. + expect($dashboard).to.contain(yearOfBirth); expect($dashboard).to.contain(bloodGroup); expect($dashboard).to.contain(occupation); socioeconomicStatus && diff --git a/cypress/pageobject/utils/paginationHelpers.ts b/cypress/pageobject/utils/paginationHelpers.ts index 7a1e16cc261..edbabec5523 100644 --- a/cypress/pageobject/utils/paginationHelpers.ts +++ b/cypress/pageobject/utils/paginationHelpers.ts @@ -10,15 +10,4 @@ export const pageNavigation = { navigateToPreviousPage() { cy.get("button#prev-pages").click(); }, - - interceptPatientNavigation() { - cy.intercept( - "GET", - "/api/v1/patient/?page=*&limit=*&is_active=True&offset=*", - ).as("getPatientPage"); - }, - - verifyPatientNavigation() { - cy.wait("@getPatientPage").its("response.statusCode").should("eq", 200); - }, };