From 582ba11b3b7f8fe730c268a18d93091a7a4ee0b5 Mon Sep 17 00:00:00 2001 From: Ashesh3 <3626859+Ashesh3@users.noreply.github.com> Date: Wed, 27 Sep 2023 17:16:42 +0530 Subject: [PATCH] Fix cypress --- cypress/e2e/patient_spec/patient_crud.cy.ts | 1 + cypress/pageobject/Patient/PatientConsultation.ts | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/cypress/e2e/patient_spec/patient_crud.cy.ts b/cypress/e2e/patient_spec/patient_crud.cy.ts index b22ccdbce13..fcfd97039f7 100644 --- a/cypress/e2e/patient_spec/patient_crud.cy.ts +++ b/cypress/e2e/patient_spec/patient_crud.cy.ts @@ -115,6 +115,7 @@ describe("Patient Creation with consultation", () => { patientConsultationPage.selectSymptoms("ASYMPTOMATIC"); patientConsultationPage.enterConsultationDetails( + "Stable", "Examination details and Clinical conditions", "70", "170", diff --git a/cypress/pageobject/Patient/PatientConsultation.ts b/cypress/pageobject/Patient/PatientConsultation.ts index b1c95d19140..6937559d548 100644 --- a/cypress/pageobject/Patient/PatientConsultation.ts +++ b/cypress/pageobject/Patient/PatientConsultation.ts @@ -23,6 +23,7 @@ export class PatientConsultationPage { } enterConsultationDetails( + category: string, examinationDetails: string, weight: string, height: string, @@ -31,6 +32,11 @@ export class PatientConsultationPage { verificationBy: string ) { cy.get("#symptoms").click(); + cy.get("#category") + .click() + .then(() => { + cy.get("[role='option']").contains(category).click(); + }); cy.get("#examination_details").click().type(examinationDetails); cy.get("#weight").click().type(height); cy.get("#height").click().type(weight); @@ -39,10 +45,12 @@ export class PatientConsultationPage { cy.get( "#icd11_diagnoses_object input[placeholder='Select'][role='combobox']" ) + .scrollIntoView() .click() .type("1A"); cy.get("#icd11_diagnoses_object [role='option']") .contains("1A03 Intestinal infections due to Escherichia coli") + .scrollIntoView() .click(); cy.get("label[for='icd11_diagnoses_object']").click(); cy.wait("@getIcdResults").its("response.statusCode").should("eq", 200);