From 4925c8f1cc6baf0e79c31b61dce528a2bf21e259 Mon Sep 17 00:00:00 2001 From: Ashesh3 <3626859+Ashesh3@users.noreply.github.com> Date: Thu, 23 Nov 2023 23:09:33 +0530 Subject: [PATCH] Fix cypress for doctor notes --- cypress/pageobject/Patient/PatientConsultation.ts | 3 ++- src/Components/Facility/PatientNotesSlideover.tsx | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cypress/pageobject/Patient/PatientConsultation.ts b/cypress/pageobject/Patient/PatientConsultation.ts index 7d2be8734dd..4fb299a4965 100644 --- a/cypress/pageobject/Patient/PatientConsultation.ts +++ b/cypress/pageobject/Patient/PatientConsultation.ts @@ -203,12 +203,13 @@ export class PatientConsultationPage { } addDoctorsNotes(notes: string) { + cy.get("#expand_doctor_notes").click(); cy.get("#doctor_notes_textarea").type(notes); } postDoctorNotes() { cy.intercept("POST", "**/api/v1/patient/*/notes").as("postDoctorNotes"); - cy.get("#submit").contains("Post Your Note").click(); + cy.get("#add_doctor_note_button").click(); cy.wait("@postDoctorNotes").its("response.statusCode").should("eq", 201); } diff --git a/src/Components/Facility/PatientNotesSlideover.tsx b/src/Components/Facility/PatientNotesSlideover.tsx index a04fac93526..27a961b9d9b 100644 --- a/src/Components/Facility/PatientNotesSlideover.tsx +++ b/src/Components/Facility/PatientNotesSlideover.tsx @@ -79,6 +79,7 @@ export default function PatientNotesSlideover(props: PatientNotesProps) { )}
setNoteField(e.value)} @@ -139,6 +141,7 @@ export default function PatientNotesSlideover(props: PatientNotesProps) { disabled={!patientActive} />