@defra-fish/gafl-webapp-service 1.70.0-rc.9 → 1.70.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,37 +8,37 @@ To run from this directory:
8
8
 
9
9
  ## Environment variables
10
10
 
11
- | name | description | required | default | valid |
12
- | --------------------------------- | ---------------------------------------------------------------- | :------: | --------------------------------------------------------- | ----------------------------- |
13
- | NODE_ENV | Node environment | no | | development, test, production |
14
- | HAPI_KEEP_ALIVE_TIMEOUT_MS | Configure the keep-alive timeout on the server listener | no | 1 minute | |
15
- | PORT | The http port the listens on | no | 3000 | |
16
- | REDIS_HOST | Hostname of the redis instance used for session caching | yes | | |
17
- | REDIS_PORT | Port number of the redis instance used for session caching | no | 6379 | |
18
- | REDIS_PASSWORD | Password used to authenticate with the configured redis instance | no | | |
19
- | CHANNEL | The sales channel | no | websales | websales, telesales |
20
- | SESSION_COOKIE_NAME | Name of the session cookie | no | sid | |
21
- | CSRF_TOKEN_COOKIE_NAME | Name of the CSRF token cookie | no | rlsctkn | |
22
- | SESSION_COOKIE_PASSWORD | Encryption key for the session cookie (at least 32 characters) | yes | | |
23
- | SESSION_TTL_MS | Time to live for the session cookie and cache | no | 10800000 | |
24
- | ADDRESS_LOOKUP_URL | Location of address lookup facade | no | | |
25
- | ADDRESS_LOOKUP_KEY | The API key required by OS places | no | | |
26
- | ADDRESS_LOOKUP_TIMEOUT_MS | The timeout in milliseconds for the lookup | no | 10000 | |
27
- | SALES_API_URL | The address of the sales api | no | http://0.0.0.0:4000 | |
28
- | SALES_API_TIMEOUT_MS | The timeout in milliseconds requests to the api | no | 10000 | |
29
- | GOV_PAY_API_URL | The GOV.UK Pay API base url | no | Yes | |
30
- | GOV_PAY_APIKEY | GOV pay access identifier | no | Yes | |
31
- | GOV_PAY_REQUEST_TIMEOUT_MS | Timeout in milliseconds for API requests | no | Yes | |
32
- | FEEDBACK_URI | Location of feedback survey | no | # | |
33
- | FEEDBACK_URI_RCP_CANCEL | Location of feedback survey for RCP cancellation journey | no | # | |
34
- | ANALYTICS_PRIMARY_PROPERTY | Analytics ID for tracking inc ecommerce | no | | |
35
- | ANALYTICS_PROPERTY_API | Analytics property API key for linking Analytics.google property | no | | |
36
- | SERVICE_PAGE | GOV.UK service page | no | https://www.gov.uk/fishing-licences/buy-a-fishing-licence | |
37
- | AIRBRAKE_HOST | URL of airbrake host | no | | |
38
- | AIRBRAKE_PROJECT_KEY | Project key for airbrake logging | no | | |
39
- | ENABLE_ANALYTICS_OPT_IN_DEBUGGING | Set log if analytics been checked in non-production | no | | |
40
- | ERROR_PAGE_ROUTE | Display error pages to support welsh language | no | | |
41
- | SHOW_CANCELLATION_JOURNEY | Display option to show recurring payments cancellation journey | no | | |
11
+ | name | description | required | default | valid |
12
+ | :-------------------------------: | :----------------------------------------------------------------------: | :------: | :-------------------------------------------------------: | :---------------------------: |
13
+ | NODE_ENV | Node environment | no | | development, test, production |
14
+ | HAPI_KEEP_ALIVE_TIMEOUT_MS | Configure the keep-alive timeout on the server listener | no | 1 minute | |
15
+ | PORT | The http port the listens on | no | 3000 | |
16
+ | REDIS_HOST | Hostname of the redis instance used for session caching | yes | | |
17
+ | REDIS_PORT | Port number of the redis instance used for session caching | no | 6379 | |
18
+ | REDIS_PASSWORD | Password used to authenticate with the configured redis instance | no | | |
19
+ | CHANNEL | The sales channel | no | websales | websales, telesales |
20
+ | SESSION_COOKIE_NAME | Name of the session cookie | no | sid | |
21
+ | CSRF_TOKEN_COOKIE_NAME | Name of the CSRF token cookie | no | rlsctkn | |
22
+ | SESSION_COOKIE_PASSWORD | Encryption key for the session cookie (at least 32 characters) | yes | | |
23
+ | SESSION_TTL_MS | Time to live for the session cookie and cache | no | 10800000 | |
24
+ | ADDRESS_LOOKUP_URL | OS Places API endpoint URL | no | https://api.os.uk/search/places/v1/postcode | |
25
+ | ADDRESS_LOOKUP_KEY | The API key required by OS places | no | | |
26
+ | ADDRESS_LOOKUP_TIMEOUT_MS | The timeout in milliseconds for the lookup | no | 10000 | |
27
+ | SALES_API_URL | The address of the sales api | no | http://0.0.0.0:4000 | |
28
+ | SALES_API_TIMEOUT_MS | The timeout in milliseconds requests to the api | no | 10000 | |
29
+ | GOV_PAY_API_URL | The GOV.UK Pay API base url | no | Yes | |
30
+ | GOV_PAY_APIKEY | GOV pay access identifier | no | Yes | |
31
+ | GOV_PAY_REQUEST_TIMEOUT_MS | Timeout in milliseconds for API requests | no | Yes | |
32
+ | FEEDBACK_URI | Location of feedback survey | no | # | |
33
+ | ANALYTICS_PRIMARY_PROPERTY | Analytics ID for tracking inc ecommerce | no | | |
34
+ | ANALYTICS_PROPERTY_API | Analytics property API key for linking Analytics.google property | no | | |
35
+ | SERVICE_PAGE | GOV.UK service page | no | https://www.gov.uk/fishing-licences/buy-a-fishing-licence | |
36
+ | AIRBRAKE_HOST | URL of airbrake host | no | | |
37
+ | AIRBRAKE_PROJECT_KEY | Project key for airbrake logging | no | | |
38
+ | ENABLE_ANALYTICS_OPT_IN_DEBUGGING | Set log if analytics been checked in non-production | no | | |
39
+ | ERROR_PAGE_ROUTE | Display error pages to support welsh language | no | | |
40
+ | SHOW_CANCELLATION_JOURNEY | Display option to show recurring payments cancellation journey to admin | no | | telesales |
41
+ | SHOW_CANCELLATION_JOURNEY_PUBLIC | Display option to show recurring payments cancellation journey to public | no | | websales |
42
42
 
43
43
  ## OS Places address lookup
44
44
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defra-fish/gafl-webapp-service",
3
- "version": "1.70.0-rc.9",
3
+ "version": "1.70.1",
4
4
  "description": "The websales frontend for the GAFL service",
5
5
  "type": "module",
6
6
  "engines": {
@@ -36,8 +36,8 @@
36
36
  "prepare": "gulp --gulpfile build/gulpfile.cjs"
37
37
  },
38
38
  "dependencies": {
39
- "@defra-fish/business-rules-lib": "1.70.0-rc.9",
40
- "@defra-fish/connectors-lib": "1.70.0-rc.9",
39
+ "@defra-fish/business-rules-lib": "1.70.1",
40
+ "@defra-fish/connectors-lib": "1.70.1",
41
41
  "@defra/hapi-gapi": "2.0.0",
42
42
  "@hapi/boom": "9.1.2",
43
43
  "@hapi/catbox-redis": "6.0.2",
@@ -79,5 +79,5 @@
79
79
  "./gafl-jest-matchers.js"
80
80
  ]
81
81
  },
82
- "gitHead": "cfdcff74f7e09396f4c58e83b23ac9b0f7f5cac1"
82
+ "gitHead": "04aeed7559e24eb0b173e0c6369a95fde5be05ae"
83
83
  }
@@ -142,7 +142,7 @@
142
142
  "buy_different_licence": "Prynu trwydded wahanol",
143
143
  "cancel_rp_identify_caption": "Canslo eich cytundeb taliad cerdyn rheolaidd",
144
144
  "cancel_rp_identify_title": "Nodwch eich manylion",
145
- "cancel_rp_identify_body": "Ni fydd canslo eich cytundeb taliad cerdyn rheolaidd yn canslo nac yn ad-dalu eich trwydded gyfredol. Gallwch barhau i bysgota tan fydd eich trwydded gyfredol yn dod i ben ond ni fydd eich trwydded yn adnewyddu'n awtomatig.",
145
+ "cancel_rp_identify_body": "Ni fydd canslo eich cytundeb taliad cerdyn rheolaidd yn canslo nac yn ad-dalu eich trwydded gyfredol. Gallwch barhau i bysgota tan fydd eich trwydded gyfredol yn dod i ben ond ni fydd eich trwydded yn adnewyddun awtomatig.",
146
146
  "cancel_rp_identify_ref_number": "Chwe nodyn olaf eich trwydded",
147
147
  "cancel_rp_identify_ref_number_hint": "Er enghraifft, F4A315",
148
148
  "cancel_rp_identify_ref_number_error": "Enter the last 6 characters of your licence number",
@@ -182,7 +182,7 @@
182
182
  "client_error_payment_start_again_pre": "Neu, os byddai’n well gennych, gallwch waredu’r drwydded hon a ",
183
183
  "client_error_payment_start_again": "dechrau eto",
184
184
  "concession_applied": "Consesiwn wedi’i gynnwys",
185
- "confirm_continue": "Confirm and continue",
185
+ "confirm_continue": "Cadarnhau a pharhau",
186
186
  "contact_summary_change": "Newid",
187
187
  "contact_summary_email": "e-bost i ",
188
188
  "contact_summary_hidden_address": "cyfeiriad",
@@ -752,7 +752,7 @@
752
752
  "refund_bulletpoint_1_2": "Asiantaeth yr Amgylchedd",
753
753
  "refund_bulletpoint_1_3": "Ffôn: 03708 506 506",
754
754
  "refund_bulletpoint_1_4": "Dydd Llun i ddydd Gwener, 8am hyd 6pm (ac eithrio gwyliau cyhoeddus)",
755
- "refund_bulletpoint_1_5": "Rhagor o wybodaeth am gostau galwadau (yn agor mewn tab newydd)",
755
+ "refund_bulletpoint_1_5": "Dysgu mwy am gostau galwadau (yn agor mewn tab newydd)",
756
756
  "refund_bulletpoint_1_6": "Ebost: ",
757
757
  "refund_bulletpoint_link": "enquiries@environment-agency.gov.uk",
758
758
  "refund_bulletpoint_2_1": "Ni fydd Asiantaeth yr Amgylchedd yn codi ffi pan fyddwch yn prynu trwydded drwy ein ",
@@ -802,7 +802,6 @@
802
802
  "rp_licence_already_cancelled_body_3_1": "Ewch yn ôl",
803
803
  "rp_licence_already_cancelled_body_3_2": " er mwyn canslo’r taliad cerdyn rheolaidd ar gyfer trwydded wahanol.",
804
804
  "rp_licence_already_cancelled_body_ea_link": "enquiries@environment-agency.gov.uk",
805
- "rp_cancel_identify_title": "Cancel your recurring card payment agreement - identify",
806
805
  "rp_cancel_no_agreement_found_title": "Nid oes taliad cerdyn rheolaidd yn gysylltiedig â’r drwydded hon",
807
806
  "rp_cancel_no_agreement_found_licence_will_not_renew_1": "Ni fydd y drwydded sy’n gorffen gyda ",
808
807
  "rp_cancel_no_agreement_found_licence_will_not_renew_2": " yn adnewyddu’n awtomatig.",
@@ -816,13 +815,17 @@
816
815
  "rp_cancel_confirm_body": "Bydd eich trwydded gyfredol yn parhau i fod yn ddilys tan y daw i ben ar ",
817
816
  "rp_cancel_confirm_reject": "Na, rwy wedi newid fy meddwl",
818
817
  "rp_cancel_confirm_title": "Cadarnhewch eich bod am ganslo",
819
- "rp_cancel_details_last_purchased": "Last licence purchased",
820
- "rp_cancel_details_licence_holder": "Licence holder",
821
- "rp_cancel_details_licence_type": "Licence type",
822
- "rp_cancel_details_licence_valid_until": "Licence valid until",
823
- "rp_cancel_details_payment_card": "Payment card (last 4 digits)",
824
- "rp_cancel_details_title": "Check your details",
825
- "rp_cancel_details_summary_title": "If you need help checking your details",
818
+ "rp_cancel_details_last_purchased": "Trwydded olaf a brynwyd",
819
+ "rp_cancel_details_licence_holder": "Deiliad y drwydded",
820
+ "rp_cancel_details_licence_type": "Math o drwydded",
821
+ "rp_cancel_details_licence_valid_until": "Trwydded yn ddilys tan",
822
+ "rp_cancel_details_payment_card": "Cerdyn talu (4 digid olaf)",
823
+ "rp_cancel_details_title": "Gwiriwch eich manylion",
824
+ "rp_cancel_details_summary_title": "Os oes angen help arnoch i wirio eich manylion",
825
+ "rp_cancel_details_summary_1_2": "Asiantaeth yr Amgylchedd",
826
+ "rp_cancel_details_summary_1_3": "Ffôn: 03708 506 506",
827
+ "rp_cancel_details_summary_1_4": "Dydd Llun i ddydd Gwener, 8am i 6pm (ac eithrio gwyliau cyhoeddus)",
828
+ "rp_cancel_details_summary_1_5": "Dysgu mwy am gostau galwadau (yn agor mewn tab newydd)",
826
829
  "rp_cancel_complete_panel_title": "Mae eich cytundeb taliad cerdyn rheolaidd wedi’i ganslo",
827
830
  "rp_cancel_complete_body_1": "Byddwn yn anfon cadarnhad drwy ",
828
831
  "rp_cancel_complete_method_email": "e-bost.",
@@ -814,7 +814,6 @@
814
814
  "rp_licence_already_cancelled_body_3_1": "Go back",
815
815
  "rp_licence_already_cancelled_body_3_2": " to cancel the recurring card payment for a different licence.",
816
816
  "rp_licence_already_cancelled_body_ea_link": "enquiries@environment-agency.gov.uk",
817
- "rp_cancel_identify_title": "Cancel your recurring card payment agreement - identify",
818
817
  "rp_cancel_no_agreement_found_title": "There is no recurring card payment linked to this licence",
819
818
  "rp_cancel_no_agreement_found_licence_will_not_renew_1": "Licence ending ",
820
819
  "rp_cancel_no_agreement_found_licence_will_not_renew_2": " will not renew automatically.",
@@ -835,6 +834,10 @@
835
834
  "rp_cancel_details_payment_card": "Payment card (last 4 digits)",
836
835
  "rp_cancel_details_title": "Check your details",
837
836
  "rp_cancel_details_summary_title": "If you need help checking your details",
837
+ "rp_cancel_details_summary_1_2": "Environment Agency",
838
+ "rp_cancel_details_summary_1_3": "Telephone: 03708 506 506",
839
+ "rp_cancel_details_summary_1_4": "Monday to Friday, 8am to 6pm (except public holidays)",
840
+ "rp_cancel_details_summary_1_5": "Find out more about call charges (opens in new tab)",
838
841
  "rp_cancel_complete_panel_title": "Your recurring card payment agreement has been cancelled",
839
842
  "rp_cancel_complete_body_1": "We'll send confirmation by ",
840
843
  "rp_cancel_complete_contact_method_email": "email.",
@@ -31,17 +31,17 @@
31
31
 
32
32
  {% set detailsHtml %}
33
33
  <p class="govuk-body">
34
- {{ mssgs.refund_bulletpoint_1_2 }}
34
+ {{ mssgs.rp_cancel_details_summary_1_2 }}
35
35
  </p>
36
36
  <p class="govuk-body">
37
- {{ mssgs.refund_bulletpoint_1_3 }}
37
+ {{ mssgs.rp_cancel_details_summary_1_3 }}
38
38
  </p>
39
39
  <p class="govuk-body">
40
- {{ mssgs.refund_bulletpoint_1_4 }}
40
+ {{ mssgs.rp_cancel_details_summary_1_4 }}
41
41
  </p>
42
42
  <p class="govuk-body govuk-!-margin-bottom-0">
43
43
  <a class="govuk-link" href="https://www.gov.uk/call-charges" target="_blank" rel="noreferrer noopener">
44
- {{ mssgs.refund_bulletpoint_1_5 }}
44
+ {{ mssgs.rp_cancel_details_summary_1_5 }}
45
45
  </a>
46
46
  </p>
47
47
  {% endset %}
@@ -70,4 +70,23 @@ describe('journey-definition', () => {
70
70
  )
71
71
  })
72
72
  })
73
+
74
+ it('does not route websales users to journey goal even when SHOW_CANCELLATION_JOURNEY_PUBLIC is true', () => {
75
+ jest.isolateModules(() => {
76
+ process.env.CHANNEL = 'websales'
77
+ process.env.SHOW_CANCELLATION_JOURNEY_PUBLIC = 'true'
78
+
79
+ const journeyDefinition = require('../journey-definition.js').default
80
+ const startPage = journeyDefinition.find(page => page.current.page === 'start')
81
+ expect(startPage).toEqual(
82
+ expect.objectContaining({
83
+ next: {
84
+ [CommonResults.OK]: {
85
+ page: LICENCE_FOR
86
+ }
87
+ }
88
+ })
89
+ )
90
+ })
91
+ })
73
92
  })
@@ -1,3 +1,13 @@
1
+ import {
2
+ CANCEL_RP_IDENTIFY,
3
+ CANCEL_RP_DETAILS,
4
+ CANCEL_RP_CONFIRM,
5
+ CANCEL_RP_COMPLETE,
6
+ CANCEL_RP_AGREEMENT_NOT_FOUND,
7
+ CANCEL_RP_LICENCE_NOT_FOUND,
8
+ CANCEL_RP_ALREADY_CANCELLED
9
+ } from '../../uri.js'
10
+
1
11
  const mockErrorRoutes = [Symbol('error')]
2
12
  jest.mock('../error-routes.js', () => mockErrorRoutes)
3
13
 
@@ -7,6 +17,16 @@ jest.mock('../error-test-routes.js', () => mockErrorTestingRoutes)
7
17
  const mockTelesalesRoutes = [Symbol('telesales')]
8
18
  jest.mock('../telesales-routes.js', () => mockTelesalesRoutes)
9
19
 
20
+ const getCancelRPURIs = () => [
21
+ CANCEL_RP_IDENTIFY.uri,
22
+ CANCEL_RP_DETAILS.uri,
23
+ CANCEL_RP_CONFIRM.uri,
24
+ CANCEL_RP_COMPLETE.uri,
25
+ CANCEL_RP_AGREEMENT_NOT_FOUND.uri,
26
+ CANCEL_RP_LICENCE_NOT_FOUND.uri,
27
+ CANCEL_RP_ALREADY_CANCELLED.uri
28
+ ]
29
+
10
30
  describe('route', () => {
11
31
  beforeEach(() => {
12
32
  jest.clearAllMocks()
@@ -49,3 +69,34 @@ describe('route', () => {
49
69
  expect(routes.default).toEqual(expect.not.arrayContaining(mockErrorTestingRoutes))
50
70
  })
51
71
  })
72
+
73
+ describe('cancellation route journey in websales behaves as expected', () => {
74
+ beforeEach(jest.clearAllMocks)
75
+ it('adds the cancellation route journey if SHOW_CANCELLATION_JOURNEY_PUBLIC is set to true', () => {
76
+ process.env.SHOW_CANCELLATION_JOURNEY_PUBLIC = 'true'
77
+ jest.isolateModules(() => {
78
+ const routesPaths = require('../routes.js').default.map(route => route.path)
79
+ expect(routesPaths).toEqual(expect.arrayContaining(getCancelRPURIs()))
80
+ })
81
+ })
82
+
83
+ it('omits the cancellation route journey if SHOW_CANCELLATION_JOURNEY_PUBLIC is set to false', () => {
84
+ process.env.SHOW_CANCELLATION_JOURNEY_PUBLIC = 'false'
85
+ jest.isolateModules(() => {
86
+ const routes = require('../routes.js').default
87
+ const cancelRPURIs = getCancelRPURIs()
88
+ const cancelRPRoutes = routes.filter(route => cancelRPURIs.includes(route.path))
89
+ expect(cancelRPRoutes).toHaveLength(0)
90
+ })
91
+ })
92
+
93
+ it('omits the cancellation route journey if SHOW_CANCELLATION_JOURNEY_PUBLIC is not present', () => {
94
+ delete process.env.SHOW_CANCELLATION_JOURNEY_PUBLIC
95
+ jest.isolateModules(() => {
96
+ const routes = require('../routes.js').default
97
+ const cancelRPURIs = getCancelRPURIs()
98
+ const cancelRPRoutes = routes.filter(route => cancelRPURIs.includes(route.path))
99
+ expect(cancelRPRoutes).toHaveLength(0)
100
+ })
101
+ })
102
+ })
@@ -32,6 +32,14 @@ import invalidLink from '../pages/renewals/renewal-inactive/route.js'
32
32
  import renewalStartDate from '../pages/renewals/renewal-start-date/route.js'
33
33
  import licenceNotFound from '../pages/renewals/licence-not-found/route.js'
34
34
 
35
+ import cancelRPIdentify from '../pages/recurring-payments/cancel/identify/route.js'
36
+ import cancelRPDetails from '../pages/recurring-payments/cancel/details/route.js'
37
+ import cancelRPConfirm from '../pages/recurring-payments/cancel/confirm/route.js'
38
+ import cancelRPComplete from '../pages/recurring-payments/cancel/complete/route.js'
39
+ import cancelRPAgreementNotFound from '../pages/recurring-payments/cancel/agreement-not-found/route.js'
40
+ import cancelRPLicenceNotFound from '../pages/recurring-payments/cancel/licence-not-found/route.js'
41
+ import cancelRPAlreadyCancelled from '../pages/recurring-payments/cancel/already-cancelled/route.js'
42
+
35
43
  import staticAssets from './static-routes.js'
36
44
  import miscRoutes from './misc-routes.js'
37
45
  import telesalesRoutes from './telesales-routes.js'
@@ -76,6 +84,18 @@ const routes = [
76
84
  ...licenceNotFound
77
85
  ]
78
86
 
87
+ if (process.env.SHOW_CANCELLATION_JOURNEY_PUBLIC === 'true') {
88
+ routes.push(
89
+ ...cancelRPIdentify,
90
+ ...cancelRPDetails,
91
+ ...cancelRPConfirm,
92
+ ...cancelRPComplete,
93
+ ...cancelRPAgreementNotFound,
94
+ ...cancelRPAlreadyCancelled,
95
+ ...cancelRPLicenceNotFound
96
+ )
97
+ }
98
+
79
99
  if (process.env.CHANNEL === 'telesales') {
80
100
  routes.push(...telesalesRoutes)
81
101
  }
@@ -29,7 +29,12 @@ describe('isStaticResource', () => {
29
29
  })
30
30
 
31
31
  describe('includesRegex', () => {
32
- const regexArray = [/^\/buy\/renew\/identify$/, /^\/renew\/.*$/, /^\/renew-my-licence\/.*$/]
32
+ const regexArray = [
33
+ /^\/buy\/renew\/identify$/,
34
+ /^\/renew\/.*$/,
35
+ /^\/renew-my-licence\/.*$/,
36
+ /^\/buy\/cancel-recurring-payment\/identify$/
37
+ ]
33
38
  it.each([
34
39
  '/buy/renew/identify',
35
40
  '/renew/ABC123',
@@ -39,14 +44,18 @@ describe('includesRegex', () => {
39
44
  '/renew-my-licence/ABC123',
40
45
  '/renew-my-licence/123123',
41
46
  '/renew-my-licence/ABCDEF',
42
- '/renew-my-licence/anytext'
47
+ '/renew-my-licence/anytext',
48
+ '/buy/cancel-recurring-payment/identify'
43
49
  ])('returns true if one of the regexes is matched %s', async path => {
44
50
  expect(includesRegex(path, regexArray)).toBeTruthy()
45
51
  })
46
52
 
47
- it.each(['/buy/renew', '/buy', '/rene', '/buy/order-complete'])('returns false if one of the regexes is not matched %s', async path => {
48
- expect(includesRegex(path, regexArray)).toBeFalsy()
49
- })
53
+ it.each(['/buy/renew', '/buy', '/rene', '/buy/order-complete', '/buy/cancel-recurring-payment/details'])(
54
+ 'returns false if one of the regexes is not matched %s',
55
+ async path => {
56
+ expect(includesRegex(path, regexArray)).toBeFalsy()
57
+ }
58
+ )
50
59
  })
51
60
 
52
61
  describe('Use session cookie', () => {
@@ -39,11 +39,12 @@ const agreedHandlerProtectionExemptSet = [
39
39
  NEW_PRICES.uri
40
40
  ]
41
41
 
42
- // regex for /renew/{referenceNumber?}, /buy/renew/identify, /renew-my-licence/{referenceNumber?}, and static guidance pages
42
+ // regex for /renew/{referenceNumber?}, /buy/renew/identify, /renew-my-licence/{referenceNumber?}, /buy/cancel-recurring-payment/identify, and static guidance pages
43
43
  const startProtectionExemptSet = [
44
44
  /^\/renew\/.*$/,
45
45
  /^\/buy\/renew\/identify$/,
46
46
  /^\/renew-my-licence\/.*$/,
47
+ /^\/buy\/cancel-recurring-payment\/identify$/,
47
48
  /^\/guidance\/cookies$/,
48
49
  /^\/guidance\/accessibility-statement$/,
49
50
  /^\/guidance\/privacy-policy$/,