Skip to content

Commit

Permalink
Fix cypress
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashesh3 committed Sep 27, 2023
1 parent 6c14698 commit 582ba11
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions cypress/e2e/patient_spec/patient_crud.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ describe("Patient Creation with consultation", () => {
patientConsultationPage.selectSymptoms("ASYMPTOMATIC");

patientConsultationPage.enterConsultationDetails(
"Stable",
"Examination details and Clinical conditions",
"70",
"170",
Expand Down
8 changes: 8 additions & 0 deletions cypress/pageobject/Patient/PatientConsultation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export class PatientConsultationPage {
}

enterConsultationDetails(
category: string,
examinationDetails: string,
weight: string,
height: string,
Expand All @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 582ba11

Please sign in to comment.