From f272260f4c65aa2b9b3aa802c133a552a15f862a Mon Sep 17 00:00:00 2001 From: Carl Smith Date: Wed, 25 Oct 2023 11:57:57 +0100 Subject: [PATCH] sanity check --- .../gp_view_lloyd_george_workflow.cy.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/cypress/e2e/0-ndr-core-tests/gp_view_lloyd_george_workflow.cy.js b/app/cypress/e2e/0-ndr-core-tests/gp_view_lloyd_george_workflow.cy.js index 41cd43a89..31862dcbb 100644 --- a/app/cypress/e2e/0-ndr-core-tests/gp_view_lloyd_george_workflow.cy.js +++ b/app/cypress/e2e/0-ndr-core-tests/gp_view_lloyd_george_workflow.cy.js @@ -1,6 +1,8 @@ import viewLloydGeorgePayload from '../../fixtures/requests/GET_LloydGeorgeStitch.json'; import searchPatientPayload from '../../fixtures/requests/GET_SearchPatient.json'; +const baseUrl = Cypress.env('CYPRESS_BASE_URL') ?? 'http://localhost:3000/'; + describe('GP View Lloyd George Workflow', () => { beforeEach(() => { cy.login('gp'); @@ -88,7 +90,7 @@ describe('GP View Lloyd George Workflow', () => { it('allows a GP user to download the Lloyd George document of an active patient', () => { cy.intercept('GET', '/DocumentManifest*', { statusCode: 200, - body: 'http://localhost:3000/browserconfig.xml', // uses public served file in place of a ZIP file + body: `${baseUrl}browserconfig.xml`, // uses public served file in place of a ZIP file }).as('documentManifest'); cy.getByTestId('actions-menu').click(); @@ -112,6 +114,12 @@ describe('GP View Lloyd George Workflow', () => { ).should('be.visible'); cy.contains(`(NHS number: ${searchPatientPayload.nhsNumber})`).should('be.visible'); + cy.request('http://localhost:3000/browserconfig.xml').then((response) => { + expect(response.status).to.eq(200); + + cy.log('Response:', response); + }); + // Assert file has been downloaded cy.readFile( `${Cypress.config('downloadsFolder')}/lloyd_george-patient-record-${