@newskit-render/core 4.19.2 → 4.19.3-alpha.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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.19.2](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@4.19.2-alpha.0...@newskit-render/core@4.19.2) (2023-10-30)
7
+
8
+ **Note:** Version bump only for package @newskit-render/core
9
+
10
+
11
+
12
+
13
+
6
14
  ## [4.19.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@4.19.1-alpha.0...@newskit-render/core@4.19.1) (2023-10-26)
7
15
 
8
16
  **Note:** Version bump only for package @newskit-render/core
@@ -1,4 +1,5 @@
1
1
  import * as printSubscriptionPageProps from '../../fixtures/print-subscriptions/print-subscription-response.json'
2
+ import * as voucherSubscriptionPageProps from '../../fixtures/print-subscriptions/voucher-subscription-response.json'
2
3
 
3
4
  describe('Account without user', () => {
4
5
  beforeEach(() => {
@@ -158,7 +159,7 @@ describe('My account personal details', () => {
158
159
  )
159
160
  })
160
161
 
161
- it('Should show success toast', () => {
162
+ it('Should show success toast when resetting password', () => {
162
163
  cy.get('a[href="/account/edit/password"]')
163
164
  .should('be.visible')
164
165
  .click({ force: true })
@@ -310,6 +311,32 @@ describe('My account personal details', () => {
310
311
  )
311
312
  cy.url().should('eq', 'http://localhost:3000/account')
312
313
  })
314
+
315
+ it('Should not show modal when postcode is outside delivery area and user has vouchers', () => {
316
+ cy.visitAndOverrideNextData(
317
+ '/account/edit/address',
318
+ 'props.pageProps.data.subscriptions',
319
+ voucherSubscriptionPageProps.props.pageProps.user.subscriptions
320
+ )
321
+ cy.get('input[name="line1"]').clear().type('2 Tuke House')
322
+ cy.get('input[name="line2"]').clear().type('Cromwell Road')
323
+ cy.get('input[name="line3"]').clear().type('3rd optional line')
324
+ cy.get('input[name="city"]').clear().type('York')
325
+ cy.get('input[name="county"]').clear().type('North Yorkshire')
326
+ cy.get('input[name="postcode"]').clear().type('YO1 6DJ')
327
+
328
+ cy.get('[data-testid="primary-button"]').click()
329
+
330
+ cy.get('[data-testid="description-block"]').should('not.exist')
331
+ cy.get('[data-testid="modal-link-0"]').should('not.exist')
332
+ cy.get('Address Outside Delivery Area').should('not.exist')
333
+ cy.get('Return to My Account').should('not.exist')
334
+ cy.contains(
335
+ '[data-testid="toast-container"]',
336
+ 'Your address was successfully updated'
337
+ )
338
+ cy.url().should('eq', 'http://localhost:3000/account')
339
+ })
313
340
  })
314
341
 
315
342
  describe('My account personal details - Display name', () => {
@@ -73,7 +73,7 @@ describe('MAIN API', () => {
73
73
  expect(response.body.mobile).to.eq('+447777777778')
74
74
  expect(response.body.firstName).to.eq('John')
75
75
  expect(response.body.lastName).to.eq('Smith')
76
- expect(response.body.address.city).to.eq('London')
76
+ expect(response.body.address.city).to.eq('York')
77
77
  })
78
78
  })
79
79
  })
@@ -0,0 +1,101 @@
1
+ {
2
+ "props": {
3
+ "pageProps": {
4
+ "user": {
5
+ "userId": null,
6
+ "cpn": "4AAA039261010",
7
+ "firstName": "Test",
8
+ "lastName": "test",
9
+ "email": "cmp-test-direct-20-09-22@yopmail.com",
10
+ "paymentFailure": {
11
+ "__typename": "CustomerPaymentFailure",
12
+ "active": false,
13
+ "startDate": null
14
+ },
15
+ "subscriptions": [
16
+ {
17
+ "id": "SUB-0010708341",
18
+ "cpn": "4AAA039261010",
19
+ "startDate": "2022-09-20T09:44:28",
20
+ "endDate": null,
21
+ "serviceCancellationDate": null,
22
+ "isActive": true,
23
+ "status": "Active",
24
+ "price": 34.67,
25
+ "currency": "GBP",
26
+ "type": "Print",
27
+ "dtc": false,
28
+ "products": [
29
+ {
30
+ "id": "SUB-0010708341|PKPG-065",
31
+ "code": "PKPG-065"
32
+ }
33
+ ],
34
+ "phases": [
35
+ {
36
+ "id": "SUB-0010708341|InitialCooling",
37
+ "type": "Cooling Off",
38
+ "active": false,
39
+ "startDate": "2022-09-26T00:00:00",
40
+ "endDate": "2022-10-10T23:59:59"
41
+ },
42
+ {
43
+ "id": "SUB-0010708341|TM-S01",
44
+ "type": "Contract",
45
+ "active": false,
46
+ "startDate": "2022-10-10T23:59:59",
47
+ "endDate": "2022-12-26T00:00:00"
48
+ },
49
+ {
50
+ "id": "SUB-0010708341|TM-S02",
51
+ "type": "Rolling",
52
+ "active": false,
53
+ "startDate": "2022-12-26T00:00:00",
54
+ "endDate": null
55
+ }
56
+ ],
57
+ "billingDetails": {
58
+ "__typename": "BillingDetails",
59
+ "available": true,
60
+ "billCycleDay": 26,
61
+ "paymentMethod": {
62
+ "__typename": "PaymentMethod",
63
+ "type": "BankTransfer",
64
+ "cardType": null,
65
+ "cardNumber": null,
66
+ "expirationMonth": null,
67
+ "expirationYear": null,
68
+ "bankName": "A Bank",
69
+ "bankCode": "200000",
70
+ "bankTransferAccountNumberMask": "****4247",
71
+ "paymentMethodStatus": "Active",
72
+ "paypalBaid": null,
73
+ "paypalType": null,
74
+ "walletType": null
75
+ }
76
+ },
77
+ "nextVoucherBookletDueDate": "2023-09-17",
78
+ "nextVoucherInsGenerationDate": "2023-09-10",
79
+ "fulfilmentPeriodStartDate": "2023-09-25",
80
+ "fulfilmentPeriodEndDate": "2023-12-24",
81
+ "freeOfCharge": false,
82
+ "deliveryInformation": "On my doorstep",
83
+ "__typename": "Subscription"
84
+ }
85
+ ],
86
+ "__typename": "User",
87
+ "cpn": "4AAA039261010"
88
+ },
89
+ "env": { "LOQACCOUNT_KEY": "" }
90
+ },
91
+ "tenant": "DEMO",
92
+ "__N_SSP": true
93
+ },
94
+ "page": "/account/subscription-and-billing",
95
+ "query": {},
96
+ "buildId": "development",
97
+ "isFallback": false,
98
+ "gssp": true,
99
+ "appGip": true,
100
+ "scriptLoader": []
101
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newskit-render/core",
3
- "version": "4.19.2",
3
+ "version": "4.19.3-alpha.0",
4
4
  "description": "Newskit Render - Core package",
5
5
  "author": "",
6
6
  "license": "UNLICENSED",
@@ -47,7 +47,7 @@
47
47
  "@newskit-render/checkout": "^3.8.2",
48
48
  "@newskit-render/feature-flags": "^1.7.0",
49
49
  "@newskit-render/feed": "^1.8.3",
50
- "@newskit-render/my-account": "^7.17.1",
50
+ "@newskit-render/my-account": "^7.17.2-alpha.0",
51
51
  "@newskit-render/shared-components": "^4.9.1",
52
52
  "@newskit-render/standalone-components": "^3.18.2",
53
53
  "@newskit-render/validation": "^1.13.0",