Skip to content

Commit

Permalink
[PRMDR-554] fixing cypress tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NogaNHS committed Jan 22, 2024
1 parent 1f88159 commit 571ab03
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,15 @@ describe('GP Workflow: View Lloyd George record', () => {
cy.get('#verify-submit').click();

//Assert
assertPatientInfo();
assertFailedLloydGeorgeLoad();
cy.contains('Sorry, there is a problem with the service').should('be.visible');
},
);
});
});

context('View Lloyd George document with specific role tests', () => {
it(
'It displays an error with a download link when a Lloyd George stitching timeout occures via the API Gatway for a GP_ADMIN',
'It displays an error with a download link when a Lloyd George stitching timeout occurs via the API Gateway for a GP_ADMIN',
{ tags: 'regression' },
() => {
beforeEachConfiguration(Roles.GP_ADMIN);
Expand All @@ -151,7 +150,7 @@ describe('GP Workflow: View Lloyd George record', () => {
);

it(
'It displays an error with download link when a Lloyd George stitching timeout occures via the API Gatway for a GP_CLINICAL but link access is denied',
'It displays an error with download link when a Lloyd George stitching timeout occurs via the API Gateway for a GP_CLINICAL but link access is denied',
{ tags: 'regression' },
() => {
beforeEachConfiguration(Roles.GP_CLINICAL);
Expand Down Expand Up @@ -287,7 +286,7 @@ describe('GP Workflow: View Lloyd George record', () => {
cy.wait('@documentDelete');

// assert
cy.getByTestId('service-error').should('be.visible');
cy.contains('Sorry, there is a problem with the service').should('be.visible');
},
);

Expand Down Expand Up @@ -346,7 +345,7 @@ describe('GP Workflow: View Lloyd George record', () => {
cy.wait('@documentManifest');

// Assert
cy.contains('An error has occurred while preparing your download').should('be.visible');
cy.contains('Sorry, there is a problem with the service').should('be.visible');
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ describe('GP Workflow: View Lloyd George record', () => {
cy.get('#verify-submit').click();

//Assert
assertPatientInfo();
assertFailedLloydGeorgeLoad();
cy.contains('Sorry, there is a problem with the service').should(
'be.visible',
);
},
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ describe('PCSE Workflow: Access and download found files', () => {

navigateToDownload(roles.PCSE);

cy.get('#service-error').should('exist');
cy.contains('Sorry, there is a problem with the service').should('be.visible');
},
);

Expand Down Expand Up @@ -307,7 +307,7 @@ describe('PCSE Workflow: Access and download found files', () => {
cy.getByTestId('delete-submit-btn').click();

// assert
cy.getByTestId('service-error').should('be.visible');
cy.contains('Sorry, there is a problem with the service').should('be.visible');
},
);

Expand All @@ -330,7 +330,7 @@ describe('PCSE Workflow: Access and download found files', () => {
cy.getByTestId('delete-submit-btn').click();

// assert
cy.getByTestId('service-error').should('be.visible');
cy.contains('Sorry, there is a problem with the service').should('be.visible');
},
);
});
Expand Down

0 comments on commit 571ab03

Please sign in to comment.