From b9c7021afe3509e0f7f86f44efd33fbd4888cf16 Mon Sep 17 00:00:00 2001 From: Ashesh <3626859+Ashesh3@users.noreply.github.com> Date: Fri, 24 Nov 2023 11:41:45 +0530 Subject: [PATCH] Fix cypress for doctor notes (#6703) --- 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) { )}