Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Sep 6, 2023
1 parent 89c9f77 commit 86db591
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cypress/e2e/patient_spec/patient_crud.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,21 +186,24 @@ describe("Patient Creation with consultation", () => {
cy.get("#weight").click().type("70");
cy.get("#height").click().type("170");
cy.get("#patient_no").type("IP007");

cy.intercept("GET", "**/icd/**").as("getIcdResults");
cy.get(
"#icd11_diagnoses_object input[placeholder='Select'][role='combobox']"
)
.click()
.type("1A");
cy.wait(1000);
cy.get("#icd11_diagnoses_object [role='option']")
.contains("1A03 Intestinal infections due to Escherichia coli")
.click();
cy.wait(1000);
cy.get("label[for='icd11_diagnoses_object']").click();
cy.wait("@getIcdResults").its("response.statusCode").should("eq", 200);

cy.get("#icd11_principal_diagnosis [role='combobox']").click().type("1A");
cy.wait(1000);
cy.get("#icd11_principal_diagnosis [role='option']")
.contains("1A03 Intestinal infections due to Escherichia coli")
.click();

cy.get("#consultation_notes").click().type("generalnote");
cy.get("#verified_by").click().type("generalnote");
cy.get("#submit").click();
Expand Down

0 comments on commit 86db591

Please sign in to comment.