Skip to content

Commit

Permalink
Fix cypress tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RioKnightleyNHS committed May 16, 2024
1 parent 3080c43 commit d7807a6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 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 delete files for:').should(
cy.contains('Are you sure you want to permanently remove this record?:').should(
'be.visible',
);
cy.contains('GivenName Surname').should('be.visible');
Expand All @@ -242,8 +242,7 @@ describe('GP Workflow: View Lloyd George record', () => {
},
).as('documentDelete');

cy.getByTestId('yes-radio-btn').click();
cy.getByTestId('delete-submit-btn').click();
cy.getByTestId('remove-btn').click();

cy.wait('@documentDelete');

Expand Down Expand Up @@ -319,8 +318,7 @@ describe('GP Workflow: View Lloyd George record', () => {
},
).as('documentDelete');

cy.getByTestId('yes-radio-btn').click();
cy.getByTestId('delete-submit-btn').click();
cy.getByTestId('remove-btn').click();

cy.wait('@documentDelete');

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

cy.getByTestId('delete-all-documents-btn').click();

cy.getByTestId('yes-radio-btn').click();
cy.getByTestId('delete-submit-btn').click();
cy.getByTestId('remove-btn').click();

cy.wait('@documentDelete');

Expand Down Expand Up @@ -306,8 +305,7 @@ describe('PCSE Workflow: Access and download found files', () => {

cy.getByTestId('delete-all-documents-btn').click();

cy.getByTestId('yes-radio-btn').click();
cy.getByTestId('delete-submit-btn').click();
cy.getByTestId('remove-btn').click();

// assert
cy.contains('Sorry, there is a problem with the service').should('be.visible');
Expand All @@ -329,8 +327,7 @@ describe('PCSE Workflow: Access and download found files', () => {

cy.getByTestId('delete-all-documents-btn').click();

cy.getByTestId('yes-radio-btn').click();
cy.getByTestId('delete-submit-btn').click();
cy.getByTestId('remove-btn').click();

// assert
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 @@ -152,6 +152,7 @@ function RemoveRecordStage({ setStage, recordType }: Props) {
<div className="align-bottom h-100">
{submissionState === SUBMISSION_STATE.SUCCEEDED && (
<Button
data-testid="remove-btn"
onClick={() => {
setStage(LG_RECORD_STAGE.DELETE_ALL);
}}
Expand Down

0 comments on commit d7807a6

Please sign in to comment.