Skip to content

Commit

Permalink
Added Cypress test for adding doctor's note.
Browse files Browse the repository at this point in the history
Added test that adds doctor's note to a patient and verifies if
the note has been added successfully.

Fixes #4235
  • Loading branch information
SahilSingh177 committed Jun 7, 2023
1 parent 2cb4f7d commit 164fadb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cypress/e2e/patient_spec/patient_crud.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,16 @@ describe("Patient Creation with consultation", () => {
cy.get("button#submit").should("be.visible").click();
cy.get("[data-testid='return-to-patient-dashboard']").click();
});

it("Doctor's Note Addition", () => {
cy.visit(patient_url + "/notes");
cy.get("textarea").type("Patient Note");
cy.get("button").contains("Post Your Note").click();
cy.wait(1000);
cy.verifyNotification("Note added successfully");
cy.get("span.added_note").first().should("contain", "Patient Note");
});

afterEach(() => {
cy.saveLocalStorage();
});
Expand Down

0 comments on commit 164fadb

Please sign in to comment.