@newskit-render/core 4.7.4-alpha.2 → 4.8.0-alpha.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.
@@ -0,0 +1,83 @@
1
+ import { IconCreditCard, IconDirectDebit } from '@newskit-render/my-account'
2
+ const itemFilterDataPath = 'paymentFailure.active'
3
+ const lablIconOverrides = {
4
+ size: 'iconSize030',
5
+ stylePreset: 'inkContrast',
6
+ marginInlineEnd: 'space040',
7
+ }
8
+
9
+ const iconOverrides = {
10
+ xs: true,
11
+ sm: true,
12
+ md: true,
13
+ lg: true,
14
+ xl: true,
15
+ }
16
+
17
+ export const paymentMethodContext = {
18
+ items: [
19
+ {
20
+ label: 'Debit/Credit Card',
21
+ href: '[baseURL]/payment',
22
+ default: 'Debit/Credit Card',
23
+ labelIcon: {
24
+ Icon: IconCreditCard,
25
+ overrides: lablIconOverrides,
26
+ },
27
+ icon: 'internal',
28
+ iconOverrides,
29
+ filter: {
30
+ dataPath: itemFilterDataPath,
31
+ showOnTrue: true,
32
+ },
33
+ },
34
+ {
35
+ label: 'Direct Debit',
36
+ href: '[baseURL]/payment-direct-debit',
37
+ default: 'Direct Debit',
38
+ labelIcon: {
39
+ Icon: IconDirectDebit,
40
+ overrides: lablIconOverrides,
41
+ },
42
+ icon: 'internal',
43
+ iconOverrides,
44
+ filter: {
45
+ dataPath: itemFilterDataPath,
46
+ showOnTrue: false,
47
+ },
48
+ },
49
+ // {
50
+ // label: 'PayPal',
51
+ // href: '[baseURL]/payment-paypal',
52
+ // default: 'PayPal',
53
+ // labelIcon: {
54
+ // Icon: IconPaypal,
55
+ // overrides: lablIconOverrides,
56
+ // },
57
+ // icon: 'internal',
58
+ // iconOverrides,
59
+ // },
60
+ // {
61
+ // label: 'ApplePay',
62
+ // href: '[baseURL]/payment-applepay',
63
+ // default: 'ApplePay',
64
+ // labelIcon: {
65
+ // Icon: IconApplePay,
66
+ // overrides: lablIconOverrides,
67
+ // },
68
+ // icon: 'internal',
69
+ // iconOverrides,
70
+ // },
71
+ // {
72
+ // label: 'Google Pay',
73
+ // href: '[baseURL]/payment-google-pay',
74
+ // default: 'Google Pay',
75
+ // labelIcon: {
76
+ // Icon: IconGooglePay,
77
+ // overrides: lablIconOverrides,
78
+ // },
79
+ // icon: 'internal',
80
+ // iconOverrides,
81
+ // },
82
+ ],
83
+ }
@@ -1,5 +1,6 @@
1
1
  describe('My account Payment methods page', () => {
2
2
  beforeEach(() => {
3
+ cy.GetTnlAcsSession()
3
4
  cy.mockConsentAndVisit('/account/payment-methods')
4
5
  })
5
6
 
package/cypress.config.ts CHANGED
@@ -32,8 +32,6 @@ export default defineConfig({
32
32
  return config
33
33
  },
34
34
  baseUrl: 'http://localhost:3000',
35
- video: false,
36
- screenshotOnRunFailure: false,
37
35
  specPattern: './cypress/e2e/**/*.cy.{js,jsx,ts,tsx}',
38
36
  excludeSpecPattern: './cypress/e2e/checkout/*.cy.{js,jsx,ts,tsx}',
39
37
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newskit-render/core",
3
- "version": "4.7.4-alpha.2",
3
+ "version": "4.8.0-alpha.1",
4
4
  "description": "Newskit Render - Core package",
5
5
  "author": "",
6
6
  "license": "UNLICENSED",
@@ -41,12 +41,12 @@
41
41
  "@emotion/styled": "11.9.3",
42
42
  "@newskit-render/api": "^1.6.8",
43
43
  "@newskit-render/auth": "^1.4.0",
44
- "@newskit-render/checkout": "^3.3.3",
44
+ "@newskit-render/checkout": "^3.3.4-alpha.0",
45
45
  "@newskit-render/feature-flags": "^1.4.11",
46
46
  "@newskit-render/feed": "^1.5.0",
47
- "@newskit-render/my-account": "^6.9.2-alpha.2",
48
- "@newskit-render/shared-components": "^3.12.1",
49
- "@newskit-render/standalone-components": "^3.10.1",
47
+ "@newskit-render/my-account": "^6.10.0-alpha.0",
48
+ "@newskit-render/shared-components": "^3.13.0-alpha.0",
49
+ "@newskit-render/standalone-components": "^3.10.2-alpha.0",
50
50
  "@newskit-render/validation": "^1.8.1",
51
51
  "@next/font": "13.1.6",
52
52
  "cross-fetch": "3.1.5",
@@ -3,8 +3,11 @@ import { getProviderProps, PaymentMethods } from '@newskit-render/my-account'
3
3
  import newrelic from 'newrelic'
4
4
  import { initAndGetFeatureFlag } from '@newskit-render/feature-flags' // create-render-app effected
5
5
  import { optimizelysdkKey } from '../../../config' // create-render-app effected
6
+ import { paymentMethodContext } from '../../../context/app-context/paymentMethodContext'
6
7
 
7
- const AccountPaymentMethods = (props) => <PaymentMethods {...props} />
8
+ const AccountPaymentMethods = (props) => (
9
+ <PaymentMethods {...props} context={paymentMethodContext} />
10
+ )
8
11
 
9
12
  export default AccountPaymentMethods
10
13
 
package/gitignore DELETED
@@ -1,39 +0,0 @@
1
- # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2
-
3
- # dependencies
4
- /node_modules
5
- /.pnp
6
- .pnp.js
7
-
8
- # testing
9
- /coverage
10
- /cypress/videos
11
- /cypress/screenshots
12
- /__pacts__/logs
13
- /__pacts__/pacts
14
-
15
- # next.js
16
- /.next/
17
- /out/
18
-
19
- # production
20
- /build
21
-
22
- # misc
23
- .DS_Store
24
- *.pem
25
-
26
- # debug
27
- npm-debug.log*
28
- yarn-debug.log*
29
- yarn-error.log*
30
- newrelic_agent.log
31
-
32
- # local env files
33
- .env.local
34
- .env.development.local
35
- .env.test.local
36
- .env.production.local
37
-
38
- # vercel
39
- .vercel