Skip to content

Commit

Permalink
Fix session reset tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RioKnightleyNHS committed May 16, 2024
1 parent d7807a6 commit 959480a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ describe('GP Workflow: View Lloyd George record', () => {
cy.getByTestId('delete-all-files-link').click();

// assert delete confirmation page is as expected
cy.contains('Are you sure you want to permanently remove this record?:').should(
cy.contains('Are you sure you want to permanently remove this record?').should(
'be.visible',
);
cy.contains('GivenName Surname').should('be.visible');
Expand Down Expand Up @@ -282,8 +282,7 @@ describe('GP Workflow: View Lloyd George record', () => {
cy.getByTestId('delete-all-files-link').should('exist');
cy.getByTestId('delete-all-files-link').click();
// cancel delete
cy.getByTestId('no-radio-btn').click();
cy.getByTestId('delete-submit-btn').click();
cy.getByTestId('start-again-btn').click();

// assert user is returned to view Lloyd George page
cy.contains('Lloyd George record').should('be.visible');
Expand Down Expand Up @@ -318,8 +317,6 @@ describe('GP Workflow: View Lloyd George record', () => {
},
).as('documentDelete');

cy.getByTestId('remove-btn').click();

cy.wait('@documentDelete');

// assert
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,7 @@ describe('PCSE Workflow: Access and download found files', () => {
() => {
cy.getByTestId('delete-all-documents-btn').click();

// cancel delete
cy.getByTestId('no-radio-btn').click();
cy.getByTestId('delete-submit-btn').click();
cy.getByTestId('start-again-btn').click();

// assert user is returned to download documents page
cy.contains('Download electronic health records and attachments').should(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ function RemoveRecordStage({ setStage, recordType }: Props) {
)}
<LinkButton
id="start-again-link"
data-testid="start-again-btn"
type="button"
className="mb-7 ml-3"
onClick={() => {
Expand Down

0 comments on commit 959480a

Please sign in to comment.