@newskit-render/core 4.0.0 → 4.0.1-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 +8 -0
- package/cypress/e2e/account/SkipToContent.cy.js +10 -11
- package/cypress/e2e/account/account-page.cy.js +24 -42
- package/cypress/e2e/account/account-subscription.cy.js +2 -0
- package/cypress/e2e/account/holiday-stop.cy.js +2 -0
- package/cypress/e2e/help-hub/result-page.cy.js +1 -3
- package/cypress.config.ts +1 -0
- package/package.json +1 -1
- package/cypress/e2e/account/account-edit-page.cy.js +0 -32
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.0.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@4.0.0-alpha.0...@newskit-render/core@4.0.0) (2023-03-20)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [3.1.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@3.1.0-alpha.1...@newskit-render/core@3.1.0) (2023-03-16)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @newskit-render/core
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
// })
|
|
1
|
+
describe('SkipToContent', () => {
|
|
2
|
+
beforeEach(() => {
|
|
3
|
+
cy.GetAcsSession()
|
|
4
|
+
cy.mockConsentAndVisit('/account')
|
|
5
|
+
})
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
it('should take the user to the beginning of the main area', () => {
|
|
8
|
+
cy.get('[data-testid="skip-to-content"]').focus().click()
|
|
9
|
+
cy.focused().should('have.id', 'main')
|
|
10
|
+
})
|
|
11
|
+
})
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import * as printSubscriptionPageProps from '../../fixtures/print-subscriptions/print-subscription-response.json'
|
|
2
|
+
|
|
1
3
|
describe('Account without user', () => {
|
|
2
4
|
beforeEach(() => {
|
|
3
5
|
cy.mockConsentAndVisit('/account')
|
|
@@ -343,46 +345,26 @@ describe('My account personal details', () => {
|
|
|
343
345
|
)
|
|
344
346
|
})
|
|
345
347
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
// cy.get('[data-testid="switch-repliedToMessage-off"]')
|
|
369
|
-
// .should('be.visible')
|
|
370
|
-
// .click({ force: true })
|
|
371
|
-
// cy.get('[data-testid="switch-repliedToMessage-on"]').should(
|
|
372
|
-
// 'have.attr',
|
|
373
|
-
// 'aria-checked',
|
|
374
|
-
// 'true'
|
|
375
|
-
// )
|
|
376
|
-
|
|
377
|
-
// // To be enabled as part of PPDSR-418
|
|
378
|
-
// // cy.get('a[href="/account/newsletters-and-alerts"]')
|
|
379
|
-
// // .should('be.visible')
|
|
380
|
-
// // .click({ force: true })
|
|
381
|
-
// // cy.get('a[href="/account/edit/commenting-notifications"]')
|
|
382
|
-
// // .should('be.visible')
|
|
383
|
-
// // .click({ force: true })
|
|
384
|
-
// // cy.get('[data-testid="switch-userMentioned-on"]').should('have.attr', 'aria-checked', 'true')
|
|
385
|
-
// // cy.get('[data-testid="switch-likedYourMessage-on"]').should('have.attr', 'aria-checked', 'true')
|
|
386
|
-
// // cy.get('[data-testid="switch-repliedToMessage-on"]').should('have.attr', 'aria-checked', 'true')
|
|
387
|
-
// })
|
|
348
|
+
it('Should show modal when postcode is outside delivery area', () => {
|
|
349
|
+
cy.visitAndOverrideNextData(
|
|
350
|
+
'/account/edit/address',
|
|
351
|
+
'props.pageProps.data.subscriptions',
|
|
352
|
+
printSubscriptionPageProps.props.pageProps.user.subscriptions
|
|
353
|
+
)
|
|
354
|
+
cy.get('input[name="line1"]').clear().type('News UK')
|
|
355
|
+
cy.get('input[name="line2"]').clear().type('1 London Bridge Street')
|
|
356
|
+
cy.get('input[name="line3"]').clear().type('Buckie')
|
|
357
|
+
cy.get('input[name="city"]').clear().type('London')
|
|
358
|
+
cy.get('input[name="county"]').clear().type('Kent')
|
|
359
|
+
cy.get('input[name="postcode"]').clear().type('SE1')
|
|
360
|
+
cy.get('[data-testid="primary-button"]').click()
|
|
361
|
+
cy.get('[data-testid="description-block"]').should('exist')
|
|
362
|
+
cy.get('[data-testid="modal-link-0"]').should('exist')
|
|
363
|
+
cy.get('[aria-label="Return to My Account"]').click({ multiple: true })
|
|
364
|
+
cy.contains(
|
|
365
|
+
'[data-testid="toast-container"]',
|
|
366
|
+
'As your new address is outside of our delivery area it has not been updated.'
|
|
367
|
+
)
|
|
368
|
+
cy.url().should('eq', 'http://localhost:3000/account')
|
|
369
|
+
})
|
|
388
370
|
})
|
|
@@ -178,6 +178,8 @@ describe('Account Subscription & Cancellation', () => {
|
|
|
178
178
|
'props.pageProps.user.paymentFailure',
|
|
179
179
|
paymentFailure
|
|
180
180
|
)
|
|
181
|
+
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
182
|
+
cy.wait(1000)
|
|
181
183
|
cy.get('a[href="/account/cancellation"]').should('be.visible').click()
|
|
182
184
|
|
|
183
185
|
cy.contains('You have outstanding payments')
|
|
@@ -34,6 +34,8 @@ describe('Upcoming Holiday Stops', () => {
|
|
|
34
34
|
})
|
|
35
35
|
|
|
36
36
|
it('should navigate to the Upcoming Holiday Stops and display the list of upcoming Holiday Stops', () => {
|
|
37
|
+
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
38
|
+
cy.wait(1000)
|
|
37
39
|
cy.get('a[href="/account/holiday-stop/upcoming-holiday-stops"]').click()
|
|
38
40
|
cy.url().should('match', /account\/holiday-stop\/upcoming-holiday-stops/)
|
|
39
41
|
})
|
|
@@ -57,9 +57,7 @@ describe('Help Hub Result Page Search bar', () => {
|
|
|
57
57
|
.click({ force: true })
|
|
58
58
|
cy.get('[data-testid="autocomplete-panel"]').should('exist')
|
|
59
59
|
cy.get('[id="autocomplete-0-item-0"]').should('be.visible').click()
|
|
60
|
-
cy.url().
|
|
61
|
-
cy.url().should('not.eq', url)
|
|
62
|
-
})
|
|
60
|
+
cy.url().should('include', '/article/')
|
|
63
61
|
})
|
|
64
62
|
|
|
65
63
|
it('Should redirect to article page on clicking the item from search bar dropdown list', () => {
|
package/cypress.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import * as printSubscriptionPageProps from '../../fixtures/print-subscriptions/print-subscription-response.json'
|
|
2
|
-
|
|
3
|
-
describe('Address outside delivery area', () => {
|
|
4
|
-
beforeEach(() => {
|
|
5
|
-
cy.GetAcsSession()
|
|
6
|
-
cy.mockConsentAndVisit('/account')
|
|
7
|
-
})
|
|
8
|
-
it('Should show modal when postcode is outside delivery area', () => {
|
|
9
|
-
cy.visitAndOverrideNextData(
|
|
10
|
-
'/account/edit/address',
|
|
11
|
-
'props.pageProps.data.subscriptions',
|
|
12
|
-
printSubscriptionPageProps.props.pageProps.user.subscriptions
|
|
13
|
-
)
|
|
14
|
-
cy.get('input[name="line1"]').clear().type('News UK')
|
|
15
|
-
cy.get('input[name="line2"]').clear().type('1 London Bridge Street')
|
|
16
|
-
cy.get('input[name="line3"]').clear().type('Buckie')
|
|
17
|
-
cy.get('input[name="city"]').clear().type('London')
|
|
18
|
-
cy.get('input[name="county"]').clear().type('Kent')
|
|
19
|
-
cy.get('input[name="postcode"]').clear().type('SE1')
|
|
20
|
-
// cy.get('[name="country"]').click()
|
|
21
|
-
// cy.get('[data-testid="United States"]').click({ multiple: true })
|
|
22
|
-
cy.get('[data-testid="primary-button"]').click()
|
|
23
|
-
cy.get('[data-testid="description-block"]').should('exist')
|
|
24
|
-
cy.get('[data-testid="modal-link-0"]').should('exist')
|
|
25
|
-
cy.get('[aria-label="Return to My Account"]').click({ multiple: true })
|
|
26
|
-
cy.contains(
|
|
27
|
-
'[data-testid="toast-container"]',
|
|
28
|
-
'As your new address is outside of our delivery area it has not been updated.'
|
|
29
|
-
)
|
|
30
|
-
cy.url().should('eq', 'http://localhost:3000/account')
|
|
31
|
-
})
|
|
32
|
-
})
|