From e2496b0dee6d91dc77813e3f71e6e2582e2435ba Mon Sep 17 00:00:00 2001 From: Steve Coleman-Williams Date: Thu, 16 Jan 2025 16:01:18 +0000 Subject: [PATCH 1/2] update declaration copy --- src/server/check-answers/index.njk | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/server/check-answers/index.njk b/src/server/check-answers/index.njk index 865d06b4..26c01f11 100644 --- a/src/server/check-answers/index.njk +++ b/src/server/check-answers/index.njk @@ -19,14 +19,10 @@ {% endblock %} {% block questions %}

Your declaration

-

Before you submit your application, you need to confirm:

- +

+ Before you submit your application, you must select one of the declaration + check boxes. +

{{ govukCheckboxes @@ -43,13 +39,13 @@ }, items: [{ value: "confirm", - text: "I confirm the above statements", + text: "I confirm all the information given about my farm or premises is correct to the best of my knowledge", attributes: { 'data-testid': 'confirm-statements-checkbox' } }, { value: "other", - text: "I am submitting this form on behalf of someone else and confirm the above statements", + text: "I am submitting this form on behalf of someone else and confirm all the information given is correct to the best of my knowledge", attributes: { 'data-testid': 'someone-else-checkbox' } From 0dd8ed4b53b84b29526d1c6098e5dd4fcb94fa55 Mon Sep 17 00:00:00 2001 From: Hugh FD Jackson Date: Fri, 17 Jan 2025 08:53:22 +0000 Subject: [PATCH 2/2] DSFAAP-736: snapshot testing to capture page copy content --- .../__snapshots__/index.test.js.snap | 162 ++++++++++++++++++ src/server/check-answers/index.test.js | 1 + 2 files changed, 163 insertions(+) create mode 100644 src/server/check-answers/__snapshots__/index.test.js.snap diff --git a/src/server/check-answers/__snapshots__/index.test.js.snap b/src/server/check-answers/__snapshots__/index.test.js.snap new file mode 100644 index 00000000..7a129612 --- /dev/null +++ b/src/server/check-answers/__snapshots__/index.test.js.snap @@ -0,0 +1,162 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`#CheckAnswers Should provide expected response 1`] = ` +" +
+
+

Check your answers before sending your application

+
+
+
+
+
+
+

Movement origin

+ +
+
+
+ Are you moving the animals on or off your farm or premises? +
+
+ Off the farm or premises +
+
+ Change Are you moving the animals on or off your farm or premises? +
+
+
+
+ What type of premises are the animals moving off? +
+
+ Approved finishing unit (AFU) +
+
+ Change What type of premises are the animals moving off? +
+
+
+
+ What is the County Parish Holding (CPH) number of your farm or premises where the animals are moving off? +
+
+ 12/123/1234 +
+
+ Change What is the County Parish Holding (CPH) number of your farm or premises where the animals are moving off? +
+
+
+
+ What is the address of your farm or premises where the animals are moving off? +
+
+ Starfleet Headquarters
24-593 Federation Drive
San Francisco
San Francisco
RG24 8RR +
+
+ Change What is the address of your farm or premises where the animals are moving off? +
+
+
+ +

Movement destination

+ +
+
+
+ Where are the animals going to? +
+
+ Dedicated sale for TB (orange market) +
+
+ Change Where are the animals going to? +
+
+
+ +

Receiving the licence

+ +
+
+
+ What is the name of the County Parish Holding (CPH) owner? +
+
+ William T. Riker +
+
+ Change What is the name of the County Parish Holding (CPH) owner? +
+
+
+
+ How would you like this licence sent to you? +
+
+ email +
+
+ Change How would you like this licence sent to you? +
+
+
+
+ What email address would you like the licence sent to? +
+
+ name@example.com +
+
+ Change What email address would you like the licence sent to? +
+
+
+ +
+
+
+
+
+
+
+ + +

Your declaration

+

+ Before you submit your application, you must select one of the declaration + check boxes. +

+ +
+
+
+
+ + +
+
+ + +
+
+
+
+ +
+
+
+
+ +
+
+
+ " +`; diff --git a/src/server/check-answers/index.test.js b/src/server/check-answers/index.test.js index 1523ccbf..d8574e89 100644 --- a/src/server/check-answers/index.test.js +++ b/src/server/check-answers/index.test.js @@ -109,6 +109,7 @@ describe('#CheckAnswers', () => { const document = parseDocument(payload) expect(document.title).toEqual(pageTitle) + expect(document.querySelector('#main-content')?.innerHTML).toMatchSnapshot() const taskListValues = document.querySelectorAll( '.govuk-summary-list__value'