From 35599b3568424d8800a0271d7fe964d12f3c4aec Mon Sep 17 00:00:00 2001 From: Dean Elliott Date: Wed, 24 Apr 2024 14:25:55 +0100 Subject: [PATCH] Add tests for the payments pages --- src/app/views/_includes/amount-due.njk | 2 +- .../_includes/bank-transfer-instructions.njk | 14 ++-- .../_macros/form/multiple-choice-field.njk | 2 +- src/app/views/payment/bank-transfer.njk | 2 +- src/app/views/payment/options.njk | 2 +- test/end-to-end/cypress/payment-spec.cy.js | 71 +++++++++++++++++++ 6 files changed, 82 insertions(+), 11 deletions(-) create mode 100644 test/end-to-end/cypress/payment-spec.cy.js diff --git a/src/app/views/_includes/amount-due.njk b/src/app/views/_includes/amount-due.njk index 13e4be37..3e41de1b 100644 --- a/src/app/views/_includes/amount-due.njk +++ b/src/app/views/_includes/amount-due.njk @@ -16,7 +16,7 @@ {% call Message({ type: 'muted', element: 'div' }) %} Amount to pay: - + {{ costText | safe }} {% endcall %} diff --git a/src/app/views/_includes/bank-transfer-instructions.njk b/src/app/views/_includes/bank-transfer-instructions.njk index f31bbc02..6070a322 100644 --- a/src/app/views/_includes/bank-transfer-instructions.njk +++ b/src/app/views/_includes/bank-transfer-instructions.njk @@ -1,17 +1,17 @@ -

Please make your payment in sterling for {{ order.total_cost | formatCurrency }} to Department for Business & Trade’s bank account at National Westminster Bank.

+

Please make your payment in sterling for {{ order.total_cost | formatCurrency }} to Department for Business & Trade’s bank account at National Westminster Bank.

- Account Name: DBT OMIS Service
- Account Number: 10014187
- Sort Code: 60-70-80
- Reference: {{ order.reference }} + Account Name: DBT OMIS Service
+ Account Number: 10014187
+ Sort Code: 60-70-80
+ Reference: {{ order.reference }}

For international payments you may also need SWIFT and IBAN.

- SWIFT: NWBKGB2L
- IBAN: GB57NWBK60708010014187 + SWIFT: NWBKGB2L
+ IBAN: GB57NWBK60708010014187

You agree to pay any bank charges incurred with this transaction.

diff --git a/src/app/views/_macros/form/multiple-choice-field.njk b/src/app/views/_macros/form/multiple-choice-field.njk index 20cf47ab..7e57f921 100644 --- a/src/app/views/_macros/form/multiple-choice-field.njk +++ b/src/app/views/_macros/form/multiple-choice-field.njk @@ -88,7 +88,7 @@ {% if isSelected %}checked="checked"{% endif %} {% if props.hint %}aria-describedby="hint-{{ props.fieldId }}"{% endif %} > -