@newskit-render/core 2.28.1 → 2.28.2-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/holiday-stop.spec.js +20 -10
- package/package.json +1 -1
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.28.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@2.28.1-alpha.0...@newskit-render/core@2.28.1) (2022-12-01)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [2.28.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@2.28.0-alpha.0...@newskit-render/core@2.28.0) (2022-11-29)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @newskit-render/core
|
|
@@ -16,10 +16,15 @@ describe('Book a Holiday Stop', () => {
|
|
|
16
16
|
|
|
17
17
|
describe('Upcoming Holiday Stops', () => {
|
|
18
18
|
beforeEach(() => {
|
|
19
|
+
cy.clock(Date.UTC(2022, 10, 30), ['Date'])
|
|
19
20
|
cy.GetTnlAcsSession('tnl')
|
|
20
21
|
cy.mockConsentAndVisit('/account/holiday-stop')
|
|
21
22
|
})
|
|
22
|
-
|
|
23
|
+
afterEach(() => {
|
|
24
|
+
cy.clock().then((clock) => {
|
|
25
|
+
clock.restore()
|
|
26
|
+
})
|
|
27
|
+
})
|
|
23
28
|
it('should navigate to the Upcoming Holiday Stops and display the list of upcoming Holiday Stops', () => {
|
|
24
29
|
cy.get('a[href="/account/holiday-stop/upcoming-holiday-stops"]').should(
|
|
25
30
|
'exist'
|
|
@@ -33,19 +38,22 @@ describe('Upcoming Holiday Stops', () => {
|
|
|
33
38
|
|
|
34
39
|
describe('Cancel Holiday Stop', () => {
|
|
35
40
|
beforeEach(() => {
|
|
41
|
+
cy.clock(Date.UTC(2022, 10, 30), ['Date'])
|
|
36
42
|
cy.GetTnlAcsSession('tnl')
|
|
37
43
|
cy.mockConsentAndVisit('/account/holiday-stop')
|
|
38
44
|
})
|
|
39
|
-
|
|
45
|
+
afterEach(() => {
|
|
46
|
+
cy.clock().then((clock) => {
|
|
47
|
+
clock.restore()
|
|
48
|
+
})
|
|
49
|
+
})
|
|
40
50
|
it('should show popup and cancel Holiday Stop', () => {
|
|
41
51
|
cy.intercept('POST', '/api/account/mutate', {
|
|
42
52
|
statusCode: 200,
|
|
43
53
|
body: { data: { deleteUserHolidayStop: { success: true } } },
|
|
44
54
|
})
|
|
45
55
|
cy.get('[data-testid="content-list"] > ul > li')
|
|
46
|
-
|
|
47
|
-
.contains('Cancel')
|
|
48
|
-
.click()
|
|
56
|
+
cy.contains('02/12/22').parents('li').contains('Cancel').click()
|
|
49
57
|
cy.get('[data-testid="primary-button"]').click()
|
|
50
58
|
cy.contains(
|
|
51
59
|
'[data-testid="toast-container"]',
|
|
@@ -56,10 +64,15 @@ describe('Cancel Holiday Stop', () => {
|
|
|
56
64
|
|
|
57
65
|
describe('Edit button Holiday Stop', () => {
|
|
58
66
|
beforeEach(() => {
|
|
67
|
+
cy.clock(Date.UTC(2022, 10, 30), ['Date'])
|
|
59
68
|
cy.GetTnlAcsSession('tnl')
|
|
60
69
|
cy.mockConsentAndVisit('/account/holiday-stop')
|
|
61
70
|
})
|
|
62
|
-
|
|
71
|
+
afterEach(() => {
|
|
72
|
+
cy.clock().then((clock) => {
|
|
73
|
+
clock.restore()
|
|
74
|
+
})
|
|
75
|
+
})
|
|
63
76
|
it('should show redirect to edit page and show corrensponding data', () => {
|
|
64
77
|
cy.intercept('POST', '/api/account/mutate', {
|
|
65
78
|
statusCode: 200,
|
|
@@ -67,10 +80,7 @@ describe('Edit button Holiday Stop', () => {
|
|
|
67
80
|
})
|
|
68
81
|
|
|
69
82
|
cy.get('[data-testid="content-list"] > ul > li')
|
|
70
|
-
|
|
71
|
-
.contains('Edit')
|
|
72
|
-
.click()
|
|
73
|
-
|
|
83
|
+
cy.contains('02/12/22').parents('li').contains('Edit').click()
|
|
74
84
|
cy.url().should('match', /\/account\/edit\/holiday-stop?/)
|
|
75
85
|
|
|
76
86
|
cy.get('[name="startDate"]').invoke('val').should('equal', '02/12/2022')
|