From cc65ee6a5bd01ed83e86f9e08dbc826bccc01cd2 Mon Sep 17 00:00:00 2001 From: Mohammed Nihal <57055998+nihal467@users.noreply.github.com> Date: Fri, 27 Sep 2024 15:55:55 +0530 Subject: [PATCH] fixed the flaky bed assignment in consultation --- cypress/e2e/patient_spec/PatientConsultationCreation.cy.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/patient_spec/PatientConsultationCreation.cy.ts b/cypress/e2e/patient_spec/PatientConsultationCreation.cy.ts index a27d560e1a0..6f9bf2b03e0 100644 --- a/cypress/e2e/patient_spec/PatientConsultationCreation.cy.ts +++ b/cypress/e2e/patient_spec/PatientConsultationCreation.cy.ts @@ -35,7 +35,7 @@ describe("Patient Consultation in multiple combination", () => { const patientWeight = "70"; const patientHeight = "170"; const medicineOne = "DOLOLUP"; - const patientIpNumber = Math.random().toString(36).substring(7); + const patientIpNumber = `${Math.floor(Math.random() * 90 + 10)}/${Math.floor(Math.random() * 9000 + 1000)}`; before(() => { loginPage.loginAsDisctrictAdmin(); @@ -94,7 +94,7 @@ describe("Patient Consultation in multiple combination", () => { cy.submitButton("Create Consultation"); // the above submit should fail as IP number is missing patientConsultationPage.typePatientNumber(patientIpNumber); - patientConsultationPage.selectBed("Dummy Bed 1"); + patientConsultationPage.selectBed("Dummy Bed 6"); cy.submitButton("Create Consultation"); cy.verifyNotification("Consultation created successfully"); // Below code for the prescription module only present while creating a new consultation