Skip to content

Commit

Permalink
fix medibase tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Mar 11, 2024
1 parent eb0343a commit 00f2386
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions cypress/e2e/patient_spec/patient_consultation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/patient_spec/patient_manage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
8 changes: 4 additions & 4 deletions cypress/pageobject/Patient/PatientPrescription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down

0 comments on commit 00f2386

Please sign in to comment.