Skip to content

Commit

Permalink
sanity check
Browse files Browse the repository at this point in the history
  • Loading branch information
carlsmith101 committed Oct 25, 2023
1 parent 14a1036 commit f272260
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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');
Expand Down Expand Up @@ -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();
Expand All @@ -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-${
Expand Down

0 comments on commit f272260

Please sign in to comment.