@defra-fish/gafl-webapp-service 1.74.0 → 1.75.0-rc.10
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 +5 -14
- package/package.json +4 -4
- package/src/constants.js +1 -1
- package/src/locales/cy.json +27 -49
- package/src/locales/en.json +20 -43
- package/src/pages/concessions/disability/disability-concession.njk +1 -1
- package/src/pages/contact/address/select/update-transaction.js +1 -1
- package/src/pages/guidance/accessibility-statement.njk +17 -35
- package/src/pages/recurring-payments/cancel/details/__tests__/route.spec.js +63 -4
- package/src/pages/recurring-payments/cancel/details/route.js +13 -1
- package/src/pages/renewals/licence-not-found/licence-not-found.njk +2 -2
- package/src/processors/__tests__/recurring-pay-helper.spec.js +2 -0
- package/src/processors/__tests__/recurring-payments-write-cache.spec.js +18 -7
- package/src/processors/recurring-pay-helper.js +2 -2
- package/src/processors/recurring-payments-write-cache.js +5 -1
- package/src/services/address-lookup/__mocks__/data/search-results-many.js +249 -965
- package/src/services/address-lookup/__mocks__/data/search-results-none.js +10 -5
- package/src/services/address-lookup/__mocks__/data/search-results-one.js +40 -37
- package/src/services/address-lookup/__tests__/address-lookup-service.spec.js +784 -16
- package/src/services/address-lookup/address-lookup-service.js +392 -36
package/README.md
CHANGED
|
@@ -8,8 +8,8 @@ To run from this directory:
|
|
|
8
8
|
|
|
9
9
|
## Environment variables
|
|
10
10
|
|
|
11
|
-
|
|
|
12
|
-
|
|
|
11
|
+
| name | description | required | default | valid |
|
|
12
|
+
| --------------------------------- | ------------------------------------------------------------------------ | :------: | --------------------------------------------------------- | ---------------------- |
|
|
13
13
|
| NODE_ENV | Node environment | no | | development, fsh-{env} |
|
|
14
14
|
| HAPI_KEEP_ALIVE_TIMEOUT_MS | Configure the keep-alive timeout on the server listener | no | 1 minute | |
|
|
15
15
|
| PORT | The http port the listens on | no | 3000 | |
|
|
@@ -23,6 +23,7 @@ To run from this directory:
|
|
|
23
23
|
| SESSION_TTL_MS | Time to live for the session cookie and cache | no | 10800000 | |
|
|
24
24
|
| ADDRESS_LOOKUP_URL | OS Places API endpoint URL | no | https://api.os.uk/search/places/v1/postcode | |
|
|
25
25
|
| ADDRESS_LOOKUP_KEY | The API key required by OS places | no | | |
|
|
26
|
+
| ADDRESS_LOOKUP_MAX_RESULTS | Maximum results to fetch from OS API (pagination cap) | no | 5000 | |
|
|
26
27
|
| ADDRESS_LOOKUP_TIMEOUT_MS | The timeout in milliseconds for the lookup | no | 10000 | |
|
|
27
28
|
| SALES_API_URL | The address of the sales api | no | http://0.0.0.0:4000 | |
|
|
28
29
|
| SALES_API_TIMEOUT_MS | The timeout in milliseconds requests to the api | no | 10000 | |
|
|
@@ -42,18 +43,8 @@ To run from this directory:
|
|
|
42
43
|
|
|
43
44
|
## OS Places address lookup
|
|
44
45
|
|
|
45
|
-
The address lookup
|
|
46
|
-
|
|
47
|
-
`ssh -L 9002:TSFSAB01:9002 TSFSWS01`
|
|
48
|
-
|
|
49
|
-
Where `TSFSWS01` is a development instance with access to the facade at `TSFSAB01`. Details can be found here https://rattic-ops.aws-int.defra.cloud/cred/detail/1713/ . Don't forget to start the environment!
|
|
50
|
-
|
|
51
|
-
Then set the URL as follows
|
|
52
|
-
|
|
53
|
-
`set ADDRESS_LOOKUP_URL=http://localhost:9002/address-service/v1/addresses/postcode-and-premises`
|
|
54
|
-
|
|
55
|
-
An address lookup key will also need to be set.
|
|
46
|
+
The address lookup service calls the OS Places API directly. The service performs client-side filtering when a premises search is provided.
|
|
56
47
|
|
|
57
48
|
## GOV.UK pay setup
|
|
58
49
|
|
|
59
|
-
The details of the GOV.UK payment API can be found here
|
|
50
|
+
The details of the GOV.UK payment API can be found here: https://docs.payments.service.gov.uk/#gov-uk-pay-technical-documentation
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defra-fish/gafl-webapp-service",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.75.0-rc.10",
|
|
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.
|
|
40
|
-
"@defra-fish/connectors-lib": "1.
|
|
39
|
+
"@defra-fish/business-rules-lib": "1.75.0-rc.10",
|
|
40
|
+
"@defra-fish/connectors-lib": "1.75.0-rc.10",
|
|
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": "
|
|
82
|
+
"gitHead": "f6f3d05d2d098d25c66f5649294837486cbc6edb"
|
|
83
83
|
}
|
package/src/constants.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* System constants and defaults
|
|
3
3
|
*/
|
|
4
|
-
export const ADDRESS_LOOKUP_SERVICE = { lang: 'EN', dataset: 'DPA' }
|
|
5
4
|
export const ADDRESS_LOOKUP_TIMEOUT_MS_DEFAULT = 10000
|
|
5
|
+
export const ADDRESS_LOOKUP_MAX_RESULTS_DEFAULT = 5000
|
|
6
6
|
export const SESSION_TTL_MS_DEFAULT = 3 * 60 * 60 * 1000
|
|
7
7
|
export const PORT_DEFAULT = 3000
|
|
8
8
|
export const REDIS_PORT_DEFAULT = 6379
|
package/src/locales/cy.json
CHANGED
|
@@ -2,74 +2,51 @@
|
|
|
2
2
|
"access_statement_ability_net_link": "AbilityNet (yn agor mewn tab newydd)",
|
|
3
3
|
"access_statement_ability_net_1": "Mae cyngor ar wneud eich dyfais yn haws i'w ddefnyddio os oes gennych chi anabledd ar gael ar ",
|
|
4
4
|
"access_statement_ability_net_2": ".",
|
|
5
|
-
"access_statement_body_1": "Mae'r datganiad hygyrchedd yn berthnasol i'r gwasanaeth ",
|
|
6
|
-
"access_statement_body_link": "'
|
|
5
|
+
"access_statement_body_1": "Mae'r datganiad hygyrchedd hwn yn berthnasol i'r gwasanaeth ",
|
|
6
|
+
"access_statement_body_link": "'Cael trwydded pysgota â gwialen' (yn agor mewn tab newydd)",
|
|
7
7
|
"access_statement_body_2": ".",
|
|
8
8
|
"access_statement_body_3": "Mae'r gwasanaeth hwn yn cael ei redeg gan Asiantaeth yr Amgylchedd. Rydym am weld cymaint o bobl â phosib yn defnyddio'r wefan hon. Er enghraifft, mae hynny'n golygu y dylech allu gwneud y canlynol:",
|
|
9
|
-
"access_statement_bulletpoint_1": "newid lliwiau, lefelau
|
|
10
|
-
"access_statement_bulletpoint_2": "
|
|
9
|
+
"access_statement_bulletpoint_1": "newid lliwiau, lefelau cyferbyniad a ffontiau",
|
|
10
|
+
"access_statement_bulletpoint_2": "nesáu hyd at 400% heb i'r testun orlifo oddi ar y sgrin",
|
|
11
11
|
"access_statement_bulletpoint_3": "gwe-lywio'r rhan fwyaf o'r wefan gan ddefnyddio bysellfwrdd yn unig",
|
|
12
12
|
"access_statement_bulletpoint_4": "gwe-lywio'r rhan fwyaf o'r wefan gan ddefnyddio meddalwedd adnabod llais",
|
|
13
|
-
"access_statement_bulletpoint_5": "gwrando ar y rhan fwyaf o
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"access_statement_compliance_body_link_1": "Canllawiau Hygyrchedd Cynnwys Gwe fersiwn 2.2 safon AA (yn agor mewn tab newydd)",
|
|
18
|
-
"access_statement_compliance_body_link_2": "Canllawiau Hygyrchedd Cynnwys Gwe fersiwn 2.2 safon AAA (yn agor mewn tab newydd)",
|
|
13
|
+
"access_statement_bulletpoint_5": "gwrando ar y rhan fwyaf o’r wefan gan ddefnyddio rhaglen darllen sgrin (gan gynnwys y fersiynau diweddaraf o JAWS, NVDA a VoiceOver)",
|
|
14
|
+
"access_statement_compliance_body_1": "Mae'r wefan hon wedi’i phrofi yn erbyn y Canllawiau Hygyrchedd Cynnwys Gwe (WCAG) fersiwn 2.2 safon AA",
|
|
15
|
+
"access_statement_compliance_body_2": "Mae'r wefan hon yn cydymffurfio â'r ",
|
|
16
|
+
"access_statement_compliance_body_link_2": "Canllawiau Hygyrchedd Cynnwys Gwe fersiwn 2.2 safon AA (yn agor mewn tab newydd)",
|
|
19
17
|
"access_statement_compliance_heading": "Statws cydymffurfio",
|
|
20
18
|
"access_statement_enforcement_subheading": "Gweithdrefn gorfodi",
|
|
21
|
-
"access_statement_enforcement_body": "Y Comisiwn Cydraddoldeb a Hawliau Dynol sy
|
|
22
|
-
"access_statement_enforcement_link": "Gwasanaeth Cynghori a Chymorth Cydraddoldeb (EASS) (yn agor mewn tab newydd)
|
|
19
|
+
"access_statement_enforcement_body": "Y Comisiwn Cydraddoldeb a Hawliau Dynol sy’n gyfrifol am orfodi Rheoliadau Hygyrchedd Cyrff Sector Cyhoeddus (Gwefannau ac Apiau Symudol) (Rhif 2) 2018 (y ‘rheoliadau hygyrchedd’). Os nad ydych yn hapus gyda'r ffordd rydym yn ymateb i'ch cwyn, cysylltwch â'r ",
|
|
20
|
+
"access_statement_enforcement_link": "Gwasanaeth Cynghori a Chymorth Cydraddoldeb (EASS) (yn agor mewn tab newydd)",
|
|
23
21
|
"access_statement_how_subheading": "Pa mor hygyrch yw'r wefan hon",
|
|
24
22
|
"access_statement_feedback_subheading": "Adborth a manylion cyswllt",
|
|
25
|
-
"access_statement_heading": "Datganiad hygyrchedd ar gyfer
|
|
26
|
-
"access_statement_how_info": "Gall yr holl ddefnyddwyr ag anghenion mynediad gwblhau'r broses o brynu trwydded gwialen
|
|
27
|
-
"
|
|
28
|
-
"access_statement_made_simple": "Rydym hefyd wedi sicrhau bod y testun ar y wefan mor syml â phosib i'w ddeall.",
|
|
29
|
-
"access_statement_nonaccess_body": "Nid yw'r cynnwys a restrir isod yn hygyrch am y rhesymau canlynol.",
|
|
30
|
-
"access_statement_nonaccess_heading": "Cynnwys anhygyrch",
|
|
31
|
-
"access_statement_noncompliance_body_1": "Rydym ni'n rhoi opsiwn i'r defnyddwyr ddewis dyddiad calendr yn y dyfodol agos, ond nid yw'n hygyrch i'r rhai sy'n defnyddio bysellfwrdd neu ddarllenwyr sgrin. Mae hyn yn methu maen prawf llwyddiant WCAG 2.2 ",
|
|
32
|
-
"access_statement_noncompliance_body_2": ". Gall defnyddwyr gyda gofynion hygyrchedd fewnbynnu'r wybodaeth hon gan ddefnyddio'r blychau diwrnod, mis a blwyddyn safonol yn lle hynny. Rydym yn bwriadu adolygu hyn erbyn Rhagfyr 2024.",
|
|
33
|
-
"access_statement_noncompliance_body_3": "Nid oes digon o gyferbyniad i'r lliwiau a ddefnyddir ar gyfer dolenni. Mae hyn yn methu maen prawf llwyddiant WCAG 2.2 ",
|
|
34
|
-
"access_statement_noncompliance_body_4": ". Rydym yn bwriadu adolygu hyn erbyn Rhagfyr 2024.",
|
|
35
|
-
"access_statement_noncompliance_body_5": "Nid yw rhai dolenni yn ddisgrifiadol o'u pwrpas / cyrchfan wrth bori allan o'r cyd-destun. Mae hyn yn methu maen prawf llwyddiant WCAG 2.2 ",
|
|
36
|
-
"access_statement_noncompliance_body_6": ". Rydym yn bwriadu adolygu hyn erbyn Rhagfyr 2024.",
|
|
37
|
-
"access_statement_noncompliance_body_link_1": "'2.1.3 Lefel AAA (Dim Eithriad)' (yn agor mewn tab newydd)",
|
|
38
|
-
"access_statement_noncompliance_body_link_2": "'1.4.6 AAA Cyferbyniad (Gwell)' (yn agor mewn tab newydd)",
|
|
39
|
-
"access_statement_noncompliance_body_link_3": "'2.4.9 Lefel AAA Pwrpas Dolenni (Dolenni yn Unig)' (yn agor mewn tab newydd)",
|
|
40
|
-
"access_statement_noncompliance_heading": "Diffyg cydymffurfio â'r rheoliadau hygyrchedd",
|
|
41
|
-
"access_statement_none": "Dim.",
|
|
42
|
-
"access_statement_not_in_scope_title": "Cynnwys nad yw o fewn cwmpas y rheoliadau hygyrchedd",
|
|
23
|
+
"access_statement_heading": "Datganiad hygyrchedd ar gyfer ‘Cael trwydded pysgota â gwialen’",
|
|
24
|
+
"access_statement_how_info": "Gall yr holl ddefnyddwyr ag anghenion mynediad gwblhau'r broses o brynu trwydded pysgota â gwialen trwy ddefnyddio'r gwasanaeth hwn.",
|
|
25
|
+
"access_statement_made_simple": "Rydym hefyd wedi sicrhau bod testun y wefan mor syml â phosibl i'w ddeall.",
|
|
43
26
|
"access_statement_other_ways_to_buy_subheading": "Ffyrdd eraill o brynu trwydded",
|
|
44
|
-
"access_statement_other_ways_to_buy_body_1": "Gallwch brynu trwydded drwy ffonio Asiantaeth yr Amgylchedd:",
|
|
27
|
+
"access_statement_other_ways_to_buy_body_1": "Gallwch hefyd brynu trwydded drwy ffonio Asiantaeth yr Amgylchedd:",
|
|
45
28
|
"access_statement_other_ways_to_buy_body_2": "Gwerthiannau trwyddedau ac estyniadau",
|
|
46
29
|
"access_statement_other_ways_to_buy_body_3": "Ffôn: 0344 800 5386",
|
|
47
30
|
"access_statement_other_ways_to_buy_body_4": "Dydd Llun i ddydd Gwener, 8am i 6pm (ac eithrio gwyliau cyhoeddus)",
|
|
48
|
-
"access_statement_other_ways_to_buy_body_link": "Gwybodaeth am gostau galwadau (agor mewn tab newydd)",
|
|
49
|
-
"access_statement_prep_body_1": "Paratowyd y datganiad hwn ar 23 Medi 2020. Cafodd ei adolygu ddiwethaf ar
|
|
31
|
+
"access_statement_other_ways_to_buy_body_link": "Gwybodaeth am gostau galwadau (yn agor mewn tab newydd)",
|
|
32
|
+
"access_statement_prep_body_1": "Paratowyd y datganiad hwn ar 23 Medi 2020. Cafodd ei adolygu ddiwethaf ar 27 Mai 2026.",
|
|
50
33
|
"access_statement_prep_body_2": "Profwyd hygyrchedd y Gwasanaeth hwn ddiwethaf ar 4 Gorffennaf 2024. Cynhaliwyd y prawf gan y Ganolfan Hygyrchedd Digidol (DAC).",
|
|
51
34
|
"access_statement_prep_body_3": "Profwyd y camau mwyaf cyffredin ar gyfer cyflwyno cais am y mathau hyn o drwydded:",
|
|
52
|
-
"access_statement_prep_body_4": "Bydd yr elfennau Lefel AAA nad ydynt yn cydymffurfio yn cael eu cynnwys mewn profion a thrwsio parhaus.",
|
|
53
35
|
"access_statement_prep_bulletpoint_1": "12 mis: pysgod bras a brithyllod: ar gyfer y person ei hun",
|
|
54
|
-
"access_statement_prep_bulletpoint_2": "12 mis:
|
|
36
|
+
"access_statement_prep_bulletpoint_2": "12 mis: pysgod bras a brithyllod: ar ran rhywun arall",
|
|
55
37
|
"access_statement_prep_bulletpoint_3": "Adnewyddu trwydded",
|
|
56
|
-
"access_statement_prep_heading": "Llunio
|
|
57
|
-
"
|
|
38
|
+
"access_statement_prep_heading": "Llunio’r datganiad hygyrchedd hwn",
|
|
39
|
+
"access_statement_reporting_info_1": "Os ydych yn dod o hyd i unrhyw broblemau nad ydynt wedi'u rhestru ar y dudalen hon neu’n meddwl nad ydym yn bodloni gofynion hygyrchedd, cysylltwch fel a ganlyn:",
|
|
58
40
|
"access_statement_reporting_subheading": "Adrodd am broblemau hygyrchedd gyda'r wefan hon",
|
|
59
|
-
"access_statement_reporting_body_1": "
|
|
41
|
+
"access_statement_reporting_body_1": "anfonwch neges e-bost i ",
|
|
60
42
|
"access_statement_reporting_body_2": "enquiries@environment-agency.gov.uk",
|
|
61
|
-
"access_statement_reporting_body_3": "
|
|
62
|
-
"access_statement_reporting_body_4": "
|
|
63
|
-
"
|
|
43
|
+
"access_statement_reporting_body_3": "ffoniwch 03708 506 506 ",
|
|
44
|
+
"access_statement_reporting_body_4": "Gwybodaeth am gostau galwadau (yn agor mewn tab newydd)",
|
|
45
|
+
"access_statement_reporting_info_2": "Os oes arnoch angen gwybodaeth ar y wefan hon mewn fformat gwahanol, fel PDF hygyrch, print bras, fersiwn hawdd ei ddarllen, recordiad sain neu braille:",
|
|
46
|
+
"access_statement_reporting_body_5": "Byddwn yn ystyried eich cais ac yn cysylltu â chi o fewn 20 diwrnod gwaith.",
|
|
64
47
|
"access_statement_tech_body": "Mae Asiantaeth yr Amgylchedd wedi ymrwymo i wneud ei wefan yn hygyrch, yn unol â Rheoliadau Hygyrchedd Cyrff Sector Cyhoeddus (Gwefannau ac Apiau Symudol) (Rhif 2) 2018.",
|
|
65
48
|
"access_statement_tech_heading": "Gwybodaeth dechnegol am hygyrchedd y wefan hon",
|
|
66
49
|
"access_statement_title": "Datganiad hygyrchedd",
|
|
67
|
-
"access_statement_visit_heading": "Ymweld â ni wyneb yn wyneb",
|
|
68
|
-
"access_statement_visit_info_link": "mynediad ac oriau agor swyddfeydd Asiantaeth yr Amgylchedd (yn agor mewn tab newydd)",
|
|
69
|
-
"access_statement_visit_info_text_service": "Nid ydym yn darparu gwasanaeth cyfnewid testun i bobl sy'n fyddar, sydd â nam ar eu clyw, neu sydd â nam lleferydd ar hyn o bryd.",
|
|
70
|
-
"access_statement_visit_info_1": "Gweler ",
|
|
71
|
-
"access_statement_visit_info_2": ".",
|
|
72
|
-
"access_statement_visit": "Os ydych yn ymweld â'n swyddfeydd ac mae angen cymorth arnoch neu ddehonglydd Iaith Arwyddion Prydain, dylech gysylltu â ni cyn eich ymweliad. Mae dolenni sain yn rhai o'n swyddfeydd.",
|
|
73
50
|
"account_disabled_body_1": "You were successfully signed in but your account is not enabled in Microsoft Dynamics.",
|
|
74
51
|
"account_disabled_title": "Account not enabled",
|
|
75
52
|
"address_entry_content_and_postcode": "a chod post",
|
|
@@ -269,8 +246,9 @@
|
|
|
269
246
|
"cookies_survey_subheading": "Arolwg o’n perfformiad",
|
|
270
247
|
"cookies_title": "Cwcis",
|
|
271
248
|
"cost": "Cost",
|
|
272
|
-
"
|
|
249
|
+
"disability_concession_12_month_1": "Mae deiliaid trwydded blwyddyn yn gymwys ar gyfer consesiwn os byddant yn derbyn Taliad Anibyniaeth Personol (PIP), Lwfans Byw i’r Anabl (DLA) neu wedi bodloni’r meini prawf ar gyfer ",
|
|
273
250
|
"disability_concession_12_month_link": "Bathodyn Glas (yn agor mewn tab newydd)",
|
|
251
|
+
"disability_concession_12_month_2": ". Caiff consesiynau sy’n gysylltiedig ag oedran eu gweithredu’n awtomatig.",
|
|
274
252
|
"disability_concession_badge_error_msg": "Nodwch rif Bathodyn Glas deiliad y drwydded",
|
|
275
253
|
"disability_concession_error_choose_option": "Dewiswch un o’r opsiynau.",
|
|
276
254
|
"disability_concession_error_ni_empty": "Nodwch Rif Yswiriant Gwladol deiliad y drwydded",
|
|
@@ -290,7 +268,7 @@
|
|
|
290
268
|
"disability_concession_title_bobo": "Ydyn nhw’n gymwys ar gyfer consesiwn?",
|
|
291
269
|
"disability_concession_title_self": "Ydych chi’n gymwys ar gyfer consesiwn?",
|
|
292
270
|
"date_day": "Diwrnod",
|
|
293
|
-
"dob_entry_hint": "Er enghraifft, 23 11 1979",
|
|
271
|
+
"dob_entry_hint": "Er enghraifft, 23 11 1979. Caiff consesiynau sy’n gysylltiedig ag oedran eu gweithredu’n awtomatig.",
|
|
294
272
|
"dob_error_date_real": "Mae’n rhaid i’r dyddiad geni fod yn ddyddiad dilys",
|
|
295
273
|
"dob_error_missing_day_and_month": "Mae’n rhaid i’r dyddiad geni gynnwys diwrnod a mis",
|
|
296
274
|
"dob_error_missing_day_and_year": "Mae’n rhaid i’r dyddiad geni gynnwys diwrnod a blwyddyn",
|
package/src/locales/en.json
CHANGED
|
@@ -3,73 +3,49 @@
|
|
|
3
3
|
"access_statement_ability_net_1": "",
|
|
4
4
|
"access_statement_ability_net_2": " has advice on making your device easier to use if you have a disability.",
|
|
5
5
|
"access_statement_body_1": "This accessibility statement applies to the ",
|
|
6
|
-
"access_statement_body_link": "'
|
|
6
|
+
"access_statement_body_link": "'Get a rod fishing licence' service (opens in new tab)",
|
|
7
7
|
"access_statement_body_2": ".",
|
|
8
8
|
"access_statement_body_3": "This service is run by the Environment Agency. We want as many people as possible to be able to use this website. For example, that means you should be able to:",
|
|
9
9
|
"access_statement_bulletpoint_1": "change colours, contrast levels and fonts",
|
|
10
|
-
"access_statement_bulletpoint_2": "zoom in up to
|
|
10
|
+
"access_statement_bulletpoint_2": "zoom in up to 400% without the text spilling off the screen",
|
|
11
11
|
"access_statement_bulletpoint_3": "navigate most of the website using just a keyboard",
|
|
12
12
|
"access_statement_bulletpoint_4": "navigate most of the website using speech recognition software",
|
|
13
13
|
"access_statement_bulletpoint_5": "listen to most of the website using a screen reader (including the most recent versions of JAWS, NVDA and VoiceOver)",
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"access_statement_compliance_body_link_1": "Web Content Accessibility Guidelines version 2.2 AA standard (opens in new tab)",
|
|
18
|
-
"access_statement_compliance_body_link_2": "Web Content Accessibility Guidelines version 2.2 AAA standard (opens in new tab)",
|
|
14
|
+
"access_statement_compliance_body_1": "The website has been tested against the Web Content Accessibility Guidelines (WCAG) 2.2 AA standard.",
|
|
15
|
+
"access_statement_compliance_body_2": "This website is compliant with the ",
|
|
16
|
+
"access_statement_compliance_body_link_2": "Web Content Accessibility Guidelines version 2.2 AA standard (opens in new tab)",
|
|
19
17
|
"access_statement_compliance_heading": "Compliance status",
|
|
20
18
|
"access_statement_enforcement_subheading": "Enforcement procedure",
|
|
21
19
|
"access_statement_enforcement_body": "The Equality and Human Rights Commission (EHRC) is responsible for enforcing the Public Sector Bodies (Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018 (the 'accessibility regulations'). If you're not happy with how we respond to your complaint, contact the ",
|
|
22
20
|
"access_statement_enforcement_link": "Equality Advisory and Support Service (EASS) (opens in new tab)",
|
|
23
21
|
"access_statement_how_subheading": "How accessible this website is",
|
|
24
22
|
"access_statement_feedback_subheading": "Feedback and contact information",
|
|
25
|
-
"access_statement_heading": "Accessibility statement for '
|
|
26
|
-
"access_statement_how_info": "All users with access needs can complete the process of buying a fishing
|
|
27
|
-
"access_statement_how_info_2": "However, we know that one part of this website is not fully accessible. A calendar date picker control cannot be accessed using a keyboard or screen reader. Users with accessibility requirements can enter the date using the standard day, month and year fields.",
|
|
23
|
+
"access_statement_heading": "Accessibility statement for 'Get a rod fishing licence'",
|
|
24
|
+
"access_statement_how_info": "All users with access needs can complete the process of buying a rod fishing licence using this service.",
|
|
28
25
|
"access_statement_made_simple": "We have also made the website text as simple as possible to understand.",
|
|
29
|
-
"access_statement_nonaccess_body": "The content listed below is non-accessible for the following reasons.",
|
|
30
|
-
"access_statement_nonaccess_heading": "Non-accessible content",
|
|
31
|
-
"access_statement_noncompliance_body_1": "We give users the option of a calendar date picker to select a date, but it is not accessible to those using keyboards or screen readers. This fails WCAG 2.2 success criterion ",
|
|
32
|
-
"access_statement_noncompliance_body_2": ". Users with accessibility requirements can enter this date using the standard day, month and year fields instead. We plan to review this by December 2024.",
|
|
33
|
-
"access_statement_noncompliance_body_3": "Colours used for links have insufficient contrast. This fails WCAG 2.2 success criterion ",
|
|
34
|
-
"access_statement_noncompliance_body_4": ". We plan to review this by December 2024.",
|
|
35
|
-
"access_statement_noncompliance_body_5": "Some links are not descriptive of their purpose / destination when browsing out of context. This fails WCAG 2.2 success criterion ",
|
|
36
|
-
"access_statement_noncompliance_body_6": ". We plan to review this by December 2024.",
|
|
37
|
-
"access_statement_noncompliance_body_link_1": "'2.1.3 Level AAA Keyboard (No Exception)' (opens in new tab)",
|
|
38
|
-
"access_statement_noncompliance_body_link_2": "'1.4.6 AAA Contrast (Enhanced)' (opens in new tab)",
|
|
39
|
-
"access_statement_noncompliance_body_link_3": "'2.4.9 Level AAA Link Purpose (Link Only)' (opens in new tab)",
|
|
40
|
-
"access_statement_noncompliance_heading": "Non-compliance with the accessibility regulations",
|
|
41
|
-
"access_statement_none": "None.",
|
|
42
|
-
"access_statement_not_in_scope_title": "Content that's not within the scope of the accessibility regulations",
|
|
43
26
|
"access_statement_other_ways_to_buy_subheading": "Other ways to buy a licence",
|
|
44
|
-
"access_statement_other_ways_to_buy_body_1": "You can buy a licence by calling the Environment Agency:",
|
|
27
|
+
"access_statement_other_ways_to_buy_body_1": "You can also buy a licence by calling the Environment Agency:",
|
|
45
28
|
"access_statement_other_ways_to_buy_body_2": "Licence sales and extensions",
|
|
46
29
|
"access_statement_other_ways_to_buy_body_3": "Telephone: 0344 800 5386",
|
|
47
30
|
"access_statement_other_ways_to_buy_body_4": "Monday to Friday, 8am to 6pm (except public holidays)",
|
|
48
31
|
"access_statement_other_ways_to_buy_body_link": "Find out about call charges (open in new tab)",
|
|
49
|
-
"
|
|
50
|
-
"
|
|
32
|
+
"access_statement_prep_heading": "Preparation of this accessibility statement",
|
|
33
|
+
"access_statement_prep_body_1": "This statement was prepared on 23 September 2020. It was last reviewed on 27 May 2026.",
|
|
34
|
+
"access_statement_prep_body_2": "This Service was last tested for accessibility on 4 July 2024. The test was carried out by Digital Accessibility Centre (DAC).",
|
|
51
35
|
"access_statement_prep_body_3": "The most common steps tested for purchasing a licence were:",
|
|
52
|
-
"access_statement_prep_body_4": "The non-compliant Level AAA elements will be included in ongoing testing and fixing.",
|
|
53
36
|
"access_statement_prep_bulletpoint_1": "12-month: coarse and trout: for myself",
|
|
54
37
|
"access_statement_prep_bulletpoint_2": "12-month: coarse and trout: on someone's behalf",
|
|
55
38
|
"access_statement_prep_bulletpoint_3": "Renewal of licence",
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"access_statement_reporting_body_1": "Environment Agency",
|
|
39
|
+
"access_statement_reporting_info_1": "If you find any problems not listed on this page or think we’re not meeting accessibility requirements, contact:",
|
|
40
|
+
"access_statement_reporting_info_2": "If you need information on this website in a different format like accessible PDF, large print, easy read, audio recording or braille:",
|
|
41
|
+
"access_statement_reporting_body_1": "email ",
|
|
60
42
|
"access_statement_reporting_body_2": "enquiries@environment-agency.gov.uk",
|
|
61
|
-
"access_statement_reporting_body_3": "
|
|
62
|
-
"access_statement_reporting_body_4": "
|
|
63
|
-
"access_statement_reporting_body_5": "
|
|
43
|
+
"access_statement_reporting_body_3": "call 03708 506 506 ",
|
|
44
|
+
"access_statement_reporting_body_4": "Find out about call charges (open in new tab)",
|
|
45
|
+
"access_statement_reporting_body_5": "We’ll consider your request and get back to you in 20 working days.",
|
|
64
46
|
"access_statement_tech_body": "The Environment Agency is committed to making its website accessible, in accordance with the Public Sector Bodies (Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018.",
|
|
65
47
|
"access_statement_tech_heading": "Technical information about this website's accessibility",
|
|
66
48
|
"access_statement_title": "Accessibility statement",
|
|
67
|
-
"access_statement_visit_heading": "Visiting us in person",
|
|
68
|
-
"access_statement_visit_info_link": "Environment Agency's office access and opening times (opens in new tab)",
|
|
69
|
-
"access_statement_visit_info_text_service": "We do not currently have a text relay service for people who are deaf, hearing impaired or have a speech impediment.",
|
|
70
|
-
"access_statement_visit_info_1": "See the ",
|
|
71
|
-
"access_statement_visit_info_2": ".",
|
|
72
|
-
"access_statement_visit": "If you visit our offices and need assistance or a British Sign Language (BSL) interpreter, you should contact us before your visit. Some of our offices have audio induction loops.",
|
|
73
49
|
"account_disabled_body_1": "You were successfully signed in but your account is not enabled in Microsoft Dynamics.",
|
|
74
50
|
"account_disabled_title": "Account not enabled",
|
|
75
51
|
"address_entry_content_and_postcode": "and postcode",
|
|
@@ -269,8 +245,9 @@
|
|
|
269
245
|
"cookies_survey_subheading": "Our performance survey",
|
|
270
246
|
"cookies_title": "Cookies",
|
|
271
247
|
"cost": "Cost",
|
|
272
|
-
"
|
|
248
|
+
"disability_concession_12_month_1": "12 month licence holders are eligible for a concession if they receive Personal Independence Payment (PIP), Disability Living Allowance (DLA), have or meet the criteria for a ",
|
|
273
249
|
"disability_concession_12_month_link": "Blue Badge (opens in new tab)",
|
|
250
|
+
"disability_concession_12_month_2": ". Any age-related concessions are applied automatically.",
|
|
274
251
|
"disability_concession_badge_error_msg": "Enter the licence holder’s Blue Badge number",
|
|
275
252
|
"disability_concession_error_choose_option": "Choose one of the options.",
|
|
276
253
|
"disability_concession_error_ni_empty": "Enter the licence holder’s National Insurance number",
|
|
@@ -290,7 +267,7 @@
|
|
|
290
267
|
"disability_concession_title_bobo": "Are they eligible for a concession?",
|
|
291
268
|
"disability_concession_title_self": "Are you eligible for a concession?",
|
|
292
269
|
"date_day": "Day",
|
|
293
|
-
"dob_entry_hint": "For example, 23 11 1979",
|
|
270
|
+
"dob_entry_hint": "For example, 23 11 1979. Any age-related concession is applied automatically.",
|
|
294
271
|
"dob_error_date_real": "Date of birth must be a real date",
|
|
295
272
|
"dob_error_missing_day_and_month": "Date of birth must include a day and month",
|
|
296
273
|
"dob_error_missing_day_and_year": "Date of birth must include a day and year",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
|
|
38
38
|
{% block pageContent %}
|
|
39
39
|
{% if not data.hasJunior and not data.hasSenior %}
|
|
40
|
-
<p class="govuk-hint">{{ mssgs.
|
|
40
|
+
<p class="govuk-hint">{{ mssgs.disability_concession_12_month_1 }}<a href="https://www.gov.uk/government/publications/blue-badge-can-i-get-one/can-i-get-a-blue-badge" class="govuk-link" target="_blank">{{ mssgs.disability_concession_12_month_link }}</a>{{ mssgs.disability_concession_12_month_2 }} </p>
|
|
41
41
|
{% endif %}
|
|
42
42
|
|
|
43
43
|
{{ govukRadios({
|
|
@@ -10,7 +10,7 @@ export default async request => {
|
|
|
10
10
|
const { licensee } = await request.cache().helpers.transaction.getCurrentPermission()
|
|
11
11
|
const { addresses } = await request.cache().helpers.addressLookup.getCurrentPermission()
|
|
12
12
|
const { premises, street, locality, town, postcode } = addresses.find(a => a.id === payload.address)
|
|
13
|
-
//
|
|
13
|
+
// All UK addresses from lookup default to GB
|
|
14
14
|
Object.assign(licensee, { premises, town, postcode, countryCode: 'GB' })
|
|
15
15
|
|
|
16
16
|
// Street and locality are optional
|
|
@@ -24,11 +24,10 @@
|
|
|
24
24
|
|
|
25
25
|
<h2 class="govuk-heading-m">{{ mssgs.access_statement_how_subheading }}</h2>
|
|
26
26
|
<p class="govuk-body">{{ mssgs.access_statement_how_info }}</p>
|
|
27
|
-
<p class="govuk-body">{{ mssgs.access_statement_how_info_2 }}</p>
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
|
|
30
29
|
|
|
31
|
-
<
|
|
30
|
+
<h2 class="govuk-heading-m">{{ mssgs.access_statement_other_ways_to_buy_subheading }}</h2>
|
|
32
31
|
<p class="govuk-body">{{ mssgs.access_statement_other_ways_to_buy_body_1 }}</p>
|
|
33
32
|
<ul class="govuk-list">
|
|
34
33
|
<li>{{ mssgs.access_statement_other_ways_to_buy_body_2 }}</li>
|
|
@@ -37,47 +36,30 @@
|
|
|
37
36
|
<li><a href="https://www.gov.uk/call-charges" class="govuk-link" target="_blank">{{ mssgs.access_statement_other_ways_to_buy_body_link }}</a></li>
|
|
38
37
|
</ul>
|
|
39
38
|
|
|
40
|
-
<
|
|
41
|
-
<p class="govuk-body">{{ mssgs.
|
|
42
|
-
<ul class="govuk-list">
|
|
43
|
-
<li>{{ mssgs.access_statement_reporting_body_1 }}</li>
|
|
44
|
-
<li
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
<h2 class="govuk-heading-m">{{ mssgs.access_statement_feedback_subheading }}</h2>
|
|
40
|
+
<p class="govuk-body">{{ mssgs.access_statement_reporting_info_1 }}</p>
|
|
41
|
+
<ul class="govuk-list govuk-list--bullet">
|
|
42
|
+
<li>{{ mssgs.access_statement_reporting_body_1 }}<a href="mailto:enquiries@environment-agency.gov.uk" class="govuk-link">{{ mssgs.access_statement_reporting_body_2 }}</a></li>
|
|
43
|
+
<li>{{ mssgs.access_statement_reporting_body_3 }}<a href="https://www.gov.uk/call-charges" class="govuk-link" target="_blank">{{ mssgs.access_statement_reporting_body_4 }}</a></li>
|
|
44
|
+
</ul>
|
|
45
|
+
|
|
46
|
+
<p class="govuk-body">{{ mssgs.access_statement_reporting_info_2 }}</p>
|
|
47
|
+
<ul class="govuk-list govuk-list--bullet">
|
|
48
|
+
<li>{{ mssgs.access_statement_reporting_body_1 }}<a href="mailto:enquiries@environment-agency.gov.uk" class="govuk-link">{{ mssgs.access_statement_reporting_body_2 }}</a></li>
|
|
49
|
+
<li>{{ mssgs.access_statement_reporting_body_3 }}<a href="https://www.gov.uk/call-charges" class="govuk-link" target="_blank">{{ mssgs.access_statement_reporting_body_4 }}</a></li>
|
|
50
|
+
<li>{{ mssgs.access_statement_reporting_body_5 }}</li>
|
|
48
51
|
</ul>
|
|
49
52
|
|
|
50
53
|
<h2 class="govuk-heading-m">{{ mssgs.access_statement_enforcement_subheading }}</h2>
|
|
51
54
|
<p class="govuk-body">{{ mssgs.access_statement_enforcement_body }}<a href="https://www.equalityadvisoryservice.com/" class="govuk-link" target="_blank">{{ mssgs.access_statement_enforcement_link }}</a>{{ mssgs.full_stop }}</p>
|
|
52
55
|
|
|
53
|
-
<h2 class="govuk-heading-m">{{ mssgs.access_statement_visit_heading }}</h2>
|
|
54
|
-
<p class="govuk-body">{{ mssgs.access_statement_visit }}</p>
|
|
55
|
-
<p class="govuk-body">{{ mssgs.access_statement_visit_info_1 }}<a href="https://www.gov.uk/government/organisations/environment-agency/about/access-and-opening" class="govuk-link" target="_blank">{{ mssgs.access_statement_visit_info_link }}</a>{{ mssgs.access_statement_visit_info_2 }}</p>
|
|
56
|
-
<p class="govuk-body">{{ mssgs.access_statement_visit_info_text_service }}</p>
|
|
57
|
-
|
|
58
56
|
<h2 class="govuk-heading-m">{{ mssgs.access_statement_tech_heading }}</h2>
|
|
59
57
|
<p class="govuk-body">{{ mssgs.access_statement_tech_body }}</p>
|
|
60
58
|
|
|
61
59
|
<h2 class="govuk-heading-m">{{ mssgs.access_statement_compliance_heading }}</h2>
|
|
62
|
-
<p class="govuk-body">{{ mssgs.access_statement_compliance_body_1 }}
|
|
60
|
+
<p class="govuk-body">{{ mssgs.access_statement_compliance_body_1 }}</p>
|
|
63
61
|
<p class="govuk-body">{{ mssgs.access_statement_compliance_body_2 }}<a href="https://www.w3.org/TR/WCAG22/" class="govuk-link" target="_blank">{{ mssgs.access_statement_compliance_body_link_2 }}</a>{{ mssgs.full_stop }}</p>
|
|
64
|
-
|
|
65
|
-
<h2 class="govuk-heading-m">{{ mssgs.access_statement_nonaccess_heading }}</h2>
|
|
66
|
-
<p class="govuk-body">{{ mssgs.access_statement_nonaccess_body }}</p>
|
|
67
|
-
|
|
68
|
-
<h2 class="govuk-heading-m">{{ mssgs.access_statement_noncompliance_heading }}</h2>
|
|
69
|
-
<ul class="govuk-list govuk-list--bullet">
|
|
70
|
-
<li> {{ mssgs.access_statement_noncompliance_body_1 }}<a href="https://www.w3.org/WAI/WCAG22/Understanding/keyboard-no-exception.html" class="govuk-link" target="_blank">{{ mssgs.access_statement_noncompliance_body_link_1 }}</a>{{ mssgs.access_statement_noncompliance_body_2 }}</li>
|
|
71
|
-
<li> {{ mssgs.access_statement_noncompliance_body_3 }}<a href="https://www.w3.org/WAI/WCAG22/Understanding/contrast-enhanced.html" class="govuk-link" target="_blank">{{ mssgs.access_statement_noncompliance_body_link_2 }}</a>{{ mssgs.access_statement_noncompliance_body_4 }} </li>
|
|
72
|
-
<li> {{ mssgs.access_statement_noncompliance_body_5 }}<a href="https://www.w3.org/WAI/WCAG22/Understanding/link-purpose-link-only.html" class="govuk-link" target="_blank">{{ mssgs.access_statement_noncompliance_body_link_3 }}</a>{{ mssgs.access_statement_noncompliance_body_6 }} </li>
|
|
73
|
-
</ul>
|
|
74
|
-
|
|
75
|
-
<h2 class="govuk-heading-m">{{ mssgs.access_statement_burden_title }}</h2>
|
|
76
|
-
<p class="govuk-body">{{ mssgs.access_statement_none }}</p>
|
|
77
|
-
|
|
78
|
-
<h2 class="govuk-heading-m">{{ mssgs.access_statement_not_in_scope_title }}</h2>
|
|
79
|
-
<p class="govuk-body">{{ mssgs.access_statement_none }}</p>
|
|
80
|
-
|
|
62
|
+
|
|
81
63
|
<h2 class="govuk-heading-m">{{ mssgs.access_statement_prep_heading }}</h2>
|
|
82
64
|
<p class="govuk-body">{{ mssgs.access_statement_prep_body_1 }}</p>
|
|
83
65
|
<p class="govuk-body">{{ mssgs.access_statement_prep_body_2 }}</p>
|
|
@@ -87,7 +69,7 @@
|
|
|
87
69
|
<li>{{ mssgs.access_statement_prep_bulletpoint_2 }}</li>
|
|
88
70
|
<li>{{ mssgs.access_statement_prep_bulletpoint_3 }}</li>
|
|
89
71
|
</ul>
|
|
90
|
-
|
|
72
|
+
|
|
91
73
|
</div>
|
|
92
74
|
</div>
|
|
93
75
|
{% endblock %}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import pageRoute from '../../../../../routes/page-route.js'
|
|
2
2
|
import { CANCEL_RP_DETAILS, CANCEL_RP_CONFIRM } from '../../../../../uri.js'
|
|
3
3
|
import { addLanguageCodeToUri } from '../../../../../processors/uri-helper.js'
|
|
4
|
+
import { licenceTypeDisplay } from '../../../../../processors/licence-type-display.js'
|
|
4
5
|
import { getData } from '../route.js'
|
|
5
6
|
import moment from 'moment-timezone'
|
|
6
7
|
import { cacheDateFormat, dateDisplayFormat } from '../../../../../processors/date-and-time-display.js'
|
|
@@ -12,6 +13,7 @@ jest.mock('../../../../../uri.js', () => ({
|
|
|
12
13
|
CANCEL_RP_CONFIRM: { uri: Symbol('cancel-rp-confirm-uri') }
|
|
13
14
|
}))
|
|
14
15
|
jest.mock('../../../../../processors/uri-helper.js')
|
|
16
|
+
jest.mock('../../../../../processors/licence-type-display.js')
|
|
15
17
|
jest.mock('moment-timezone', () =>
|
|
16
18
|
jest.fn(() => ({
|
|
17
19
|
format: jest.fn()
|
|
@@ -77,7 +79,10 @@ describe('route', () => {
|
|
|
77
79
|
rp_cancel_details_licence_type: 'Licence type',
|
|
78
80
|
rp_cancel_details_payment_card: 'Payment card',
|
|
79
81
|
rp_cancel_details_last_purchased: 'Last purchased',
|
|
80
|
-
rp_cancel_details_licence_valid_until: 'Valid until'
|
|
82
|
+
rp_cancel_details_licence_valid_until: 'Valid until',
|
|
83
|
+
licence_type_radio_salmon_payment_summary: 'Salmon and sea trout',
|
|
84
|
+
licence_type_radio_trout_two_rod_payment_summary: 'Trout and coarse (up to 2 rods)',
|
|
85
|
+
licence_type_radio_trout_three_rod_payment_summary: 'Trout and coarse (up to 3 rods)'
|
|
81
86
|
})
|
|
82
87
|
|
|
83
88
|
const getSamplePermission = () => ({
|
|
@@ -87,7 +92,9 @@ describe('route', () => {
|
|
|
87
92
|
lastName: 'Smith'
|
|
88
93
|
},
|
|
89
94
|
permit: {
|
|
90
|
-
description: 'Salmon and sea trout'
|
|
95
|
+
description: 'Salmon and sea trout',
|
|
96
|
+
permitSubtype: { label: 'Salmon and sea trout' },
|
|
97
|
+
numberOfRods: 2
|
|
91
98
|
},
|
|
92
99
|
endDate: '01-01-2026',
|
|
93
100
|
referenceNumber: 'abc123'
|
|
@@ -134,7 +141,9 @@ describe('route', () => {
|
|
|
134
141
|
lastName: 'Pysgotwr'
|
|
135
142
|
},
|
|
136
143
|
permit: {
|
|
137
|
-
description: 'Wellies and old shopping trollies'
|
|
144
|
+
description: 'Wellies and old shopping trollies',
|
|
145
|
+
permitSubtype: { label: 'Trout and coarse' },
|
|
146
|
+
numberOfRods: 2
|
|
138
147
|
},
|
|
139
148
|
endDate: '21-03-2026',
|
|
140
149
|
referenceNumber: 'aaa-111-bbb-222'
|
|
@@ -144,10 +153,12 @@ describe('route', () => {
|
|
|
144
153
|
}
|
|
145
154
|
}
|
|
146
155
|
const sampleFormattedDate = Symbol('formatted-end-date')
|
|
156
|
+
const sampleLicenceTypeDisplayResult = Symbol('licence-type-display-result')
|
|
147
157
|
const mockRequest = createMockRequest({ catalog: mssgs, currentPermission: sampleData })
|
|
148
158
|
moment.mockReturnValueOnce({
|
|
149
159
|
format: () => sampleFormattedDate
|
|
150
160
|
})
|
|
161
|
+
licenceTypeDisplay.mockReturnValueOnce(sampleLicenceTypeDisplayResult)
|
|
151
162
|
|
|
152
163
|
const result = await getData(mockRequest)
|
|
153
164
|
|
|
@@ -156,7 +167,7 @@ describe('route', () => {
|
|
|
156
167
|
key: { text: mssgs.rp_cancel_details_licence_holder },
|
|
157
168
|
value: { text: `${sampleData.permission.licensee.firstName} ${sampleData.permission.licensee.lastName}` }
|
|
158
169
|
},
|
|
159
|
-
{ key: { text: mssgs.rp_cancel_details_licence_type }, value: { text:
|
|
170
|
+
{ key: { text: mssgs.rp_cancel_details_licence_type }, value: { text: sampleLicenceTypeDisplayResult } },
|
|
160
171
|
{
|
|
161
172
|
key: { text: mssgs.rp_cancel_details_payment_card },
|
|
162
173
|
value: { text: `**** **** **** ${sampleData.recurringPayment.lastDigitsCardNumbers}` }
|
|
@@ -166,6 +177,54 @@ describe('route', () => {
|
|
|
166
177
|
])
|
|
167
178
|
})
|
|
168
179
|
|
|
180
|
+
describe('licence type summary row', () => {
|
|
181
|
+
it.each([['Salmon and sea trout'], ['Trout and coarse']])(
|
|
182
|
+
'calls licenceTypeDisplay with licenceType set to permitSubtype.label of %s',
|
|
183
|
+
async label => {
|
|
184
|
+
const sampleData = getSamplePermission()
|
|
185
|
+
sampleData.permission.permit.permitSubtype = { label }
|
|
186
|
+
const mockRequest = createMockRequest({ currentPermission: sampleData })
|
|
187
|
+
|
|
188
|
+
await getData(mockRequest)
|
|
189
|
+
|
|
190
|
+
expect(licenceTypeDisplay).toHaveBeenCalledWith({ licenceType: label, numberOfRods: '2' }, expect.anything())
|
|
191
|
+
}
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
it('calls licenceTypeDisplay with numberOfRods converted to a string', async () => {
|
|
195
|
+
const sampleData = getSamplePermission()
|
|
196
|
+
sampleData.permission.permit.numberOfRods = 3
|
|
197
|
+
const mockRequest = createMockRequest({ currentPermission: sampleData })
|
|
198
|
+
|
|
199
|
+
await getData(mockRequest)
|
|
200
|
+
|
|
201
|
+
expect(licenceTypeDisplay).toHaveBeenCalledWith({ licenceType: 'Salmon and sea trout', numberOfRods: '3' }, expect.anything())
|
|
202
|
+
})
|
|
203
|
+
|
|
204
|
+
it('calls licenceTypeDisplay with request.i18n.getCatalog() result as the second argument', async () => {
|
|
205
|
+
const mssgs = getSampleCatalog()
|
|
206
|
+
const mockRequest = createMockRequest({ catalog: mssgs })
|
|
207
|
+
|
|
208
|
+
await getData(mockRequest)
|
|
209
|
+
|
|
210
|
+
expect(licenceTypeDisplay).toHaveBeenCalledWith(expect.anything(), mssgs)
|
|
211
|
+
})
|
|
212
|
+
|
|
213
|
+
it('returns licence type row with licenceTypeDisplay return value as the value text', async () => {
|
|
214
|
+
const mssgs = getSampleCatalog()
|
|
215
|
+
const sampleLicenceTypeDisplayResult = Symbol('licence-type-display-result')
|
|
216
|
+
licenceTypeDisplay.mockReturnValueOnce(sampleLicenceTypeDisplayResult)
|
|
217
|
+
const mockRequest = createMockRequest({ catalog: mssgs })
|
|
218
|
+
|
|
219
|
+
const result = await getData(mockRequest)
|
|
220
|
+
|
|
221
|
+
expect(result.summaryTable[1]).toEqual({
|
|
222
|
+
key: { text: mssgs.rp_cancel_details_licence_type },
|
|
223
|
+
value: { text: sampleLicenceTypeDisplayResult }
|
|
224
|
+
})
|
|
225
|
+
})
|
|
226
|
+
})
|
|
227
|
+
|
|
169
228
|
it('passes cache date format and request locale to moment', async () => {
|
|
170
229
|
const data = getSamplePermission()
|
|
171
230
|
data.permission.endDate = Symbol('end-date')
|
|
@@ -3,13 +3,25 @@ import { CANCEL_RP_DETAILS, CANCEL_RP_CONFIRM } from '../../../../uri.js'
|
|
|
3
3
|
import { addLanguageCodeToUri } from '../../../../processors/uri-helper.js'
|
|
4
4
|
import moment from 'moment-timezone'
|
|
5
5
|
import { cacheDateFormat, dateDisplayFormat } from '../../../../processors/date-and-time-display.js'
|
|
6
|
+
import { licenceTypeDisplay } from '../../../../processors/licence-type-display.js'
|
|
6
7
|
|
|
7
8
|
const getLicenseeDetailsSummaryRows = (currentPermission, mssgs, locale) => [
|
|
8
9
|
{
|
|
9
10
|
key: { text: mssgs.rp_cancel_details_licence_holder },
|
|
10
11
|
value: { text: `${currentPermission.permission.licensee.firstName} ${currentPermission.permission.licensee.lastName}` }
|
|
11
12
|
},
|
|
12
|
-
{
|
|
13
|
+
{
|
|
14
|
+
key: { text: mssgs.rp_cancel_details_licence_type },
|
|
15
|
+
value: {
|
|
16
|
+
text: licenceTypeDisplay(
|
|
17
|
+
{
|
|
18
|
+
licenceType: currentPermission.permission.permit.permitSubtype.label,
|
|
19
|
+
numberOfRods: String(currentPermission.permission.permit.numberOfRods)
|
|
20
|
+
},
|
|
21
|
+
mssgs
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
},
|
|
13
25
|
{
|
|
14
26
|
key: { text: mssgs.rp_cancel_details_payment_card },
|
|
15
27
|
value: { text: `**** **** **** ${currentPermission.recurringPayment.lastDigitsCardNumbers}` }
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
</p>
|
|
14
14
|
<p class="govuk-body">
|
|
15
15
|
{{ mssgs.licence_not_found_body_2 }}
|
|
16
|
-
<a href="mailto:enquiries@environment-agency.gov.uk">{{ mssgs.licence_not_found_body_ea_link }}</a>
|
|
16
|
+
<a class="govuk-link" href="mailto:enquiries@environment-agency.gov.uk">{{ mssgs.licence_not_found_body_ea_link }}</a>
|
|
17
17
|
{{ mssgs.licence_not_found_body_3 }}
|
|
18
|
-
<a href="https://www.gov.uk/call-charges" target="_blank" rel="noopener">
|
|
18
|
+
<a class="govuk-link" href="https://www.gov.uk/call-charges" target="_blank" rel="noopener">
|
|
19
19
|
{{ mssgs.licence_not_found_body_call_charges_link }}</a>{{ mssgs.full_stop }}
|
|
20
20
|
</p>
|
|
21
21
|
</div>
|