@defra-fish/gafl-webapp-service 1.24.0-rc.7 → 1.24.0
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/package.json +4 -4
- package/src/handlers/__tests__/error-handler.spec.js +84 -49
- package/src/handlers/error-handler.js +9 -1
- package/src/locales/cy.json +81 -74
- package/src/locales/en.json +9 -2
- package/src/pages/concessions/disability/route.js +1 -3
- package/src/pages/contact/address/select/route.js +1 -4
- package/src/pages/contact/contact/__tests__/result-function.spec.js +2 -2
- package/src/pages/contact/contact/result-function.js +1 -1
- package/src/pages/contact/contact/route.js +1 -3
- package/src/pages/contact/digital-licence/licence-confirmation-method/route.js +1 -3
- package/src/pages/contact/digital-licence/licence-fulfilment/route.js +1 -3
- package/src/pages/errors/client-error.njk +26 -14
- package/src/pages/guidance/accessibility-statement.njk +2 -2
- package/src/pages/licence-details/licence-for/route.js +1 -3
- package/src/pages/licence-details/licence-length/route.js +1 -3
- package/src/pages/licence-details/licence-length/update-transaction.js +1 -5
- package/src/pages/licence-details/licence-start-time/__tests__/licence-start-time.spec.js +1 -5
- package/src/pages/licence-details/licence-start-time/route.js +3 -10
- package/src/pages/licence-details/licence-to-start/__tests__/licence-to-start.spec.js +1 -3
- package/src/pages/licence-details/licence-to-start/route.js +6 -24
- package/src/pages/renewals/identify/__tests__/identity.spec.js +4 -12
- package/src/pages/renewals/renewal-start-date/__tests__/renewal-start-date.spec.js +11 -55
- package/src/pages/summary/contact-summary/__tests__/route.spec.js +2 -4
- package/src/pages/summary/contact-summary/route.js +1 -1
- package/src/pages/summary/licence-summary/__tests__/result-function.spec.js +4 -2
- package/src/pages/summary/licence-summary/__tests__/route.spec.js +6 -8
- package/src/pages/summary/licence-summary/licence-summary.njk +7 -7
- package/src/pages/summary/licence-summary/result-function.js +1 -1
- package/src/pages/summary/licence-summary/route.js +8 -8
- package/src/pages/terms-and-conditions/route.js +1 -3
- package/src/processors/__tests__/api-transaction.spec.js +2 -0
- package/src/processors/__tests__/renewals-write-cache.spec.js +12 -3
- package/src/processors/api-transaction.js +2 -3
- package/src/processors/renewals-write-cache.js +3 -4
- package/src/routes/__tests__/back-links.spec.js +1 -1
- package/src/routes/journey-definition.js +2 -2
- package/src/services/address-lookup/__tests__/address-lookup-service.spec.js +21 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defra-fish/gafl-webapp-service",
|
|
3
|
-
"version": "1.24.0
|
|
3
|
+
"version": "1.24.0",
|
|
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.24.0
|
|
40
|
-
"@defra-fish/connectors-lib": "1.24.0
|
|
39
|
+
"@defra-fish/business-rules-lib": "1.24.0",
|
|
40
|
+
"@defra-fish/connectors-lib": "1.24.0",
|
|
41
41
|
"@defra/hapi-gapi": "^1.1.0",
|
|
42
42
|
"@hapi/boom": "^9.1.2",
|
|
43
43
|
"@hapi/catbox-redis": "^6.0.2",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"gulp-sourcemaps": "^3.0.0",
|
|
77
77
|
"node-sass": "^6.0.1"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "c138f45936dbae8ebb917599a53b6cf96c73aaa5"
|
|
80
80
|
}
|
|
@@ -1,34 +1,19 @@
|
|
|
1
1
|
import { errorHandler } from '../error-handler.js'
|
|
2
2
|
import { CLIENT_ERROR } from '../../uri.js'
|
|
3
3
|
|
|
4
|
-
const mockView = jest.fn(() => ({
|
|
5
|
-
code: jest.fn()
|
|
6
|
-
}))
|
|
7
|
-
const h = {
|
|
8
|
-
view: mockView
|
|
9
|
-
}
|
|
10
|
-
|
|
11
4
|
describe('error-handler', () => {
|
|
12
5
|
describe('errorHandler', () => {
|
|
13
6
|
beforeEach(jest.clearAllMocks)
|
|
14
7
|
it('should pass the referer to the view if it is present', async () => {
|
|
15
8
|
const request = {
|
|
9
|
+
...getMockRequest(),
|
|
16
10
|
headers: {
|
|
17
11
|
referer: 'http://example.com'
|
|
18
|
-
},
|
|
19
|
-
i18n: {
|
|
20
|
-
getCatalog: () => [],
|
|
21
|
-
getLocales: () => []
|
|
22
|
-
},
|
|
23
|
-
response: {
|
|
24
|
-
isBoom: true,
|
|
25
|
-
output: {
|
|
26
|
-
statusCode: 400
|
|
27
|
-
}
|
|
28
12
|
}
|
|
29
13
|
}
|
|
30
|
-
|
|
31
|
-
|
|
14
|
+
const mockToolkit = getMockToolkit()
|
|
15
|
+
await errorHandler(request, mockToolkit)
|
|
16
|
+
expect(mockToolkit.view).toBeCalledWith(
|
|
32
17
|
CLIENT_ERROR.page,
|
|
33
18
|
expect.objectContaining({
|
|
34
19
|
referer: 'http://example.com'
|
|
@@ -37,43 +22,22 @@ describe('error-handler', () => {
|
|
|
37
22
|
})
|
|
38
23
|
|
|
39
24
|
it('should not pass the referer to the view if it is not present', async () => {
|
|
40
|
-
const request =
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
getLocales: () => []
|
|
45
|
-
},
|
|
46
|
-
response: {
|
|
47
|
-
isBoom: true,
|
|
48
|
-
output: {
|
|
49
|
-
statusCode: 400
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
await errorHandler(request, h)
|
|
54
|
-
expect(mockView).toBeCalledWith(
|
|
25
|
+
const request = getMockRequest()
|
|
26
|
+
const mockToolkit = getMockToolkit()
|
|
27
|
+
await errorHandler(request, mockToolkit)
|
|
28
|
+
expect(mockToolkit.view).toBeCalledWith(
|
|
55
29
|
CLIENT_ERROR.page,
|
|
56
30
|
expect.not.objectContaining({
|
|
57
31
|
referer: 'http://example.com'
|
|
58
32
|
})
|
|
59
33
|
)
|
|
60
34
|
})
|
|
35
|
+
|
|
61
36
|
it('should pass the catalog and language to the view if it is present', async () => {
|
|
62
|
-
const request =
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
getLocales: () => []
|
|
67
|
-
},
|
|
68
|
-
response: {
|
|
69
|
-
isBoom: true,
|
|
70
|
-
output: {
|
|
71
|
-
statusCode: 400
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
await errorHandler(request, h)
|
|
76
|
-
expect(mockView).toBeCalledWith(
|
|
37
|
+
const request = getMockRequest()
|
|
38
|
+
const mockToolkit = getMockToolkit()
|
|
39
|
+
await errorHandler(request, mockToolkit)
|
|
40
|
+
expect(mockToolkit.view).toBeCalledWith(
|
|
77
41
|
CLIENT_ERROR.page,
|
|
78
42
|
expect.objectContaining({
|
|
79
43
|
mssgs: [],
|
|
@@ -81,5 +45,76 @@ describe('error-handler', () => {
|
|
|
81
45
|
})
|
|
82
46
|
)
|
|
83
47
|
})
|
|
48
|
+
|
|
49
|
+
describe.each([
|
|
50
|
+
[true, { payment_id: 'abc123', href: 'gov.pay.url' }],
|
|
51
|
+
[true, { payment_id: 'def456', href: 'gov-pay-url' }],
|
|
52
|
+
[false, {}]
|
|
53
|
+
])('includes correct data when paymentInProgress is %p', (paymentInProgress, payment) => {
|
|
54
|
+
it(`includes paymentInProgress flag with value set to ${paymentInProgress} to correspond to presence of payment_id ${payment.payment_id}`, async () => {
|
|
55
|
+
const request = getMockRequest(payment)
|
|
56
|
+
const mockToolkit = getMockToolkit()
|
|
57
|
+
await errorHandler(request, mockToolkit)
|
|
58
|
+
expect(mockToolkit.view).toHaveBeenCalledWith(
|
|
59
|
+
expect.any(String),
|
|
60
|
+
expect.objectContaining({
|
|
61
|
+
paymentInProgress
|
|
62
|
+
})
|
|
63
|
+
)
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
it(`${paymentInProgress ? 'includes' : 'excludes'} govpay url`, async () => {
|
|
67
|
+
const request = getMockRequest(payment)
|
|
68
|
+
const mockToolkit = getMockToolkit()
|
|
69
|
+
await errorHandler(request, mockToolkit)
|
|
70
|
+
if (paymentInProgress) {
|
|
71
|
+
expect(mockToolkit.view).toHaveBeenCalledWith(
|
|
72
|
+
expect.any(String),
|
|
73
|
+
expect.objectContaining({
|
|
74
|
+
uri: expect.objectContaining({
|
|
75
|
+
payment: payment.href
|
|
76
|
+
})
|
|
77
|
+
})
|
|
78
|
+
)
|
|
79
|
+
} else {
|
|
80
|
+
expect(mockToolkit.view).not.toHaveBeenCalledWith(
|
|
81
|
+
expect.any(String),
|
|
82
|
+
expect.objectContaining({
|
|
83
|
+
uri: expect.objectContaining({
|
|
84
|
+
payment: payment.href
|
|
85
|
+
})
|
|
86
|
+
})
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
const getMockToolkit = (view = jest.fn(() => ({ code: () => {} }))) => ({
|
|
94
|
+
view
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
const getMockRequest = (payment = {}) => ({
|
|
98
|
+
cache: () => ({
|
|
99
|
+
helpers: {
|
|
100
|
+
transaction: {
|
|
101
|
+
get: () =>
|
|
102
|
+
Promise.resolve({
|
|
103
|
+
payment
|
|
104
|
+
})
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}),
|
|
108
|
+
headers: {},
|
|
109
|
+
i18n: {
|
|
110
|
+
getCatalog: () => [],
|
|
111
|
+
getLocales: () => []
|
|
112
|
+
},
|
|
113
|
+
response: {
|
|
114
|
+
isBoom: true,
|
|
115
|
+
output: {
|
|
116
|
+
statusCode: 400
|
|
117
|
+
}
|
|
118
|
+
}
|
|
84
119
|
})
|
|
85
120
|
})
|
|
@@ -11,6 +11,8 @@ export const errorHandler = async (request, h) => {
|
|
|
11
11
|
if (!request.response.isBoom) {
|
|
12
12
|
return h.continue
|
|
13
13
|
}
|
|
14
|
+
const transaction = await request.cache().helpers.transaction.get()
|
|
15
|
+
const paymentInProgress = transaction?.payment?.payment_id !== undefined
|
|
14
16
|
const mssgs = request.i18n.getCatalog()
|
|
15
17
|
const altLang = request.i18n.getLocales().filter(locale => locale !== request.i18n.getLocale())
|
|
16
18
|
if (Math.floor(request.response.output.statusCode / 100) === 4) {
|
|
@@ -23,8 +25,14 @@ export const errorHandler = async (request, h) => {
|
|
|
23
25
|
altLang,
|
|
24
26
|
referer: request?.headers?.referer,
|
|
25
27
|
clientError: request.response.output.payload,
|
|
28
|
+
paymentInProgress,
|
|
26
29
|
path: request.path,
|
|
27
|
-
uri: {
|
|
30
|
+
uri: {
|
|
31
|
+
new: NEW_TRANSACTION.uri,
|
|
32
|
+
controller: CONTROLLER.uri,
|
|
33
|
+
agreed: AGREED.uri,
|
|
34
|
+
...(transaction?.payment?.href ? { payment: transaction.payment.href } : {})
|
|
35
|
+
}
|
|
28
36
|
})
|
|
29
37
|
.code(request.response.output.statusCode)
|
|
30
38
|
} else {
|
package/src/locales/cy.json
CHANGED
|
@@ -1,58 +1,60 @@
|
|
|
1
1
|
{
|
|
2
2
|
"access_statement_ability_net_link": "AbilityNet",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
3
|
+
"access_statement_ability_net_1": "Mae gan ",
|
|
4
|
+
"access_statement_ability_net_2": " gyngor ar sicrhau bod eich dyfais yn hawdd ei defnyddio os oes gennych anabledd.",
|
|
5
|
+
"access_statement_body": "Cynhelir y gwasanaeth hwn gan Asiantaeth yr Amgylchedd. Rydym am weld cymaint o bobl â phosib yn defnyddio’r wefan hon. Er enghraifft, mae hynny’n golygu y dylech fod yn gallu gwneud y canlynol:",
|
|
6
|
+
"access_statement_bulletpoint_1": "newid lliwiau, lefelau cyferbynnedd a ffontiau",
|
|
7
|
+
"access_statement_bulletpoint_2": "chwyddo mewn hyd at 200% heb i’r testun fynd oddi ar y sgrin",
|
|
8
|
+
"access_statement_bulletpoint_3": "gwe-lywio’r rhan fwyaf o’r wefan gan ddefnyddio bysellfwrdd yn unig",
|
|
9
|
+
"access_statement_bulletpoint_4": "gwe-lywio’r rhan fwyaf o’r wefan gan ddefnyddio meddalwedd adnabod llais",
|
|
10
|
+
"access_statement_bulletpoint_5": "gwrando ar y rhan fwyaf o’r wefan gan ddefnyddio darllenydd sgrin (gan gynnwys y fersiynau diweddaraf o JAWS, NVDA a VoiceOver)",
|
|
11
|
+
"access_statement_burden_title": "Baich anghymesurol",
|
|
12
|
+
"access_statement_compliance_body_1": "Mae’r wefan hon yn cydymffurfio’n rhannol â safon AA ",
|
|
13
|
+
"access_statement_compliance_body_2": " , yn sgil yr achosion o ddiffyg cydymffurfio sydd wedi’u rhestru isod.",
|
|
14
|
+
"access_statement_compliance_body_link": "fersiwn 2.1 o Ganllawiau Hygyrchedd Cynnwys Gwefannau (WCAG)",
|
|
15
|
+
"access_statement_compliance_heading": "Statws cydymffurfio",
|
|
16
|
+
"access_statement_enforcement_subheading": "Gweithdrefn gorfodi",
|
|
17
|
+
"access_statement_enforcement_body": "Mae’r Comisiwn Cydraddoldeb a Hawliau Dynol yn gyfrifol am orfodi Rheoliadau Hygyrchedd Cyrff Sector Cyhoeddus (Gwefannau ac Apiau Symudol (Rhif 2) 2018 (y ‘rheoliadau hygyrchedd’). Os ydych yn anhapus â’r ffordd rydym yn ymateb i’ch cwyn, cysylltwch â’r ",
|
|
18
|
+
"access_statement_enforcement_link": "Gwasanaeth Cynghori a Chefnogi Cydraddoldeb (EASS)",
|
|
19
|
+
"access_statement_how_subheading": "Pa mor hygyrch yw’r wefan hon?",
|
|
19
20
|
"access_statement_feedback_info_bulletpoint_1_link": "enquiries@environment-agency.gov.uk",
|
|
20
|
-
"access_statement_feedback_info_bulletpoint_1": "
|
|
21
|
-
"access_statement_feedback_info_bulletpoint_2_call": "
|
|
21
|
+
"access_statement_feedback_info_bulletpoint_1": "e-bostio: ",
|
|
22
|
+
"access_statement_feedback_info_bulletpoint_2_call": "ffonio ",
|
|
22
23
|
"access_statement_feedback_info_bulletpoint_2_link": "03708 506 506",
|
|
23
|
-
"access_statement_feedback_info_bulletpoint_2_times": " (
|
|
24
|
-
"access_statement_feedback_info": "
|
|
25
|
-
"access_statement_feedback_subheading": "
|
|
26
|
-
"access_statement_heading": "
|
|
27
|
-
"access_statement_how_info_bulletpoint_1": "
|
|
28
|
-
"access_statement_how_info_bulletpoint_2": "
|
|
29
|
-
"access_statement_how_info": "
|
|
30
|
-
"access_statement_made_simple": "
|
|
31
|
-
"access_statement_nonaccess_body": "
|
|
32
|
-
"access_statement_nonaccess_heading": "
|
|
33
|
-
"access_statement_noncompliance_body_1": "
|
|
34
|
-
"access_statement_noncompliance_body_2": ".
|
|
35
|
-
"access_statement_noncompliance_body_link": "
|
|
36
|
-
"access_statement_noncompliance_heading": "
|
|
37
|
-
"access_statement_none": "
|
|
38
|
-
"access_statement_not_in_scope_title": "
|
|
39
|
-
"access_statement_prep_body_1": "
|
|
40
|
-
"access_statement_prep_body_2": "
|
|
41
|
-
"access_statement_prep_body_3": "
|
|
42
|
-
"access_statement_prep_body_4": "
|
|
43
|
-
"access_statement_prep_bulletpoint_1": "12
|
|
44
|
-
"access_statement_prep_bulletpoint_2": "12
|
|
45
|
-
"access_statement_prep_bulletpoint_3": "
|
|
46
|
-
"access_statement_prep_heading": "
|
|
47
|
-
"access_statement_reporting_info": "
|
|
48
|
-
"access_statement_reporting_subheading": "
|
|
49
|
-
"access_statement_tech_body": "
|
|
50
|
-
"access_statement_tech_heading": "
|
|
24
|
+
"access_statement_feedback_info_bulletpoint_2_times": " (dydd Llun i ddydd Gwener, 8am tan 6pm)",
|
|
25
|
+
"access_statement_feedback_info": "Os oes arnoch angen gwybodaeth ar y wefan hon mewn fformat arall fel PDF hygyrch, print bras, fersiwn hawdd ei deall, recordiad sain neu Braille, cysylltwch drwy un o’r dulliau canlynol:",
|
|
26
|
+
"access_statement_feedback_subheading": "Adborth a manylion cyswllt",
|
|
27
|
+
"access_statement_heading": "Datganiad hygyrchedd ar gyfer cyflwyno cais am drwydded bysgota â gwialen",
|
|
28
|
+
"access_statement_how_info_bulletpoint_1": "Ar dudalen dyddiad dechrau’r drwydded, nid yw dewiswr dyddiad y calendr yn hygyrch i’r rheiny sy’n defnyddio bysellfyrddau neu ddarllenwyr sgrin. Gall defnyddwyr ag anghenion hygyrchedd nodi’r dyddiad hwn gan ddefnyddio’r meysydd diwrnod, mis a blwyddyn safonol.",
|
|
29
|
+
"access_statement_how_info_bulletpoint_2": "Mae’r dyddiadau calendr hanesyddol yn rhy isel o ran cyferbyniad",
|
|
30
|
+
"access_statement_how_info": "Gall yr holl ddefnyddwyr ag anghenion mynediad gwblhau’r broses o brynu trwydded gwialen bysgota trwy ddefnyddio’r gwasanaeth hwn. Fodd bynnag, rydym yn gwybod nad yw rhai rhannau o’r wefan hon yn gwbl hygyrch:",
|
|
31
|
+
"access_statement_made_simple": "Rydym hefyd wedi sicrhau bod y testun ar y wefan mor syml â phosib i’w ddeall.",
|
|
32
|
+
"access_statement_nonaccess_body": "Nid yw’r cynnwys a restrir isod yn hygyrch am y rhesymau canlynol.",
|
|
33
|
+
"access_statement_nonaccess_heading": "Cynnwys nad yw’n hygyrch",
|
|
34
|
+
"access_statement_noncompliance_body_1": "Nid yw defnyddwyr bob tro’n gwybod pan fo cynnwys amodol sy’n gysylltiedig â botwm radio neu flwch gwirio wedi’i ehangu neu ei gwympo. Mae hyn yn methu ",
|
|
35
|
+
"access_statement_noncompliance_body_2": ". Byddwn yn adolygu hyn erbyn diwedd mis Ionawr 2022. ",
|
|
36
|
+
"access_statement_noncompliance_body_link": "maen prawf llwyddiant 4.1.2: Enw, Rôl, Gwerth WCAG 2.1",
|
|
37
|
+
"access_statement_noncompliance_heading": "Diffyg cydymffurfio â’r rheoliadau hygyrchedd",
|
|
38
|
+
"access_statement_none": "Dim.",
|
|
39
|
+
"access_statement_not_in_scope_title": "Cynnwys nad o fewn cwmpas y rheoliadau hygyrchedd",
|
|
40
|
+
"access_statement_prep_body_1": "Paratowyd y datganiad hwn ar 23 Medi 2020. Fe’i hadolygwyd ddiwethaf ar 13 Hydref 2021.",
|
|
41
|
+
"access_statement_prep_body_2": "Archwiliwyd y gwasanaeth am hygyrchedd gan y Ganolfan Hygyrchedd Digidol ar 13 Ebrill 2021 a chan dîm cydymffurfedd gwe Adran yr Amgylchedd Bwyd a Materion Gwledig ar 22 Ebrill 2021.",
|
|
42
|
+
"access_statement_prep_body_3": "Gwnaethom brofi’r camau mwyaf cyffredin ar gyfer cyflwyno cais am y mathau hyn o drwydded:",
|
|
43
|
+
"access_statement_prep_body_4": "Caiff yr elfennau o ddiffyg cydymffurfio eu cynnwys mewn gwaith profi a thrwsio parhaus.",
|
|
44
|
+
"access_statement_prep_bulletpoint_1": "12 mis: pysgod bras a brithyllod",
|
|
45
|
+
"access_statement_prep_bulletpoint_2": "12 mis: eogiaid a brithyllod y môr",
|
|
46
|
+
"access_statement_prep_bulletpoint_3": "iau",
|
|
47
|
+
"access_statement_prep_heading": "Llunio’r datganiad hygyrchedd hwn",
|
|
48
|
+
"access_statement_reporting_info": "Rydym yn awyddus bob amser i wella hygyrchedd y wefan hon. Os ydych yn cael unrhyw broblemau nad ydynt wedi’u rhestru ar y dudalen hon neu os nad ydych yn meddwl ein bod yn bodloni gofynion hygyrchedd, cysylltwch drwy un o’r dulliau canlynol:",
|
|
49
|
+
"access_statement_reporting_subheading": "Adrodd am broblemau hygyrchedd gyda’r wefan hon",
|
|
50
|
+
"access_statement_tech_body": "Mae Asiantaeth yr Amgylchedd yn ymrwymedig i sicrhau bod ei gwefan yn hygyrch, yn unol â Rheoliadau Hygyrchedd Cyrff Sector Cyhoeddus (Gwefannau ac Apiau Symudol) (Rhif 2) 2018.",
|
|
51
|
+
"access_statement_tech_heading": "Gwybodaeth dechnegol am hygyrchedd y wefan hon",
|
|
51
52
|
"access_statement_title": "Accessibility statement - GOV.UK",
|
|
52
|
-
"access_statement_visit_info_link": "
|
|
53
|
-
"access_statement_visit_info_text_serivce": "
|
|
54
|
-
"
|
|
55
|
-
"
|
|
53
|
+
"access_statement_visit_info_link": "mynediad ac oriau agor swyddfeydd",
|
|
54
|
+
"access_statement_visit_info_text_serivce": "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.",
|
|
55
|
+
"access_statement_visit_info_1": "Gweler ",
|
|
56
|
+
"access_statement_visit_info_2": " Asiantaeth yr Amgylchedd.",
|
|
57
|
+
"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.",
|
|
56
58
|
"account_disabled_body_1": "You were successfully signed in but your account is not enabled in Microsoft Dynamics.",
|
|
57
59
|
"account_disabled_title": "Account not enabled",
|
|
58
60
|
"address_entry_content_and_postcode": "and postcode",
|
|
@@ -121,10 +123,14 @@
|
|
|
121
123
|
"client_error_title_forbidden": "Forbidden",
|
|
122
124
|
"client_error_title_not_found": "Page not found",
|
|
123
125
|
"client_error_title_unauth": "Unauthorized",
|
|
126
|
+
"client_error_back_during_payment": "This happened because you either closed the browser or used the back button during payment.",
|
|
127
|
+
"client_error_continue_with_payment_pre": "To continue with the payment, ",
|
|
128
|
+
"client_error_continue_with_payment_link": "go back to GOV Pay.",
|
|
129
|
+
"client_error_payment_start_again_pre": "Or, if you wish, you can discard this licence and ",
|
|
124
130
|
"concession_applied": "Consesiwn wedi’i gynnwys",
|
|
125
131
|
"contact_summary_title": "Check the contact details",
|
|
126
|
-
"contact_us_body": "
|
|
127
|
-
"contact_us_heading": "
|
|
132
|
+
"contact_us_body": "Gallwch gysylltu â ni drwy’r dulliau canlynol:",
|
|
133
|
+
"contact_us_heading": "Cysylltu â ni",
|
|
128
134
|
"continue": "Parhau",
|
|
129
135
|
"cookie_banner_close_ex": "cookie banner",
|
|
130
136
|
"cookie_banner_close": "Close",
|
|
@@ -166,6 +172,7 @@
|
|
|
166
172
|
"cookies_survey_body_link_3": "SmartSurvey cookies guide",
|
|
167
173
|
"cookies_survey_subheading": "Our performance survey",
|
|
168
174
|
"cookies_title": "Cookies - GOV.UK",
|
|
175
|
+
"cost": "Cost",
|
|
169
176
|
"disability_concession_12_month": "Gall deiliaid trwydded 12 mis fod yn gymwys i gael consesiynau anabledd",
|
|
170
177
|
"disability_concession_badge_error_msg": "Nodwch rif Bathodyn Glas deiliad y drwydded",
|
|
171
178
|
"disability_concession_error_choose_option": "Dewiswch un o’r opsiynau.",
|
|
@@ -252,7 +259,7 @@
|
|
|
252
259
|
"important_info_contact_item_email": "E-bost",
|
|
253
260
|
"important_info_contact_item_txt": "Neges destun",
|
|
254
261
|
"important_info_contact_licence_needed": "The rod licence holder will need to confirm the licence number if asked by an enforcement officer.",
|
|
255
|
-
"important_info_contact_none_msg": "
|
|
262
|
+
"important_info_contact_none_msg": "Byddwn yn dangos rhif y drwydded i chi ar ôl cadarnhau.",
|
|
256
263
|
"important_info_contact_note_tip": "Gwnewch nodyn o rif y drwydded",
|
|
257
264
|
"important_info_contact_post_confirm_8d": "We don’t provide physical cards for 1 or 8 day licences.",
|
|
258
265
|
"important_info_contact_post_confirm_jr": "We don’t provide physical cards for junior licences.",
|
|
@@ -343,19 +350,19 @@
|
|
|
343
350
|
"licence_start_title_other": "Pryd ddylai'r drwydded ddechrau?",
|
|
344
351
|
"licence_start_title_you": "Pryd yr hoffech i'ch trwydded ddechrau?",
|
|
345
352
|
"licence_start_today_or_within": "Gall y drwydded ddechrau heddiw neu unrhyw ddiwrnod o fewn y ",
|
|
346
|
-
"licence_summary_blue_badge_num": "
|
|
353
|
+
"licence_summary_blue_badge_num": "Rhif Bathodyn Glas",
|
|
347
354
|
"licence_summary_change": "Newid",
|
|
348
|
-
"licence_summary_disability_concession": "
|
|
349
|
-
"licence_summary_dob": "
|
|
355
|
+
"licence_summary_disability_concession": "Consesiwn anabledd",
|
|
356
|
+
"licence_summary_dob": "Dyddiad geni",
|
|
350
357
|
"licence_summary_immediately_after_expire": "Immediately after the current licence expires",
|
|
351
|
-
"licence_summary_length": "
|
|
352
|
-
"licence_summary_minutes_after_payment": "
|
|
353
|
-
"licence_summary_name": "
|
|
354
|
-
"licence_summary_ni_num": "
|
|
355
|
-
"licence_summary_none": "
|
|
356
|
-
"licence_summary_start_date": "
|
|
357
|
-
"licence_summary_title": "
|
|
358
|
-
"licence_summary_type": "
|
|
358
|
+
"licence_summary_length": "Hyd",
|
|
359
|
+
"licence_summary_minutes_after_payment": " munud yn dilyn taliad",
|
|
360
|
+
"licence_summary_name": "Enw",
|
|
361
|
+
"licence_summary_ni_num": "Rhif Yswiriant Gwladol",
|
|
362
|
+
"licence_summary_none": "Dim",
|
|
363
|
+
"licence_summary_start_date": "Dyddiad dechrau",
|
|
364
|
+
"licence_summary_title": "Gwiriwch fanylion y drwydded",
|
|
365
|
+
"licence_summary_type": "Math",
|
|
359
366
|
"licence_type_12m": "12 mis",
|
|
360
367
|
"licence_type_1d": "1 diwrnod",
|
|
361
368
|
"licence_type_8d": "8 niwrnod",
|
|
@@ -496,16 +503,16 @@
|
|
|
496
503
|
"privacy_where_stored_body_2": "The organisations we share personal data with process and store data in the UK. Our processor may also store this data outside the UK in Switzerland.",
|
|
497
504
|
"privacy_where_stored_body_3": "We do not store payment details.",
|
|
498
505
|
"purpose": "Purpose",
|
|
499
|
-
"refund_bulletpoint_1": "
|
|
500
|
-
"refund_bulletpoint_2_1": "
|
|
501
|
-
"refund_bulletpoint_2_2": "
|
|
502
|
-
"refund_bulletpoint_2_link": "
|
|
503
|
-
"refund_bulletpoint_3": "
|
|
504
|
-
"refund_bulletpoint_4": "
|
|
505
|
-
"refund_bulletpoint_5": "
|
|
506
|
-
"refund_bulletpoint_6": "
|
|
507
|
-
"refund_bulletpoint_7": "
|
|
508
|
-
"refund_heading": "
|
|
506
|
+
"refund_bulletpoint_1": "Gall Asiantaeth yr Amgylchedd ad-dalu cost trwydded i’r prynwr yn unig. Dylai’r holl geisiadau am ad-daliad gael eu cyfeirio i Asiantaeth yr Amgylchedd, ac eithrio mewn achosion lle mae’r drwydded wedi cael ei phrynu drwy drydydd parti (ac eithrio Swyddfa’r Post), pan ddylai ceisiadau am ad-daliadau gael eu cyfeirio iddyn nhw. Ffoniwch Asiantaeth yr Amgylchedd ar 03708 506506.",
|
|
507
|
+
"refund_bulletpoint_2_1": "Ni fydd Asiantaeth yr Amgylchedd yn codi ffi pan fyddwch yn prynu trwydded drwy ein ",
|
|
508
|
+
"refund_bulletpoint_2_2": " neu Swyddfa’r Post. Nid ydym yn argymell prynu eich trwydded drwy wefannau trydydd parti, efallai y byddant yn codi ffi ar ben cost y drwydded. Os gwnaethoch brynu eich trwydded drwy drydydd parti, cysylltwch ag ef yn uniongyrchol i ofyn iddo ad-dalu cost y drwydded a/neu’r ffi. Ni fydd Asiantaeth yr Amgylchedd yn ad-dalu deiliaid trwyddedau ar gyfer trwyddedau a brynwyd drwy drydydd partïon.",
|
|
509
|
+
"refund_bulletpoint_2_link": "gwefan",
|
|
510
|
+
"refund_bulletpoint_3": "Os ydych yn prynu trwydded ar gam neu’n prynu’r math anghywir o drwydded, ar eich cyfer chi neu rywun arall, gall y prynwr ofyn am ad-daliad o fewn 14 diwrnod o’r dyddiad prynu gwreiddiol.",
|
|
511
|
+
"refund_bulletpoint_4": "Pan fydd gwall wedi digwydd y gellir ei briodoli i Asiantaeth yr Amgylchedd neu Swyddfa’r Post, cysylltwch â ni’n uniongyrchol o fewn 14 diwrnod o’r dyddiad prynu gwreiddiol i ofyn am ad-daliad llawn. Ffoniwch Asiantaeth yr Amgylchedd ar 03708 506506.",
|
|
512
|
+
"refund_bulletpoint_5": "Ni chynigir ad-daliadau ar gyfer trwyddedau 1 diwrnod nac 8 niwrnod. Os ydych yn uwchraddio i drwydded 12 mis o fewn 14 diwrnod o ddyddiad dod i ben y drwydded tymor byr, byddwn yn ad-dalu cost y drwydded tymor byr ar ôl i chi brynu’r drwydded 12 mis.",
|
|
513
|
+
"refund_bulletpoint_6": "Gallwch ofyn am ad-daliad os ydych yn uwchraddio trwydded 2 wialen i drwydded 3 gwialen o fewn 14 diwrnod o’r dyddiad prynu gwreiddiol. Byddwn yn ad-dalu cost y drwydded 2 wialen ar ôl i chi brynu’r drwydded 3 gwialen.",
|
|
514
|
+
"refund_bulletpoint_7": "Gallwch ofyn am ad-daliad os ydych yn uwchraddio trwydded pysgod bras i drwydded eogiaid a brithyllod y môr o fewn 14 diwrnod o’r dyddiad prynu gwreiddiol. Byddwn yn ad-dalu cost y drwydded pysgod bras ar ôl i chi brynu’r drwydded eogiaid a brithyllod y môr.",
|
|
515
|
+
"refund_heading": "Polisi ad-dalu",
|
|
509
516
|
"refund_title": "Refund policy - GOV.UK",
|
|
510
517
|
"renewal_inactive_has_expired_1": " has expired on ",
|
|
511
518
|
"renewal_inactive_has_expired_2": " and can no longer be renewed",
|
package/src/locales/en.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"access_statement_ability_net_link": "AbilityNet",
|
|
3
|
-
"
|
|
3
|
+
"access_statement_ability_net_1": " has advice on making your device easier to use if you have a disability.",
|
|
4
|
+
"access_statement_ability_net_2": " has advice on making your device easier to use if you have a disability.",
|
|
4
5
|
"access_statement_body": "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:",
|
|
5
6
|
"access_statement_bulletpoint_1": "change colours, contrast levels and fonts",
|
|
6
7
|
"access_statement_bulletpoint_2": "zoom in up to 200% without the text spilling off the screen",
|
|
@@ -51,7 +52,8 @@
|
|
|
51
52
|
"access_statement_title": "Accessibility statement - GOV.UK",
|
|
52
53
|
"access_statement_visit_info_link": "office access and opening times",
|
|
53
54
|
"access_statement_visit_info_text_serivce": "We do not currently have a text relay service for people who are deaf, hearing impaired or have a speech impediment.",
|
|
54
|
-
"
|
|
55
|
+
"access_statement_visit_info_1": "See the Environment Agency’s ",
|
|
56
|
+
"access_statement_visit_info_2": ".",
|
|
55
57
|
"access_statement_visit": "If you visit our offices and need assistance or a British Sign Language interpreter, you should contact us before you visit.",
|
|
56
58
|
"account_disabled_body_1": "You were successfully signed in but your account is not enabled in Microsoft Dynamics.",
|
|
57
59
|
"account_disabled_title": "Account not enabled",
|
|
@@ -121,6 +123,10 @@
|
|
|
121
123
|
"client_error_title_forbidden": "Forbidden",
|
|
122
124
|
"client_error_title_not_found": "Page not found",
|
|
123
125
|
"client_error_title_unauth": "Unauthorized",
|
|
126
|
+
"client_error_back_during_payment": "This happened because you either closed the browser or used the back button during payment.",
|
|
127
|
+
"client_error_continue_with_payment_pre": "To continue with the payment, ",
|
|
128
|
+
"client_error_continue_with_payment_link": "go back to GOV Pay.",
|
|
129
|
+
"client_error_payment_start_again_pre": "Or, if you wish, you can discard this licence and ",
|
|
124
130
|
"concession_applied": "Concession applied",
|
|
125
131
|
"contact_summary_title": "Check the contact details",
|
|
126
132
|
"contact_us_body": "You can contact us by:",
|
|
@@ -166,6 +172,7 @@
|
|
|
166
172
|
"cookies_survey_body_link_3": "SmartSurvey cookies guide",
|
|
167
173
|
"cookies_survey_subheading": "Our performance survey",
|
|
168
174
|
"cookies_title": "Cookies - GOV.UK",
|
|
175
|
+
"cost": "Cost",
|
|
169
176
|
"disability_concession_12_month": "12 month licence holders may be eligible for disability concessions",
|
|
170
177
|
"disability_concession_badge_error_msg": "Enter the licence holder’s Blue Badge number",
|
|
171
178
|
"disability_concession_error_choose_option": "Choose one of the options.",
|
|
@@ -17,9 +17,7 @@ const validator = Joi.object({
|
|
|
17
17
|
}),
|
|
18
18
|
'blue-badge-number': Joi.alternatives().conditional('disability-concession', {
|
|
19
19
|
is: disabilityConcessionTypes.blueBadge,
|
|
20
|
-
then: Joi.string()
|
|
21
|
-
.max(25)
|
|
22
|
-
.required(),
|
|
20
|
+
then: Joi.string().max(25).required(),
|
|
23
21
|
otherwise: Joi.string().empty('')
|
|
24
22
|
})
|
|
25
23
|
}).options({ abortEarly: false, allowUnknown: true })
|
|
@@ -20,10 +20,7 @@ export default pageRoute(
|
|
|
20
20
|
ADDRESS_SELECT.page,
|
|
21
21
|
ADDRESS_SELECT.uri,
|
|
22
22
|
Joi.object({
|
|
23
|
-
address: Joi.number()
|
|
24
|
-
.integer()
|
|
25
|
-
.min(0)
|
|
26
|
-
.required()
|
|
23
|
+
address: Joi.number().integer().min(0).required()
|
|
27
24
|
}).options({ abortEarly: false, allowUnknown: true }),
|
|
28
25
|
nextPage,
|
|
29
26
|
getData
|
|
@@ -46,13 +46,13 @@ describe('contact > result-function', () => {
|
|
|
46
46
|
})
|
|
47
47
|
|
|
48
48
|
it('should return ok if renewal is false', async () => {
|
|
49
|
-
|
|
49
|
+
mockTransactionCacheGet.mockImplementationOnce(() => ({ isRenewal: false }))
|
|
50
50
|
const result = await resultFunction(mockRequest)
|
|
51
51
|
expect(result).toBe(CommonResults.OK)
|
|
52
52
|
})
|
|
53
53
|
|
|
54
54
|
it('should return summary if renewal is true', async () => {
|
|
55
|
-
|
|
55
|
+
mockTransactionCacheGet.mockImplementationOnce(() => ({ isRenewal: true }))
|
|
56
56
|
const result = await resultFunction(mockRequest)
|
|
57
57
|
expect(result).toBe(CommonResults.SUMMARY)
|
|
58
58
|
})
|
|
@@ -4,7 +4,7 @@ export default async request => {
|
|
|
4
4
|
const status = await request.cache().helpers.status.getCurrentPermission()
|
|
5
5
|
const transaction = await request.cache().helpers.transaction.getCurrentPermission()
|
|
6
6
|
|
|
7
|
-
return transaction.isLicenceForYou === false || status.fromSummary === CONTACT_SUMMARY_SEEN ||
|
|
7
|
+
return transaction.isLicenceForYou === false || status.fromSummary === CONTACT_SUMMARY_SEEN || transaction.isRenewal
|
|
8
8
|
? CommonResults.SUMMARY
|
|
9
9
|
: CommonResults.OK
|
|
10
10
|
}
|
|
@@ -36,9 +36,7 @@ export const getData = async request => {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
export const validator = Joi.object({
|
|
39
|
-
'how-contacted': Joi.string()
|
|
40
|
-
.valid('email', 'text', 'none')
|
|
41
|
-
.required(),
|
|
39
|
+
'how-contacted': Joi.string().valid('email', 'text', 'none').required(),
|
|
42
40
|
email: Joi.alternatives().conditional('how-contacted', {
|
|
43
41
|
is: 'email',
|
|
44
42
|
then: validation.contact.createEmailValidator(Joi),
|
|
@@ -28,9 +28,7 @@ export const getData = async request => {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
const validator = Joi.object({
|
|
31
|
-
'licence-confirmation-method': Joi.string()
|
|
32
|
-
.valid('email', 'text', 'none')
|
|
33
|
-
.required(),
|
|
31
|
+
'licence-confirmation-method': Joi.string().valid('email', 'text', 'none').required(),
|
|
34
32
|
text: Joi.alternatives().conditional('licence-confirmation-method', {
|
|
35
33
|
is: 'text',
|
|
36
34
|
then: mobilePhoneValidator,
|
|
@@ -18,9 +18,7 @@ export const getData = async request => {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
const validator = Joi.object({
|
|
21
|
-
'licence-option': Joi.string()
|
|
22
|
-
.valid('digital', 'paper-licence')
|
|
23
|
-
.required()
|
|
21
|
+
'licence-option': Joi.string().valid('digital', 'paper-licence').required()
|
|
24
22
|
}).options({ abortEarly: false, allowUnknown: true })
|
|
25
23
|
|
|
26
24
|
export default pageRoute(LICENCE_FULFILMENT.page, LICENCE_FULFILMENT.uri, validator, nextPage, getData)
|