@defra-fish/gafl-webapp-service 1.60.0-rc.1 → 1.60.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.60.0-rc.1",
3
+ "version": "1.60.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.60.0-rc.1",
40
- "@defra-fish/connectors-lib": "1.60.0-rc.1",
39
+ "@defra-fish/business-rules-lib": "1.60.0-rc.2",
40
+ "@defra-fish/connectors-lib": "1.60.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",
@@ -80,5 +80,5 @@
80
80
  "./gafl-jest-matchers.js"
81
81
  ]
82
82
  },
83
- "gitHead": "788bfa677a11c509bc44e31f98bd12e98d3f57b4"
83
+ "gitHead": "35b29edb1fd37ed3b467e2140f9704787044ad96"
84
84
  }
@@ -50,20 +50,15 @@ describe('validForRecurringPayment', () => {
50
50
 
51
51
  describe('isRecurringPayment', () => {
52
52
  it.each`
53
- show | agreementId | expected
54
- ${true} | ${'foo123'} | ${true}
55
- ${true} | ${undefined} | ${false}
56
- ${false} | ${'foo123'} | ${false}
57
- ${false} | ${undefined} | ${false}
58
- `(
59
- 'recurringPayment returns $expected when SHOW_RECURRING_PAYMENTS is $show and the transaction agreementId is $agreementId',
60
- async ({ show, agreementId, expected }) => {
61
- process.env.SHOW_RECURRING_PAYMENTS = show
62
- const transaction = { agreementId }
53
+ agreementId | expected
54
+ ${'foo123'} | ${true}
55
+ ${undefined} | ${false}
56
+ `('recurringPayment returns $expected when transaction agreementId is $agreementId', async ({ show, agreementId, expected }) => {
57
+ process.env.SHOW_RECURRING_PAYMENTS = show
58
+ const transaction = { agreementId }
63
59
 
64
- expect(isRecurringPayment(transaction)).toBe(expected)
60
+ expect(isRecurringPayment(transaction)).toBe(expected)
65
61
 
66
- delete process.env.SHOW_RECURRING_PAYMENTS
67
- }
68
- )
62
+ delete process.env.SHOW_RECURRING_PAYMENTS
63
+ })
69
64
  })
@@ -22,4 +22,4 @@ export const validForRecurringPayment = permission => {
22
22
  )
23
23
  }
24
24
 
25
- export const isRecurringPayment = transaction => process.env.SHOW_RECURRING_PAYMENTS?.toLowerCase() === 'true' && !!transaction.agreementId
25
+ export const isRecurringPayment = transaction => !!transaction.agreementId