From 00f2386cf683b60b5c30c93206c7e3bf359a2c13 Mon Sep 17 00:00:00 2001 From: rithviknishad Date: Tue, 12 Mar 2024 00:15:38 +0530 Subject: [PATCH] fix medibase tests --- cypress/e2e/patient_spec/patient_consultation.cy.ts | 4 ++-- cypress/e2e/patient_spec/patient_manage.cy.ts | 4 ++-- cypress/pageobject/Patient/PatientPrescription.ts | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cypress/e2e/patient_spec/patient_consultation.cy.ts b/cypress/e2e/patient_spec/patient_consultation.cy.ts index 99565a24cc4..f5bd7e1a85c 100644 --- a/cypress/e2e/patient_spec/patient_consultation.cy.ts +++ b/cypress/e2e/patient_spec/patient_consultation.cy.ts @@ -99,9 +99,9 @@ describe("Patient Consultation in multiple combination", () => { cy.verifyNotification("Consultation created successfully"); // Below code for the prescription module only present while creating a new consultation patientPrescription.clickAddPrescription(); - patientPrescription.interceptMediaBase(); + patientPrescription.interceptMedibase(); patientPrescription.selectMedicinebox(); - patientPrescription.waitForMediabaseStatusCode(); + patientPrescription.waitForMedibaseStatusCode(); patientPrescription.selectMedicine(medicineOne); patientPrescription.enterDosage("3"); patientPrescription.selectDosageFrequency("Twice daily"); diff --git a/cypress/e2e/patient_spec/patient_manage.cy.ts b/cypress/e2e/patient_spec/patient_manage.cy.ts index 313b62ba43d..86f97da9611 100644 --- a/cypress/e2e/patient_spec/patient_manage.cy.ts +++ b/cypress/e2e/patient_spec/patient_manage.cy.ts @@ -49,9 +49,9 @@ describe("Patient", () => { patientPage.visitPatient("Dummy Patient 4"); patientPrescription.visitEditPrescriptionPage(); patientPrescription.clickAddPrescription(); - patientPrescription.interceptMediaBase(); + patientPrescription.interceptMedibase(); patientPrescription.selectMedicinebox(); - patientPrescription.waitForMediabaseStatusCode(); + patientPrescription.waitForMedibaseStatusCode(); patientPrescription.selectMedicine("DOLO"); patientPrescription.enterDosage("4"); patientPrescription.selectDosageFrequency("Twice daily"); diff --git a/cypress/pageobject/Patient/PatientPrescription.ts b/cypress/pageobject/Patient/PatientPrescription.ts index c20d32672d6..df4c6f6f02d 100644 --- a/cypress/pageobject/Patient/PatientPrescription.ts +++ b/cypress/pageobject/Patient/PatientPrescription.ts @@ -5,8 +5,8 @@ export class PatientPrescription { .click(); } - interceptMediaBase() { - cy.intercept("GET", "**/api/v1/medibase/**").as("getMediaBase"); + interceptMedibase() { + cy.intercept("GET", "**/api/v1/medibase/").as("getMedibase"); } selectMedicine(medicine: string) { @@ -22,8 +22,8 @@ export class PatientPrescription { ).click(); } - waitForMediabaseStatusCode() { - cy.wait("@getMediaBase").its("response.statusCode").should("eq", 200); + waitForMedibaseStatusCode() { + cy.wait("@getMedibase").its("response.statusCode").should("eq", 200); } enterDosage(doseAmount: string) {