From 45f5f17f531182725b68846e268f024d8c93885a Mon Sep 17 00:00:00 2001 From: Scott Alexander Date: Mon, 27 Nov 2023 17:33:06 +0000 Subject: [PATCH] fixed breaking test, space is reuqired for first and middle name --- .../pcse_user_workflows/download_patient_files_workflow.cy.js | 2 +- app/src/components/generic/patientSummary/PatientSummary.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/cypress/e2e/0-ndr-core-tests/pcse_user_workflows/download_patient_files_workflow.cy.js b/app/cypress/e2e/0-ndr-core-tests/pcse_user_workflows/download_patient_files_workflow.cy.js index b7b0065bf..549191c15 100644 --- a/app/cypress/e2e/0-ndr-core-tests/pcse_user_workflows/download_patient_files_workflow.cy.js +++ b/app/cypress/e2e/0-ndr-core-tests/pcse_user_workflows/download_patient_files_workflow.cy.js @@ -63,7 +63,7 @@ describe('PCSE Workflow: Access and download found files', () => { cy.get('#patient-summary-family-name').should('have.text', patient.familyName); const givenName = patient.givenName[0]; - cy.get('#patient-summary-given-name').should('have.text', givenName); + cy.get('#patient-summary-given-name').should('have.text', givenName + ' '); cy.get('#patient-summary-date-of-birth').should( 'have.text', patient.birthDate.toLocaleDateString('en-GB', { diff --git a/app/src/components/generic/patientSummary/PatientSummary.tsx b/app/src/components/generic/patientSummary/PatientSummary.tsx index 8a9dc5cfd..f28570fbd 100644 --- a/app/src/components/generic/patientSummary/PatientSummary.tsx +++ b/app/src/components/generic/patientSummary/PatientSummary.tsx @@ -23,7 +23,7 @@ const PatientSummary = ({ patientDetails }: Props) => { First name - {patientDetails?.givenName?.map((name) => `${name}`)} + {patientDetails?.givenName?.map((name) => `${name} `)}