Skip to content

Commit

Permalink
feat(EMS-3536-3540): remove 'how your data will be used' declaration (#…
Browse files Browse the repository at this point in the history
…2789)

* feat(EMS-3536-3540): remove 'how data will be used' declaration

* feat(EMS-3536-3540): remove 'how data will be used' declaration

* feat(EMS-3536-3540): remove 'how data will be used' declaration

* feat(EMS-3536-3540): remove 'how data will be used' declaration

* feat(EMS-3536-3540): fix/update e2e test

* feat(EMS-3536-3540): fix/update e2e test
  • Loading branch information
ttbarnes authored Jul 24, 2024
1 parent 4df50b1 commit 9efa559
Show file tree
Hide file tree
Showing 50 changed files with 113 additions and 960 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ jobs:
'declarations/anti-bribery/**/*.spec.js',
'declarations/confidentiality/**/*.spec.js',
'declarations/confirmation-and-acknowledgements/**/*.spec.js',
'declarations/how-your-data-will-be-used/**/*.spec.js',
'eligibility/*.spec.js',
'eligibility/buyer-country/**/*.spec.js',
'eligibility/cannot-apply/**/*.spec.js',
Expand Down
2 changes: 0 additions & 2 deletions e2e-tests/commands/insurance/complete-declarations.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ const completeDeclarations = ({ hasAntiBriberyCodeOfConduct = true, exportingWit
}

cy.completeAndSubmitDeclarationConfirmationAndAcknowledgements();

cy.completeAndSubmitDeclarationHowYourDataWillBeUsed();
};

export default completeDeclarations;

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ export const DECLARATIONS = {
HAS_ANTI_BRIBERY_CODE_OF_CONDUCT: 'hasAntiBriberyCodeOfConduct',
WILL_EXPORT_WITH_CODE_OF_CONDUCT: 'willExportWithAntiBriberyCodeOfConduct',
AGREE_CONFIRMATION_ACKNOWLEDGEMENTS: 'agreeToConfirmationAndAcknowledgements',
AGREE_HOW_YOUR_DATA_WILL_BE_USED: 'agreeHowDataWillBeUsed',
};
2 changes: 0 additions & 2 deletions e2e-tests/constants/routes/insurance/declarations.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,4 @@ export const DECLARATIONS = {
},
CONFIRMATION_AND_ACKNOWLEDGEMENTS: `${ROOT}/confirmation-and-acknowledgements`,
CONFIRMATION_AND_ACKNOWLEDGEMENTS_SAVE_AND_BACK: `${ROOT}/confirmation-and-acknowledgements/save-and-back`,
HOW_YOUR_DATA_WILL_BE_USED: `${ROOT}/data`,
HOW_YOUR_DATA_WILL_BE_USED_SAVE_AND_BACK: `${ROOT}/data/save-and-back`,
};
3 changes: 0 additions & 3 deletions e2e-tests/content-strings/error-messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,6 @@ export const ERROR_MESSAGES = {
[FIELD_IDS.INSURANCE.DECLARATIONS.AGREE_CONFIRMATION_ACKNOWLEDGEMENTS]: {
IS_EMPTY: 'Confirm that you have read and accept the confirmation and acknowledgements',
},
[FIELD_IDS.INSURANCE.DECLARATIONS.AGREE_HOW_YOUR_DATA_WILL_BE_USED]: {
IS_EMPTY: 'Confirm that you have read and accept how your data will be used',
},
},
},
};
16 changes: 1 addition & 15 deletions e2e-tests/content-strings/fields/insurance/declarations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { DECLARATIONS } = FIELD_IDS.INSURANCE;

const { AGREE_CONFIDENTIALITY, AGREE_ANTI_BRIBERY } = DECLARATIONS;

const { HAS_ANTI_BRIBERY_CODE_OF_CONDUCT, AGREE_CONFIRMATION_ACKNOWLEDGEMENTS, AGREE_HOW_YOUR_DATA_WILL_BE_USED } = DECLARATIONS;
const { HAS_ANTI_BRIBERY_CODE_OF_CONDUCT, AGREE_CONFIRMATION_ACKNOWLEDGEMENTS } = DECLARATIONS;

const CONFIRM_READ_AND_AGREE = "Confirm you've read and agree with";

Expand Down Expand Up @@ -45,18 +45,4 @@ export const DECLARATIONS_FIELDS = {
VALUE: true,
},
},
[AGREE_HOW_YOUR_DATA_WILL_BE_USED]: {
LABEL: `${CONFIRM_READ_AND_AGREE} how your data will be used`,
OPTION: {
TEXT: `${HAVE_READ_AND_AGREED} how my data will be used`,
VALUE: true,
},
},
[AGREE_CONFIRMATION_ACKNOWLEDGEMENTS]: {
LABEL: `${CONFIRM_READ_AND_AGREE} confirmation and acknowledgements`,
OPTION: {
TEXT: `${HAVE_READ_AND_AGREED} confirmation and acknowledgements`,
VALUE: true,
},
},
};

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ import { ANTI_BRIBERY } from './anti-bribery';
import { ANTI_BRIBERY_CODE_OF_CONDUCT } from './anti-bribery-code-of-conduct';
import { ANTI_BRIBERY_EXPORTING_WITH_CODE_OF_CONDUCT } from './anti-bribery-exporting-with-code-of-conduct';
import { CONFIRMATION_AND_ACKNOWLEDGEMENTS } from './confirmation-and-acknowledgements';
import { HOW_YOUR_DATA_WILL_BE_USED } from './how-your-data-will-be-used';

export default {
CONFIDENTIALITY,
ANTI_BRIBERY,
ANTI_BRIBERY_CODE_OF_CONDUCT,
ANTI_BRIBERY_EXPORTING_WITH_CODE_OF_CONDUCT,
CONFIRMATION_AND_ACKNOWLEDGEMENTS,
HOW_YOUR_DATA_WILL_BE_USED,
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const CONTENT_STRINGS = PAGES.INSURANCE.APPLICATION_SUBMITTED;

const {
ROOT: INSURANCE_ROOT,
DECLARATIONS: { HOW_YOUR_DATA_WILL_BE_USED },
DECLARATIONS: { CONFIRMATION_AND_ACKNOWLEDGEMENTS },
APPLICATION_SUBMITTED,
FEEDBACK,
} = INSURANCE_ROUTES;
Expand Down Expand Up @@ -42,7 +42,7 @@ context('Insurance - application submitted page', () => {
cy.corePageChecks({
pageTitle: CONTENT_STRINGS.PAGE_TITLE,
currentHref: `${INSURANCE_ROOT}/${referenceNumber}${APPLICATION_SUBMITTED}`,
backLink: `${INSURANCE_ROOT}/${referenceNumber}${HOW_YOUR_DATA_WILL_BE_USED}`,
backLink: `${INSURANCE_ROOT}/${referenceNumber}${CONFIRMATION_AND_ACKNOWLEDGEMENTS}`,
assertBackLink: false,
hasAForm: false,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const {
CONFIDENTIALITY,
ANTI_BRIBERY: { ROOT: ANTI_BRIBERY_ROOT, CODE_OF_CONDUCT, EXPORTING_WITH_CODE_OF_CONDUCT },
CONFIRMATION_AND_ACKNOWLEDGEMENTS,
HOW_YOUR_DATA_WILL_BE_USED,
},
} = INSURANCE_ROUTES;

Expand Down Expand Up @@ -73,12 +72,4 @@ context('Insurance - Declaration - cannot skip to any Declarations page without

cy.assertUrl(completeOtherSectionsUrl);
});

it(`should redirect to ${COMPLETE_OTHER_SECTIONS} when navigating to the Declarations - How your data will be used page directly`, () => {
const url = `${insuranceRoute}/${referenceNumber}${HOW_YOUR_DATA_WILL_BE_USED}`;

cy.navigateToUrl(url);

cy.assertUrl(completeOtherSectionsUrl);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ const { taskList } = partials.insurancePartials;
const CONTENT_STRINGS = PAGES.INSURANCE.DECLARATIONS.CONFIRMATION_AND_ACKNOWLEDGEMENTS;

const {
ROOT: INSURANCE_ROOT,
APPLICATION_SUBMITTED,
DECLARATIONS: {
HOW_YOUR_DATA_WILL_BE_USED,
ANTI_BRIBERY: { EXPORTING_WITH_CODE_OF_CONDUCT },
CONFIRMATION_AND_ACKNOWLEDGEMENTS,
},
ROOT: INSURANCE_ROOT,
} = INSURANCE_ROUTES;

const FIELD_ID = FIELD_IDS.INSURANCE.DECLARATIONS.AGREE_CONFIRMATION_ACKNOWLEDGEMENTS;
Expand All @@ -40,6 +40,8 @@ context(

cy.completePrepareApplicationSinglePolicyType({ referenceNumber });

cy.completeAndSubmitCheckYourAnswers();

// go to the page we want to test.
taskList.submitApplication.tasks.declarationsAndSubmit.link().click();

Expand Down Expand Up @@ -136,23 +138,15 @@ context(
});

describe('when submitting a fully completed form', () => {
it(`should redirect to ${HOW_YOUR_DATA_WILL_BE_USED}`, () => {
it(`should redirect to ${APPLICATION_SUBMITTED}`, () => {
cy.navigateToUrl(url);

cy.completeAndSubmitDeclarationConfirmationAndAcknowledgements();

const expectedUrl = `${baseUrl}${INSURANCE_ROOT}/${referenceNumber}${HOW_YOUR_DATA_WILL_BE_USED}`;
const expectedUrl = `${baseUrl}${INSURANCE_ROOT}/${referenceNumber}${APPLICATION_SUBMITTED}`;

cy.assertUrl(expectedUrl);
});

describe('when going back to the page', () => {
it('should have the submitted value', () => {
cy.navigateToUrl(url);

cy.assertRadioOptionIsChecked(field.input());
});
});
});
});
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ context('Insurance - Declarations - Confirmation and acknowledgements page - Sav
cy.assertAllSectionsUrl(referenceNumber);
});

it('should retain the status of task `declarations` as `in progress`', () => {
cy.checkTaskDeclarationsAndSubmitStatusIsInProgress();
it('should update the status of task `declarations` to `completed`', () => {
cy.checkTaskDeclarationsAndSubmitStatusIsComplete();
});

it('should have the originally submitted answer selected when going back to the page after submission', () => {
Expand Down

This file was deleted.

Loading

0 comments on commit 9efa559

Please sign in to comment.