@newskit-render/core 1.86.0 → 1.87.0-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
|
+
# [1.86.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.86.0-alpha.0...@newskit-render/core@1.86.0) (2022-09-06)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [1.85.6](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.85.6-alpha.1...@newskit-render/core@1.85.6) (2022-09-05)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @newskit-render/core
|
|
@@ -33,6 +33,10 @@ const pages = [
|
|
|
33
33
|
url: '/account/edit/commenting-notifications',
|
|
34
34
|
name: 'Commenting Notifications form',
|
|
35
35
|
},
|
|
36
|
+
{
|
|
37
|
+
url: '/account/edit/delivery-instructions',
|
|
38
|
+
name: 'delivery instructions form',
|
|
39
|
+
},
|
|
36
40
|
]
|
|
37
41
|
|
|
38
42
|
describe('Page accessibility', () => {
|
|
@@ -201,6 +201,7 @@ describe('Account Subscription & Cancellation', () => {
|
|
|
201
201
|
'To update your Paypal credentials, please speak to one of our advisors on xxxx-xxx-xxxx or add a new payment method via credit/debit card using the form below.'
|
|
202
202
|
)
|
|
203
203
|
})
|
|
204
|
+
|
|
204
205
|
it('should show your deliveries section if the subscription has print', () => {
|
|
205
206
|
cy.GetAcsSession('withSub')
|
|
206
207
|
cy.mockConsent()
|
|
@@ -212,4 +213,69 @@ describe('Account Subscription & Cancellation', () => {
|
|
|
212
213
|
)
|
|
213
214
|
cy.contains('Your deliveries')
|
|
214
215
|
})
|
|
216
|
+
|
|
217
|
+
it('should be able to add your delivery instructions', () => {
|
|
218
|
+
cy.GetAcsSession('withSub')
|
|
219
|
+
cy.mockConsentAndVisit('/account/edit/delivery-instructions')
|
|
220
|
+
cy.contains('h1', 'Delivery instructions')
|
|
221
|
+
cy.contains('Where should we leave your Newspaper?')
|
|
222
|
+
cy.get('[type="radio"]').first().should('be.checked')
|
|
223
|
+
// mock sussesful api call
|
|
224
|
+
cy.intercept('POST', '/api/account/mutate', {
|
|
225
|
+
statusCode: 200,
|
|
226
|
+
body: { data: { updateUserSubscription: { success: true } } },
|
|
227
|
+
})
|
|
228
|
+
|
|
229
|
+
cy.get('[data-testid="primary-button"]').scrollIntoView().click()
|
|
230
|
+
cy.contains(
|
|
231
|
+
'[data-testid="toast-container"]',
|
|
232
|
+
'Updating your delivery instructions'
|
|
233
|
+
)
|
|
234
|
+
|
|
235
|
+
// Redirects to Subscription and billing page
|
|
236
|
+
cy.contains(
|
|
237
|
+
'[data-testid="toast-container"]',
|
|
238
|
+
'Your delivery instructions were succesfully updated. This may take up to 48hrs to come into effect.'
|
|
239
|
+
)
|
|
240
|
+
})
|
|
241
|
+
|
|
242
|
+
it('should be able to add your custom delivery instructions', () => {
|
|
243
|
+
cy.GetAcsSession('withSub')
|
|
244
|
+
cy.mockConsentAndVisit('/account/edit/delivery-instructions')
|
|
245
|
+
cy.contains('h1', 'Delivery instructions')
|
|
246
|
+
cy.contains('Where should we leave your Newspaper?')
|
|
247
|
+
|
|
248
|
+
// cy.get('[value="Other (Please state)"]').first().check()
|
|
249
|
+
cy.get('[type="radio"]').check('Other (Please state)')
|
|
250
|
+
cy.contains(
|
|
251
|
+
'Please note that if you choose a delivery location that is not secure we cannot be liable for lost or stolen newspapers.'
|
|
252
|
+
)
|
|
253
|
+
cy.get('[data-testid="primary-button"]').scrollIntoView().click()
|
|
254
|
+
cy.contains('Please enter your delivery instructions.')
|
|
255
|
+
cy.get('input[name="other"]')
|
|
256
|
+
.clear()
|
|
257
|
+
.type(
|
|
258
|
+
'This is more than seventy Characters. Lorem ipsum dolor sit amet, consectetur.'
|
|
259
|
+
)
|
|
260
|
+
cy.get('[data-testid="primary-button"]').scrollIntoView().click()
|
|
261
|
+
cy.contains('You cannot exceed 70 characters')
|
|
262
|
+
cy.get('input[name="other"]').clear().type('Ring the bell')
|
|
263
|
+
// mock sussesful api call
|
|
264
|
+
cy.intercept('POST', '/api/account/mutate', {
|
|
265
|
+
statusCode: 200,
|
|
266
|
+
body: { data: { updateUserSubscription: { success: true } } },
|
|
267
|
+
})
|
|
268
|
+
|
|
269
|
+
cy.get('[data-testid="primary-button"]').scrollIntoView().click()
|
|
270
|
+
cy.contains(
|
|
271
|
+
'[data-testid="toast-container"]',
|
|
272
|
+
'Updating your delivery instructions'
|
|
273
|
+
)
|
|
274
|
+
|
|
275
|
+
// Redirects to Subscription and billing page
|
|
276
|
+
cy.contains(
|
|
277
|
+
'[data-testid="toast-container"]',
|
|
278
|
+
'Your delivery instructions were succesfully updated. This may take up to 48hrs to come into effect.'
|
|
279
|
+
)
|
|
280
|
+
})
|
|
215
281
|
})
|
|
@@ -18,6 +18,10 @@ const pages = [
|
|
|
18
18
|
url: '/account/edit/commenting-notifications',
|
|
19
19
|
pageName: 'Commenting Notifications form',
|
|
20
20
|
},
|
|
21
|
+
{
|
|
22
|
+
url: '/account/edit/delivery-instructions',
|
|
23
|
+
name: 'delivery instructions form',
|
|
24
|
+
},
|
|
21
25
|
]
|
|
22
26
|
|
|
23
27
|
describe('Visual regression', () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newskit-render/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.87.0-alpha.0",
|
|
4
4
|
"description": "Newskit Render - Core package",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"@apollo/client": "3.4.16",
|
|
37
37
|
"@newskit-render/api": "^0.37.1",
|
|
38
38
|
"@newskit-render/auth": "^0.45.1",
|
|
39
|
-
"@newskit-render/checkout": "^0.54.
|
|
39
|
+
"@newskit-render/checkout": "^0.54.7-alpha.0",
|
|
40
40
|
"@newskit-render/feature-flags": "^0.25.1",
|
|
41
41
|
"@newskit-render/feed": "^0.27.1",
|
|
42
|
-
"@newskit-render/my-account": "^2.
|
|
43
|
-
"@newskit-render/shared-components": "^0.
|
|
44
|
-
"@newskit-render/standalone-components": "^0.35.
|
|
45
|
-
"@newskit-render/validation": "^0.
|
|
42
|
+
"@newskit-render/my-account": "^2.6.0-alpha.0",
|
|
43
|
+
"@newskit-render/shared-components": "^0.72.0-alpha.0",
|
|
44
|
+
"@newskit-render/standalone-components": "^0.35.2-alpha.0",
|
|
45
|
+
"@newskit-render/validation": "^0.53.0-alpha.0",
|
|
46
46
|
"cross-fetch": "3.1.5",
|
|
47
47
|
"graphql": "15.6.0",
|
|
48
48
|
"lodash.get": "4.4.2",
|