From a4f765d59391ae44a0477bcc41aee9756fd55ce8 Mon Sep 17 00:00:00 2001 From: Jack Sutton Date: Wed, 27 Nov 2024 13:31:17 +0000 Subject: [PATCH 1/4] removes start again button from remove lloyd george record page --- .../_delete/removeRecordStage/RemoveRecordStage.tsx | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/app/src/components/blocks/_delete/removeRecordStage/RemoveRecordStage.tsx b/app/src/components/blocks/_delete/removeRecordStage/RemoveRecordStage.tsx index 7a9a12458..eef1ab611 100644 --- a/app/src/components/blocks/_delete/removeRecordStage/RemoveRecordStage.tsx +++ b/app/src/components/blocks/_delete/removeRecordStage/RemoveRecordStage.tsx @@ -165,17 +165,6 @@ function RemoveRecordStage({ numberOfFiles, recordType, setDownloadStage, resetD Remove all files )} - { - navigate(routes.LLOYD_GEORGE); - }} - > - Start again - )} From 38ecc3d5aebfbbc6781ecabe6d293c28070faeaa Mon Sep 17 00:00:00 2001 From: Jack Sutton Date: Wed, 27 Nov 2024 13:35:26 +0000 Subject: [PATCH 2/4] removes start again expectation from remove LGR tests --- .../blocks/_delete/removeRecordStage/RemoveRecordStage.test.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/src/components/blocks/_delete/removeRecordStage/RemoveRecordStage.test.tsx b/app/src/components/blocks/_delete/removeRecordStage/RemoveRecordStage.test.tsx index 31339a220..891c4fa07 100644 --- a/app/src/components/blocks/_delete/removeRecordStage/RemoveRecordStage.test.tsx +++ b/app/src/components/blocks/_delete/removeRecordStage/RemoveRecordStage.test.tsx @@ -103,7 +103,6 @@ describe('RemoveRecordStage', () => { ).toBeInTheDocument(); }); - expect(screen.getByRole('button', { name: 'Start again' })).toBeInTheDocument(); expect( screen.queryByRole('button', { name: 'Remove all files' }), ).not.toBeInTheDocument(); @@ -124,7 +123,6 @@ describe('RemoveRecordStage', () => { ).toBeInTheDocument(); }); - expect(screen.getByRole('button', { name: 'Start again' })).toBeInTheDocument(); expect(screen.getByText(searchResults[0].fileName)).toBeInTheDocument(); expect(screen.getByText(searchResults[1].fileName)).toBeInTheDocument(); }); From e695c6dd4085ee222d1a35e049b19203015c9545 Mon Sep 17 00:00:00 2001 From: Jack Sutton Date: Wed, 27 Nov 2024 15:19:17 +0000 Subject: [PATCH 3/4] fixes cypress tests --- .../gp_user_workflows/view_lloyd_george_is_bsol_workflow.cy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/cypress/e2e/0-ndr-core-tests/gp_user_workflows/view_lloyd_george_is_bsol_workflow.cy.js b/app/cypress/e2e/0-ndr-core-tests/gp_user_workflows/view_lloyd_george_is_bsol_workflow.cy.js index 18d200093..d60e248df 100644 --- a/app/cypress/e2e/0-ndr-core-tests/gp_user_workflows/view_lloyd_george_is_bsol_workflow.cy.js +++ b/app/cypress/e2e/0-ndr-core-tests/gp_user_workflows/view_lloyd_george_is_bsol_workflow.cy.js @@ -323,7 +323,7 @@ describe('GP Workflow: View Lloyd George record', () => { // cancel delete cy.wait('@searchDocs'); - cy.getByTestId('start-again-btn').click(); + cy.contains('Go back').click(); // assert user is returned to view Lloyd George page cy.contains('Lloyd George record').should('be.visible'); From ca2ae0b3b54d5eb8c16e72afb45ac1c624d2633b Mon Sep 17 00:00:00 2001 From: Jack Sutton Date: Wed, 27 Nov 2024 15:28:50 +0000 Subject: [PATCH 4/4] remove unnessecary imports --- .../blocks/_delete/removeRecordStage/RemoveRecordStage.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/components/blocks/_delete/removeRecordStage/RemoveRecordStage.tsx b/app/src/components/blocks/_delete/removeRecordStage/RemoveRecordStage.tsx index eef1ab611..430ff6285 100644 --- a/app/src/components/blocks/_delete/removeRecordStage/RemoveRecordStage.tsx +++ b/app/src/components/blocks/_delete/removeRecordStage/RemoveRecordStage.tsx @@ -1,7 +1,6 @@ import React, { Dispatch, SetStateAction, useEffect, useRef, useState } from 'react'; import useTitle from '../../../../helpers/hooks/useTitle'; import { Button, Table, WarningCallout } from 'nhsuk-react-components'; -import LinkButton from '../../../generic/linkButton/LinkButton'; import { SearchResult } from '../../../../types/generic/searchResult'; import getDocumentSearchResults from '../../../../helpers/requests/getDocumentSearchResults'; import usePatient from '../../../../helpers/hooks/usePatient';