@defra-fish/gafl-webapp-service 1.75.0 → 1.76.0-rc.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defra-fish/gafl-webapp-service",
3
- "version": "1.75.0",
3
+ "version": "1.76.0-rc.2",
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.75.0",
40
- "@defra-fish/connectors-lib": "1.75.0",
39
+ "@defra-fish/business-rules-lib": "1.76.0-rc.2",
40
+ "@defra-fish/connectors-lib": "1.76.0-rc.2",
41
41
  "@defra/hapi-gapi": "2.0.0",
42
42
  "@hapi/boom": "9.1.2",
43
43
  "@hapi/catbox-redis": "6.0.2",
@@ -72,12 +72,12 @@
72
72
  "gulp-minify": "3.1.0",
73
73
  "gulp-sass": "5.1.0",
74
74
  "gulp-sourcemaps": "3.0.0",
75
- "sass": "1.69.3"
75
+ "sass": "1.102.0"
76
76
  },
77
77
  "jest": {
78
78
  "setupFilesAfterEnv": [
79
79
  "./gafl-jest-matchers.js"
80
80
  ]
81
81
  },
82
- "gitHead": "0fec5ec015fb288eabf13f366319bcb9214e81c0"
82
+ "gitHead": "254132463f912d406c9260b08e694e20dbc2cc46"
83
83
  }
@@ -743,16 +743,17 @@
743
743
  "refund_bulletpoint_6": "Gallwch wneud cais am ad-daliad llawn os byddwch yn uwchraddio trwydded 2 wialen i drwydded 3 gwialen o fewn 14 diwrnod i’r dyddiad y prynwyd y drwydded yn wreiddiol. Byddwn yn ad-dalu cost y drwydded 2 wialen ar ôl i chi brynu’r drwydded 3 gwialen.",
744
744
  "refund_bulletpoint_7": "Gallwch wneud cais am ad-daliad os byddwch yn uwchraddio trwydded bysgota pysgod bras i drwydded eog a brithyllod y môr o fewn 14 diwrnod i’r dyddiad y prynwyd y drwydded yn wreiddiol. Byddwn yn ad-dalu cost y drwydded bysgota pysgod bras ar ôl i chi brynu’r drwydded eog a brithyllod y môr.",
745
745
  "refund_heading": "Polisi ad-dalu",
746
- "renewal_inactive_has_expired_1": " has expired on ",
747
- "renewal_inactive_has_expired_2": " and can no longer be renewed",
748
- "renewal_inactive_not_annual_1": " is not a 12 month licence and cannot be renewed.",
749
- "renewal_inactive_not_due_1": "The licence ending in ",
750
- "renewal_inactive_not_due_2": " does not expire until ",
751
- "renewal_inactive_title_1": "You are renewing this licence too early",
752
- "renewal_inactive_title_2": "The licence renewal has expired",
753
- "renewal_inactive_title_3": "You cannot renew an 8 day or 1 day licence",
754
- "renewal_inactive_title_4": "You can ",
755
- "renewal_inactive_title_link": "buy a new licence.",
746
+ "renewal_inactive_has_expired_1": " i ben ar ",
747
+ "renewal_inactive_has_expired_2": " ac nid oes modd ei hadnewyddu bellach.",
748
+ "renewal_inactive_not_annual_1": " yn drwydded 12 mis, felly nid oes modd ei hadnewyddu.",
749
+ "renewal_inactive_not_due_1": "Nid yw’r drwydded sy’n gorffen â ",
750
+ "renewal_inactive_not_due_2": " yn dod i ben tan ",
751
+ "renewal_inactive_not_due_3": "Daeth y drwydded sy’n gorffen â ",
752
+ "renewal_inactive_title_1": "Rydych chi’n adnewyddu’r drwydded hon yn rhy gynnar",
753
+ "renewal_inactive_title_2": "Mae cyfnod adnewyddu’r drwydded wedi dod i ben",
754
+ "renewal_inactive_title_3": "Nid oes modd adnewyddu trwydded 8 diwrnod na thrwydded 1 diwrnod",
755
+ "renewal_inactive_title_4": "Gallwch chi ",
756
+ "renewal_inactive_title_link": "brynu trwydded newydd.",
756
757
  "renewal_start_date_error_format": "Nid yw hwn yn ddyddiad dilys. Rhowch y dyddied yr hoffech i’r drwydded ddechrau gan gynnwys y diwrnod, mis a’r flwyddyn",
757
758
  "renewal_start_date_error_hint": "Rhowch ddyddiad rhwng ",
758
759
  "renewal_start_date_error_max_1": "Mae’n rhaid i’r trwydded newydd ddechrau o fewn ",
@@ -755,10 +755,11 @@
755
755
  "refund_bulletpoint_7": "You can request a refund if you upgrade a coarse fish licence to a salmon and sea trout licence within 14 days of the original purchase date. We will refund the cost of the coarse fish licence after you have purchased the salmon and sea trout licence.",
756
756
  "refund_heading": "Refund policy",
757
757
  "renewal_inactive_has_expired_1": " has expired on ",
758
- "renewal_inactive_has_expired_2": " and can no longer be renewed",
758
+ "renewal_inactive_has_expired_2": " and can no longer be renewed.",
759
759
  "renewal_inactive_not_annual_1": " is not a 12 month licence and cannot be renewed.",
760
760
  "renewal_inactive_not_due_1": "The licence ending in ",
761
761
  "renewal_inactive_not_due_2": " does not expire until ",
762
+ "renewal_inactive_not_due_3": "The licence ending in ",
762
763
  "renewal_inactive_title_1": "You are renewing this licence too early",
763
764
  "renewal_inactive_title_2": "The licence renewal has expired",
764
765
  "renewal_inactive_title_3": "You cannot renew an 8 day or 1 day licence",
@@ -15,14 +15,15 @@ jest.mock('../../../../processors/uri-helper.js', () => ({
15
15
  }))
16
16
 
17
17
  const getMessages = (overrides = {}) => ({
18
- renewal_inactive_title_1: 'You are renewing this licence too early',
19
- renewal_inactive_title_2: 'The licence renewal has expired',
20
- renewal_inactive_title_3: 'You cannot renew an 8 day or 1 day licence',
21
- renewal_inactive_not_due_1: 'The licence ending in ',
22
- renewal_inactive_not_due_2: ' does not expire until ',
23
- renewal_inactive_has_expired_1: ' has expired on ',
24
- renewal_inactive_has_expired_2: ' and can no longer be renewed',
25
- renewal_inactive_not_annual_1: ' is not a 12 month licence and cannot be renewed.',
18
+ renewal_inactive_title_1: 'renewal_inactive_title_1',
19
+ renewal_inactive_title_2: 'renewal_inactive_title_2',
20
+ renewal_inactive_title_3: 'renewal_inactive_title_3',
21
+ renewal_inactive_not_due_1: 'renewal_inactive_not_due_1 ',
22
+ renewal_inactive_not_due_2: ' renewal_inactive_not_due_2 ',
23
+ renewal_inactive_not_due_3: 'renewal_inactive_not_due_3 ',
24
+ renewal_inactive_has_expired_1: ' renewal_inactive_has_expired_1 ',
25
+ renewal_inactive_has_expired_2: ' renewal_inactive_has_expired_2',
26
+ renewal_inactive_not_annual_1: ' renewal_inactive_not_annual_1',
26
27
  ...overrides
27
28
  })
28
29
 
@@ -63,19 +64,19 @@ describe('renewal-inactive > route', () => {
63
64
  describe.each([
64
65
  [
65
66
  RENEWAL_ERROR_REASON.NOT_DUE,
66
- 'The licence ending in abc-123 does not expire until 12th Never',
67
+ 'renewal_inactive_not_due_1 abc-123 renewal_inactive_not_due_2 12th Never',
67
68
  { renewal_inactive_title_1: 'Renewal inactive title 1' },
68
69
  'Renewal inactive title 1'
69
70
  ],
70
71
  [
71
72
  RENEWAL_ERROR_REASON.EXPIRED,
72
- 'The licence ending in abc-123 has expired on 12th Never and can no longer be renewed',
73
+ 'renewal_inactive_not_due_3 abc-123 renewal_inactive_has_expired_1 12th Never renewal_inactive_has_expired_2',
73
74
  { renewal_inactive_title_2: 'Renewal inactive title 2' },
74
75
  'Renewal inactive title 2'
75
76
  ],
76
77
  [
77
78
  RENEWAL_ERROR_REASON.NOT_ANNUAL,
78
- 'The licence ending in abc-123 is not a 12 month licence and cannot be renewed.',
79
+ 'renewal_inactive_not_due_1 abc-123 renewal_inactive_not_annual_1',
79
80
  { renewal_inactive_title_3: 'Renewal inactive title 3' },
80
81
  'Renewal inactive title 3'
81
82
  ],
@@ -186,21 +187,27 @@ describe('renewal-inactive > route', () => {
186
187
 
187
188
  describe('getTitleAndBodyMessage', () => {
188
189
  it.each([
189
- ['The licence ending in ABC123 does not expire until 13 December 2020', RENEWAL_ERROR_REASON.NOT_DUE],
190
- ['The licence ending in ABC123 has expired on 13 December 2020 and can no longer be renewed', RENEWAL_ERROR_REASON.EXPIRED],
191
- ['The licence ending in ABC123 is not a 12 month licence and cannot be renewed.', RENEWAL_ERROR_REASON.NOT_ANNUAL],
192
- ['The licence ending in ABC123 does not expire until 13 December 2020', RENEWAL_ERROR_REASON.NOT_DUE],
193
- ['The licence ending in ABC123 has expired on 13 December 2020 and can no longer be renewed', RENEWAL_ERROR_REASON.EXPIRED],
194
- ['The licence ending in ABC123 is not a 12 month licence and cannot be renewed.', RENEWAL_ERROR_REASON.NOT_ANNUAL]
190
+ ['renewal_inactive_not_due_1 ABC123 renewal_inactive_not_due_2 13 December 2020', RENEWAL_ERROR_REASON.NOT_DUE],
191
+ [
192
+ 'renewal_inactive_not_due_3 ABC123 renewal_inactive_has_expired_1 13 December 2020 renewal_inactive_has_expired_2',
193
+ RENEWAL_ERROR_REASON.EXPIRED
194
+ ],
195
+ ['renewal_inactive_not_due_1 ABC123 renewal_inactive_not_annual_1', RENEWAL_ERROR_REASON.NOT_ANNUAL],
196
+ ['renewal_inactive_not_due_1 ABC123 renewal_inactive_not_due_2 13 December 2020', RENEWAL_ERROR_REASON.NOT_DUE],
197
+ [
198
+ 'renewal_inactive_not_due_3 ABC123 renewal_inactive_has_expired_1 13 December 2020 renewal_inactive_has_expired_2',
199
+ RENEWAL_ERROR_REASON.EXPIRED
200
+ ],
201
+ ['renewal_inactive_not_due_1 ABC123 renewal_inactive_not_annual_1', RENEWAL_ERROR_REASON.NOT_ANNUAL]
195
202
  ])('should return and object with bodyMessage as %s if the reason is %s', (expected, reason) => {
196
203
  const result = getTitleAndBodyMessage(getMessages(), reason, 'ABC123', '13 December 2020')
197
204
  expect(result.bodyMessage).toBe(expected)
198
205
  })
199
206
 
200
207
  it.each([
201
- ['You are renewing this licence too early', RENEWAL_ERROR_REASON.NOT_DUE],
202
- ['The licence renewal has expired', RENEWAL_ERROR_REASON.EXPIRED],
203
- ['You cannot renew an 8 day or 1 day licence', RENEWAL_ERROR_REASON.NOT_ANNUAL]
208
+ ['renewal_inactive_title_1', RENEWAL_ERROR_REASON.NOT_DUE],
209
+ ['renewal_inactive_title_2', RENEWAL_ERROR_REASON.EXPIRED],
210
+ ['renewal_inactive_title_3', RENEWAL_ERROR_REASON.NOT_ANNUAL]
204
211
  ])('should return and object with title as %s if the reason is %s', (expected, reason) => {
205
212
  const result = getTitleAndBodyMessage(getMessages(), reason, 'ABC123', '13 December 2020')
206
213
  expect(result.title).toBe(expected)
@@ -15,7 +15,7 @@ export const getTitleAndBodyMessage = (mssgs, reason, referenceNumber, validTo)
15
15
  }
16
16
  case RENEWAL_ERROR_REASON.EXPIRED:
17
17
  return {
18
- bodyMessage: `${mssgs.renewal_inactive_not_due_1}${referenceNumber}${mssgs.renewal_inactive_has_expired_1}${validTo}${mssgs.renewal_inactive_has_expired_2}`,
18
+ bodyMessage: `${mssgs.renewal_inactive_not_due_3}${referenceNumber}${mssgs.renewal_inactive_has_expired_1}${validTo}${mssgs.renewal_inactive_has_expired_2}`,
19
19
  title: mssgs.renewal_inactive_title_2
20
20
  }
21
21
  case RENEWAL_ERROR_REASON.NOT_ANNUAL: