@newskit-render/core 2.24.0 → 2.24.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.
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
|
+
# [2.24.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@2.24.0-alpha.0...@newskit-render/core@2.24.0) (2022-11-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [2.23.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@2.23.0-alpha.0...@newskit-render/core@2.23.0) (2022-11-24)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @newskit-render/core
|
|
@@ -26,9 +26,6 @@ describe('Address outside delivery area', () => {
|
|
|
26
26
|
'[data-testid="toast-container"]',
|
|
27
27
|
'As your new address is outside of our delivery area it has not been updated.'
|
|
28
28
|
)
|
|
29
|
-
cy.url().should(
|
|
30
|
-
'eq',
|
|
31
|
-
'http://localhost:3000/account/subscription-and-billing'
|
|
32
|
-
)
|
|
29
|
+
cy.url().should('eq', 'http://localhost:3000/account')
|
|
33
30
|
})
|
|
34
31
|
})
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
describe('Book a
|
|
1
|
+
describe('Book a Holiday Stop', () => {
|
|
2
2
|
beforeEach(() => {
|
|
3
3
|
cy.GetTnlAcsSession('tnl')
|
|
4
4
|
cy.mockConsentAndVisit('/account/holiday-stop')
|
|
5
5
|
})
|
|
6
6
|
|
|
7
|
-
it('should display book a
|
|
7
|
+
it('should display book a Holiday Stop page', () => {
|
|
8
8
|
cy.get('a[href="/account/subscription-and-billing"]').should('be.visible')
|
|
9
|
-
cy.contains('[data-testid="introduction-title"]', 'Book a
|
|
9
|
+
cy.contains('[data-testid="introduction-title"]', 'Book a Holiday Stop')
|
|
10
10
|
cy.contains('Add a Holiday Stop')
|
|
11
11
|
cy.get('a[href="/account/holiday-stop/upcoming-holiday-stops"]').should(
|
|
12
12
|
'exist'
|
|
@@ -14,13 +14,13 @@ describe('Book a holiday stop', () => {
|
|
|
14
14
|
})
|
|
15
15
|
})
|
|
16
16
|
|
|
17
|
-
describe('Upcoming
|
|
17
|
+
describe('Upcoming Holiday Stops', () => {
|
|
18
18
|
beforeEach(() => {
|
|
19
19
|
cy.GetTnlAcsSession('tnl')
|
|
20
20
|
cy.mockConsentAndVisit('/account/holiday-stop')
|
|
21
21
|
})
|
|
22
22
|
|
|
23
|
-
it('should navigate to the Upcoming
|
|
23
|
+
it('should navigate to the Upcoming Holiday Stops and display the list of upcoming Holiday Stops', () => {
|
|
24
24
|
cy.get('a[href="/account/holiday-stop/upcoming-holiday-stops"]').should(
|
|
25
25
|
'exist'
|
|
26
26
|
)
|
|
@@ -31,13 +31,13 @@ describe('Upcoming holiday stops', () => {
|
|
|
31
31
|
})
|
|
32
32
|
})
|
|
33
33
|
|
|
34
|
-
describe('Cancel
|
|
34
|
+
describe('Cancel Holiday Stop', () => {
|
|
35
35
|
beforeEach(() => {
|
|
36
36
|
cy.GetTnlAcsSession('tnl')
|
|
37
37
|
cy.mockConsentAndVisit('/account/holiday-stop')
|
|
38
38
|
})
|
|
39
39
|
|
|
40
|
-
it('should show popup and cancel
|
|
40
|
+
it('should show popup and cancel Holiday Stop', () => {
|
|
41
41
|
cy.intercept('POST', '/api/account/mutate', {
|
|
42
42
|
statusCode: 200,
|
|
43
43
|
body: { data: { deleteUserHolidayStop: { success: true } } },
|
|
@@ -49,22 +49,72 @@ describe('Cancel holiday stop', () => {
|
|
|
49
49
|
cy.get('[data-testid="primary-button"]').click()
|
|
50
50
|
cy.contains(
|
|
51
51
|
'[data-testid="toast-container"]',
|
|
52
|
-
'Your
|
|
52
|
+
'Your Holiday Stop was successfully cancelled'
|
|
53
53
|
)
|
|
54
54
|
})
|
|
55
55
|
})
|
|
56
56
|
|
|
57
|
+
describe('Edit button Holiday Stop', () => {
|
|
58
|
+
beforeEach(() => {
|
|
59
|
+
cy.GetTnlAcsSession('tnl')
|
|
60
|
+
cy.mockConsentAndVisit('/account/holiday-stop')
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
it('should show redirect to edit page and show corrensponding data', () => {
|
|
64
|
+
cy.intercept('POST', '/api/account/mutate', {
|
|
65
|
+
statusCode: 200,
|
|
66
|
+
body: { data: { updateUserHolidayStop: { success: true } } },
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
cy.get('[data-testid="content-list"] > ul > li')
|
|
70
|
+
.eq(1)
|
|
71
|
+
.contains('Edit')
|
|
72
|
+
.click()
|
|
73
|
+
|
|
74
|
+
cy.url().should('match', /\/account\/edit\/holiday-stop?/)
|
|
75
|
+
|
|
76
|
+
cy.get('[name="startDate"]').invoke('val').should('equal', '18/10/2023')
|
|
77
|
+
cy.get('[name="endDate"]').invoke('val').should('equal', '20/10/2023')
|
|
78
|
+
|
|
79
|
+
const dateFormatOptions = {
|
|
80
|
+
year: 'numeric',
|
|
81
|
+
month: 'numeric',
|
|
82
|
+
day: 'numeric',
|
|
83
|
+
}
|
|
84
|
+
cy.get('[id="startDate"]').should('be.visible').click({ force: true })
|
|
85
|
+
|
|
86
|
+
cy.get('input[name="startDate"]')
|
|
87
|
+
.clear()
|
|
88
|
+
.type(
|
|
89
|
+
new Date('10/18/2023').toLocaleDateString('en-GB', dateFormatOptions)
|
|
90
|
+
)
|
|
91
|
+
cy.get('input[name="endDate"]')
|
|
92
|
+
.clear()
|
|
93
|
+
.type(
|
|
94
|
+
new Date('10/20/2023').toLocaleDateString('en-GB', dateFormatOptions)
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
cy.get('body').click({ force: true })
|
|
98
|
+
cy.contains('[data-testid="primary-button"]', 'Save').click()
|
|
99
|
+
cy.contains('[data-testid="modal"]', 'Holiday Stop updated')
|
|
100
|
+
cy.contains('[data-testid="primary-button"]', 'OK').click()
|
|
101
|
+
cy.url().should('match', /account\/holiday-stop/)
|
|
102
|
+
})
|
|
103
|
+
})
|
|
104
|
+
|
|
57
105
|
describe('Add a Holiday Stop', () => {
|
|
58
106
|
beforeEach(() => {
|
|
59
107
|
cy.GetTnlAcsSession('tnl')
|
|
60
108
|
cy.mockConsentAndVisit('/account/add/holiday-stop')
|
|
61
109
|
})
|
|
62
|
-
it('should display add
|
|
110
|
+
it('should display add Holiday Stop page', () => {
|
|
63
111
|
cy.get('[data-testid="introduction-title"]').contains('Add a Holiday Stop')
|
|
64
112
|
cy.get('[data-testid="create-holiday-stop"]').should('exist')
|
|
65
113
|
cy.get('[data-testid="description-block"]').contains('Choose your dates')
|
|
114
|
+
|
|
66
115
|
cy.get('[id="startDate"]').should('exist')
|
|
67
116
|
cy.get('[id="endDate"]').should('exist')
|
|
117
|
+
|
|
68
118
|
cy.get('[data-testid="primary-button"]').should('exist')
|
|
69
119
|
cy.get('[data-testid="secondary-button"]')
|
|
70
120
|
.should('have.attr', 'href', '/account/holiday-stop')
|
|
@@ -120,7 +170,7 @@ describe('Edit Holiday Stops', () => {
|
|
|
120
170
|
]
|
|
121
171
|
)
|
|
122
172
|
})
|
|
123
|
-
it('should display edit
|
|
173
|
+
it('should display edit Holiday Stop page', () => {
|
|
124
174
|
cy.get('[data-testid="introduction-title"]').contains('Edit a Holiday Stop')
|
|
125
175
|
cy.get('[data-testid="update-holiday-stop"]').should('exist')
|
|
126
176
|
cy.get('[name="startDate"]').invoke('val').should('equal', '12/10/2022')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newskit-render/core",
|
|
3
|
-
"version": "2.24.
|
|
3
|
+
"version": "2.24.1",
|
|
4
4
|
"description": "Newskit Render - Core package",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
"@emotion/styled": "11.10.4",
|
|
41
41
|
"@newskit-render/api": "^1.4.0",
|
|
42
42
|
"@newskit-render/auth": "^1.2.0",
|
|
43
|
-
"@newskit-render/checkout": "^1.7.
|
|
43
|
+
"@newskit-render/checkout": "^1.7.1",
|
|
44
44
|
"@newskit-render/feature-flags": "^1.3.0",
|
|
45
45
|
"@newskit-render/feed": "^1.3.0",
|
|
46
|
-
"@newskit-render/my-account": "^3.19.
|
|
47
|
-
"@newskit-render/shared-components": "^1.19.
|
|
48
|
-
"@newskit-render/standalone-components": "^1.12.
|
|
46
|
+
"@newskit-render/my-account": "^3.19.1",
|
|
47
|
+
"@newskit-render/shared-components": "^1.19.1",
|
|
48
|
+
"@newskit-render/standalone-components": "^1.12.1",
|
|
49
49
|
"@newskit-render/validation": "^1.4.0",
|
|
50
50
|
"cross-fetch": "3.1.5",
|
|
51
51
|
"graphql": "15.6.0",
|