Skip to content

Commit

Permalink
Fix invalid page title while rendering consent form (#7515)
Browse files Browse the repository at this point in the history
* Fix invalid page title while rendering consent form

* Refactor verifyNotification command in commands.ts

* fix the flaky test

* fix the flaky test

---------

Co-authored-by: Mohammed Nihal <[email protected]>
  • Loading branch information
Ashesh3 and nihal467 authored Apr 1, 2024
1 parent 2124232 commit f96d5ca
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions cypress/e2e/patient_spec/patient_consultation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ describe("Patient Consultation in multiple combination", () => {
cy.verifyNotification(
"Create Diagnoses - Atleast one diagnosis is required"
);
cy.closeNotification();
patientConsultationPage.selectPatientDiagnosis(
diagnosis4,
"add-icd11-diagnosis-as-confirmed"
Expand Down
3 changes: 3 additions & 0 deletions cypress/e2e/patient_spec/patient_logupdate.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
patientConsultationPage.selectPatientSuggestion("Domiciliary Care");
cy.submitButton("Update Consultation");
cy.verifyNotification("Consultation updated successfully");
cy.closeNotification();
patientLogupdate.clickLogupdate();
patientLogupdate.typePhysicalExamination(physicalExamination);
patientLogupdate.typeOtherDetails(otherExamination);
Expand Down Expand Up @@ -79,6 +80,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
patientConsultationPage.selectPatientSuggestion("Domiciliary Care");
cy.submitButton("Update Consultation");
cy.verifyNotification("Consultation updated successfully");
cy.closeNotification();
patientLogupdate.clickLogupdate();
patientLogupdate.typePhysicalExamination(physicalExamination);
patientLogupdate.typeOtherDetails(otherExamination);
Expand All @@ -95,6 +97,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
cy.get("#consciousness_level-2").click();
cy.submitButton("Save");
cy.verifyNotification("Consultation Updates details created successfully");
cy.closeNotification();
// edit the card and verify the data.
patientLogupdate.clickLogupdateCard("#dailyround-entry", patientCategory);
cy.verifyContentPresence("#consultation-preview", [
Expand Down
3 changes: 1 addition & 2 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ Cypress.Commands.add(
);

Cypress.Commands.add("verifyNotification", (text) => {
cy.get(".pnotify-container").should("exist").contains(text);
return cy.get(".pnotify-container").contains(text).click({ force: true });
return cy.get(".pnotify-container").should("exist").contains(text);
});

Cypress.on("uncaught:exception", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,7 @@ export const ConsultationUpdatesTab = (props: ConsultationTabProps) => {
} )`}
</div>
<FileUpload
changePageMetadata={false}
type="CONSENT_RECORD"
hideBack
unspecified
Expand Down

0 comments on commit f96d5ca

Please sign in to comment.