@newskit-render/core 1.24.1 → 1.27.8
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 +103 -0
- package/__tests__/pages/__snapshots__/home.test.tsx.snap +9 -1
- package/__tests__/pages/home.test.tsx +4 -0
- package/components/article/__tests__/__snapshots__/index.test.tsx.snap +14 -1
- package/components/article/__tests__/index.test.tsx +4 -0
- package/components/footer/__snapshots__/index.test.tsx.snap +1 -1
- package/components/footer/index.test.tsx +4 -0
- package/components/footer/index.tsx +93 -65
- package/components/header/index.tsx +1 -1
- package/components/section/layouts/__tests__/__snapshots__/SectionRow.test.tsx.snap +16 -0
- package/cypress/e2e/account/account-page.spec.js +28 -19
- package/cypress/e2e/account/payment-page.spec.js +29 -29
- package/helpers/getYear.ts +1 -0
- package/package.json +10 -10
- package/theme/render-custom-theme.ts +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,109 @@
|
|
|
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.27.8](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.27.7...@newskit-render/core@1.27.8) (2022-02-25)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.27.7](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.27.6...@newskit-render/core@1.27.7) (2022-02-25)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [1.27.6](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.27.5...@newskit-render/core@1.27.6) (2022-02-24)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [1.27.5](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.27.4...@newskit-render/core@1.27.5) (2022-02-23)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
|
|
35
|
+
* **PPDSR-690:** update version to fix pipeline ([#605](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/605)) ([16ae9b5](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/16ae9b57c726899d3138e3112fb36571a6b01e77))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## [1.27.4](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.27.3...@newskit-render/core@1.27.4) (2022-02-23)
|
|
42
|
+
|
|
43
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## [1.27.3](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.27.2...@newskit-render/core@1.27.3) (2022-02-21)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
### Bug Fixes
|
|
53
|
+
|
|
54
|
+
* **PPDSR-674:** Footer menu not horizontal on large screens ([#596](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/596)) ([904927d](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/904927d938227514b18cc35a2535b9eed349a61f))
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
## [1.27.2](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.27.1...@newskit-render/core@1.27.2) (2022-02-18)
|
|
61
|
+
|
|
62
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
## [1.27.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.27.0...@newskit-render/core@1.27.1) (2022-02-18)
|
|
69
|
+
|
|
70
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
# [1.27.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.26.0...@newskit-render/core@1.27.0) (2022-02-17)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
### Features
|
|
80
|
+
|
|
81
|
+
* **PPDSR-682:** update Newskit version ([#599](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/599)) ([663ffbe](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/663ffbee434638e824064c518258c6c81bba7b7f))
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
# [1.26.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.25.0...@newskit-render/core@1.26.0) (2022-02-16)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
### Features
|
|
91
|
+
|
|
92
|
+
* **PPDSR-635:** My account- Split context ([#585](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/585)) ([59d0378](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/59d0378ab2f8d9949081ae9f84862b446d63ffa6))
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
# [1.25.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.24.1...@newskit-render/core@1.25.0) (2022-02-15)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
### Features
|
|
102
|
+
|
|
103
|
+
* **PPDSR-661:** Update Themes for main site areas ([#595](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/595)) ([160c7c7](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/160c7c71ff2fa317dc59eeaa22a43134aba7f58e))
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
6
109
|
## [1.24.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.24.0...@newskit-render/core@1.24.1) (2022-02-15)
|
|
7
110
|
|
|
8
111
|
**Note:** Version bump only for package @newskit-render/core
|
|
@@ -377,6 +377,8 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
377
377
|
display: inline-block;
|
|
378
378
|
vertical-align: middle;
|
|
379
379
|
overflow: hidden;
|
|
380
|
+
color: #FFFFFF;
|
|
381
|
+
fill: #FFFFFF;
|
|
380
382
|
vertical-align: unset;
|
|
381
383
|
display: inline-block;
|
|
382
384
|
}
|
|
@@ -384,6 +386,8 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
384
386
|
.emotion-28.emotion-28 {
|
|
385
387
|
width: 32px;
|
|
386
388
|
height: 32px;
|
|
389
|
+
color: #FFFFFF;
|
|
390
|
+
fill: #FFFFFF;
|
|
387
391
|
}
|
|
388
392
|
|
|
389
393
|
<div
|
|
@@ -1233,6 +1237,10 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
1233
1237
|
|
|
1234
1238
|
.emotion-44 {
|
|
1235
1239
|
margin-right: 16px;
|
|
1240
|
+
-webkit-box-flex: 1;
|
|
1241
|
+
-webkit-flex-grow: 1;
|
|
1242
|
+
-ms-flex-positive: 1;
|
|
1243
|
+
flex-grow: 1;
|
|
1236
1244
|
}
|
|
1237
1245
|
|
|
1238
1246
|
@media screen and (max-width: 767px) {
|
|
@@ -3203,7 +3211,7 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
3203
3211
|
<p
|
|
3204
3212
|
class="emotion-35"
|
|
3205
3213
|
>
|
|
3206
|
-
Copyright ©
|
|
3214
|
+
Copyright © YYYY News Corp. All rights reserved.
|
|
3207
3215
|
</p>
|
|
3208
3216
|
</div>
|
|
3209
3217
|
</div>
|
|
@@ -3,6 +3,10 @@ import SectionPage from '../../components/section'
|
|
|
3
3
|
import { renderWithTheme } from '../../helpers/test-utils'
|
|
4
4
|
import { getPageMock } from '../../helpers/mocks'
|
|
5
5
|
|
|
6
|
+
jest.mock('../../helpers/getYear', () => ({
|
|
7
|
+
getYear: jest.fn().mockReturnValue('YYYY'),
|
|
8
|
+
}))
|
|
9
|
+
|
|
6
10
|
jest.mock('@newskit-render/api', () => ({
|
|
7
11
|
ClientTypes: { nkapi: 'nkapi' },
|
|
8
12
|
createApolloClient: jest.fn().mockImplementation(() => {
|
|
@@ -377,6 +377,8 @@ exports[`Article should render tile and sub title 1`] = `
|
|
|
377
377
|
display: inline-block;
|
|
378
378
|
vertical-align: middle;
|
|
379
379
|
overflow: hidden;
|
|
380
|
+
color: #FFFFFF;
|
|
381
|
+
fill: #FFFFFF;
|
|
380
382
|
vertical-align: unset;
|
|
381
383
|
display: inline-block;
|
|
382
384
|
}
|
|
@@ -384,6 +386,8 @@ exports[`Article should render tile and sub title 1`] = `
|
|
|
384
386
|
.emotion-28.emotion-28 {
|
|
385
387
|
width: 32px;
|
|
386
388
|
height: 32px;
|
|
389
|
+
color: #FFFFFF;
|
|
390
|
+
fill: #FFFFFF;
|
|
387
391
|
}
|
|
388
392
|
|
|
389
393
|
<div
|
|
@@ -1118,6 +1122,11 @@ exports[`Article should render tile and sub title 1`] = `
|
|
|
1118
1122
|
display: block;
|
|
1119
1123
|
}
|
|
1120
1124
|
|
|
1125
|
+
.emotion-28:before,
|
|
1126
|
+
.emotion-28:after {
|
|
1127
|
+
white-space: normal;
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1121
1130
|
.emotion-30 {
|
|
1122
1131
|
border-style: solid;
|
|
1123
1132
|
border-color: #DEDEDE;
|
|
@@ -2084,6 +2093,10 @@ exports[`Article should render tile and sub title 1`] = `
|
|
|
2084
2093
|
|
|
2085
2094
|
.emotion-143 {
|
|
2086
2095
|
margin-right: 16px;
|
|
2096
|
+
-webkit-box-flex: 1;
|
|
2097
|
+
-webkit-flex-grow: 1;
|
|
2098
|
+
-ms-flex-positive: 1;
|
|
2099
|
+
flex-grow: 1;
|
|
2087
2100
|
}
|
|
2088
2101
|
|
|
2089
2102
|
@media screen {
|
|
@@ -4534,7 +4547,7 @@ exports[`Article should render tile and sub title 1`] = `
|
|
|
4534
4547
|
<p
|
|
4535
4548
|
class="emotion-35"
|
|
4536
4549
|
>
|
|
4537
|
-
Copyright ©
|
|
4550
|
+
Copyright © YYYY News Corp. All rights reserved.
|
|
4538
4551
|
</p>
|
|
4539
4552
|
</div>
|
|
4540
4553
|
</div>
|
|
@@ -98,6 +98,10 @@ jest.mock('@newskit-render/my-account', () => {
|
|
|
98
98
|
}
|
|
99
99
|
})
|
|
100
100
|
|
|
101
|
+
jest.mock('../../../helpers/getYear', () => ({
|
|
102
|
+
getYear: jest.fn().mockReturnValue('YYYY'),
|
|
103
|
+
}))
|
|
104
|
+
|
|
101
105
|
describe('Article', () => {
|
|
102
106
|
test('should render tile and sub title', () => {
|
|
103
107
|
const { getByTestId, asFragment } = renderWithTheme(Article, articleData)
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { renderWithTheme } from '../../helpers/test-utils'
|
|
2
2
|
import Footer from '.'
|
|
3
3
|
|
|
4
|
+
jest.mock('../../helpers/getYear', () => ({
|
|
5
|
+
getYear: jest.fn().mockReturnValue('YYYY'),
|
|
6
|
+
}))
|
|
7
|
+
|
|
4
8
|
describe('Footer tests', () => {
|
|
5
9
|
test('should render footer', () => {
|
|
6
10
|
const { asFragment } = renderWithTheme(Footer)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react'
|
|
1
|
+
import React, { useContext } from 'react'
|
|
2
2
|
import {
|
|
3
3
|
styled,
|
|
4
4
|
getColorCssFromTheme,
|
|
@@ -8,13 +8,16 @@ import {
|
|
|
8
8
|
Paragraph,
|
|
9
9
|
Divider,
|
|
10
10
|
Block,
|
|
11
|
+
Image,
|
|
11
12
|
} from 'newskit'
|
|
12
13
|
import { MainGrid } from '../layout/MainGrid'
|
|
13
14
|
import NewsKitLogoShort from '../common/NewskitLogoShort'
|
|
14
15
|
import NavLink from '../common/NavLink'
|
|
16
|
+
import { AppContext } from '../../app-context/AppContext'
|
|
17
|
+
import { getYear } from '../../helpers/getYear'
|
|
15
18
|
|
|
16
19
|
const StyledFooter = styled.div`
|
|
17
|
-
${getColorCssFromTheme('backgroundColor', '
|
|
20
|
+
${getColorCssFromTheme('backgroundColor', 'neutral100')};
|
|
18
21
|
width: 100%;
|
|
19
22
|
bottom: 0;
|
|
20
23
|
display: block;
|
|
@@ -34,6 +37,18 @@ const Navigation = styled.div`
|
|
|
34
37
|
}
|
|
35
38
|
`
|
|
36
39
|
|
|
40
|
+
const clientNavigationLogos = {
|
|
41
|
+
'The-Sun': { src: 'navigationPrimary-brandMark-sun.svg', width: 'initial' },
|
|
42
|
+
'Virgin-Radio': {
|
|
43
|
+
src: 'navigationPrimary-brandMark-vr.svg',
|
|
44
|
+
width: 'initial',
|
|
45
|
+
},
|
|
46
|
+
'The-Times': {
|
|
47
|
+
src: 'navigationPrimary-brandMark-times.svg',
|
|
48
|
+
width: 'initial',
|
|
49
|
+
},
|
|
50
|
+
}
|
|
51
|
+
|
|
37
52
|
const NavButton = ({
|
|
38
53
|
buttonText,
|
|
39
54
|
href,
|
|
@@ -56,70 +71,83 @@ const NavButton = ({
|
|
|
56
71
|
</Block>
|
|
57
72
|
)
|
|
58
73
|
|
|
59
|
-
const Footer = () =>
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
74
|
+
const Footer = () => {
|
|
75
|
+
const { theme } = useContext(AppContext)
|
|
76
|
+
return (
|
|
77
|
+
<StyledFooter>
|
|
78
|
+
<MainGrid>
|
|
79
|
+
<Cell xs={12}>
|
|
80
|
+
<Block spaceStack="space030">
|
|
81
|
+
{!clientNavigationLogos[theme.name] ? (
|
|
82
|
+
<NewsKitLogoShort color="white" size="sizing120" />
|
|
83
|
+
) : (
|
|
84
|
+
<Image
|
|
85
|
+
alt=""
|
|
86
|
+
src={`/MyAccount/${clientNavigationLogos[theme.name].src}`}
|
|
87
|
+
overrides={{
|
|
88
|
+
width: clientNavigationLogos[theme.name].width,
|
|
89
|
+
}}
|
|
90
|
+
/>
|
|
91
|
+
)}
|
|
92
|
+
</Block>
|
|
93
|
+
<Block spaceStack="space030">
|
|
94
|
+
<Divider
|
|
95
|
+
overrides={{
|
|
96
|
+
stylePreset: 'dividerFooterHorizontal',
|
|
97
|
+
}}
|
|
98
|
+
/>
|
|
99
|
+
</Block>
|
|
100
|
+
<Navigation>
|
|
101
|
+
<NavButton
|
|
102
|
+
buttonText="NavLink One"
|
|
103
|
+
href="/link-one"
|
|
104
|
+
ariaLabel="NavLink One"
|
|
105
|
+
/>
|
|
106
|
+
<NavButton
|
|
107
|
+
buttonText="NavLink Two"
|
|
108
|
+
href="/link-two"
|
|
109
|
+
ariaLabel="NavLink Two"
|
|
110
|
+
/>
|
|
111
|
+
<NavButton
|
|
112
|
+
buttonText="NavLink Three"
|
|
113
|
+
href="/link-three"
|
|
114
|
+
ariaLabel="NavLink Three"
|
|
115
|
+
/>
|
|
116
|
+
<NavButton
|
|
117
|
+
buttonText="NavLink Four"
|
|
118
|
+
href="/link-four"
|
|
119
|
+
ariaLabel="NavLink Four"
|
|
120
|
+
/>
|
|
121
|
+
<NavButton
|
|
122
|
+
buttonText="NavLink Five"
|
|
123
|
+
href="/link-five"
|
|
124
|
+
ariaLabel="NavLink Five"
|
|
125
|
+
/>
|
|
126
|
+
<NavButton
|
|
127
|
+
buttonText="NavLink Six"
|
|
128
|
+
href="/link-six"
|
|
129
|
+
ariaLabel="NavLink Six"
|
|
130
|
+
/>
|
|
131
|
+
</Navigation>
|
|
132
|
+
<Block spaceStack="space030">
|
|
133
|
+
<Divider
|
|
134
|
+
overrides={{
|
|
135
|
+
stylePreset: 'dividerFooterHorizontal',
|
|
136
|
+
}}
|
|
137
|
+
/>
|
|
138
|
+
</Block>
|
|
139
|
+
<Paragraph
|
|
107
140
|
overrides={{
|
|
108
|
-
|
|
141
|
+
typographyPreset: 'utilityMeta020',
|
|
142
|
+
stylePreset: 'inkSubtle',
|
|
109
143
|
}}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
Copyright © 2020 News Corp. All rights reserved.
|
|
119
|
-
</Paragraph>
|
|
120
|
-
</Cell>
|
|
121
|
-
</MainGrid>
|
|
122
|
-
</StyledFooter>
|
|
123
|
-
)
|
|
144
|
+
>
|
|
145
|
+
{`Copyright © ${getYear()} News Corp. All rights reserved.`}
|
|
146
|
+
</Paragraph>
|
|
147
|
+
</Cell>
|
|
148
|
+
</MainGrid>
|
|
149
|
+
</StyledFooter>
|
|
150
|
+
)
|
|
151
|
+
}
|
|
124
152
|
|
|
125
153
|
export default Footer
|
|
@@ -251,7 +251,7 @@ const Header: React.FC<{ user: UserData }> = ({ user }) => {
|
|
|
251
251
|
<IconFilledMenu
|
|
252
252
|
overrides={{
|
|
253
253
|
size: 'iconSize030',
|
|
254
|
-
stylePreset: '
|
|
254
|
+
stylePreset: 'inkInverse',
|
|
255
255
|
}}
|
|
256
256
|
onClick={mobileMenuControl}
|
|
257
257
|
onKeyDown={handleEnterKeyPress(mobileMenuControl)}
|
|
@@ -44,6 +44,10 @@ exports[`SectionRow SectionRow alternative titlebar 1`] = `
|
|
|
44
44
|
|
|
45
45
|
.emotion-3 {
|
|
46
46
|
margin-right: 16px;
|
|
47
|
+
-webkit-box-flex: 1;
|
|
48
|
+
-webkit-flex-grow: 1;
|
|
49
|
+
-ms-flex-positive: 1;
|
|
50
|
+
flex-grow: 1;
|
|
47
51
|
}
|
|
48
52
|
|
|
49
53
|
@media screen and (max-width: 767px) {
|
|
@@ -988,6 +992,10 @@ exports[`SectionRow SectionRow isDarkBackground 1`] = `
|
|
|
988
992
|
|
|
989
993
|
.emotion-3 {
|
|
990
994
|
margin-right: 16px;
|
|
995
|
+
-webkit-box-flex: 1;
|
|
996
|
+
-webkit-flex-grow: 1;
|
|
997
|
+
-ms-flex-positive: 1;
|
|
998
|
+
flex-grow: 1;
|
|
991
999
|
}
|
|
992
1000
|
|
|
993
1001
|
@media screen and (max-width: 767px) {
|
|
@@ -1932,6 +1940,10 @@ exports[`SectionRow SectionRow with title 1`] = `
|
|
|
1932
1940
|
|
|
1933
1941
|
.emotion-3 {
|
|
1934
1942
|
margin-right: 16px;
|
|
1943
|
+
-webkit-box-flex: 1;
|
|
1944
|
+
-webkit-flex-grow: 1;
|
|
1945
|
+
-ms-flex-positive: 1;
|
|
1946
|
+
flex-grow: 1;
|
|
1935
1947
|
}
|
|
1936
1948
|
|
|
1937
1949
|
@media screen and (max-width: 767px) {
|
|
@@ -2892,6 +2904,10 @@ exports[`SectionRow SectionRow without extra space 1`] = `
|
|
|
2892
2904
|
|
|
2893
2905
|
.emotion-5 {
|
|
2894
2906
|
margin-right: 16px;
|
|
2907
|
+
-webkit-box-flex: 1;
|
|
2908
|
+
-webkit-flex-grow: 1;
|
|
2909
|
+
-ms-flex-positive: 1;
|
|
2910
|
+
flex-grow: 1;
|
|
2895
2911
|
}
|
|
2896
2912
|
|
|
2897
2913
|
@media screen and (max-width: 767px) {
|
|
@@ -160,29 +160,38 @@ describe('My account personal details', () => {
|
|
|
160
160
|
// )
|
|
161
161
|
// })
|
|
162
162
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
163
|
+
it('Should go to edit page and change password', () => {
|
|
164
|
+
cy.get('a[href="/account/edit/password"]')
|
|
165
|
+
.should('be.visible')
|
|
166
|
+
.click({ force: true })
|
|
167
167
|
|
|
168
|
-
|
|
169
|
-
|
|
168
|
+
cy.get('[data-testid="primary-button"]').should('have.text', 'Send link')
|
|
169
|
+
cy.get('[data-testid="primary-button"]').scrollIntoView().click()
|
|
170
170
|
|
|
171
|
-
|
|
171
|
+
cy.get('[data-testid="primary-button"]').should('not.exist')
|
|
172
|
+
cy.get('a[href="/account/edit/password"]')
|
|
173
|
+
.should('be.visible')
|
|
174
|
+
.click({ force: true })
|
|
175
|
+
cy.get('[data-testid="inline-message"]')
|
|
176
|
+
.children()
|
|
177
|
+
.should(
|
|
178
|
+
'contain',
|
|
179
|
+
'Email sent to temp.account@tempaccount.com with a password reset link. If you haven’t received it in a couple of minutes, you may request a new link by clicking on the button below.'
|
|
180
|
+
)
|
|
181
|
+
})
|
|
172
182
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
183
|
+
it('Should show success toast', () => {
|
|
184
|
+
cy.get('a[href="/account/edit/password"]')
|
|
185
|
+
.should('be.visible')
|
|
186
|
+
.click({ force: true })
|
|
176
187
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
// )
|
|
185
|
-
// })
|
|
188
|
+
cy.get('[data-testid="primary-button"]').should('have.text', 'Send link')
|
|
189
|
+
cy.get('[data-testid="primary-button"]').scrollIntoView().click()
|
|
190
|
+
cy.contains(
|
|
191
|
+
'[data-testid="toast-container"]',
|
|
192
|
+
'Email sent with a password reset link'
|
|
193
|
+
)
|
|
194
|
+
})
|
|
186
195
|
|
|
187
196
|
it('Should go to edit page and change landline', () => {
|
|
188
197
|
cy.get('a[href="/account/edit/landline"]')
|
|
@@ -7,36 +7,36 @@ describe('My account Payment page', () => {
|
|
|
7
7
|
cy.get('iframe').should('exist')
|
|
8
8
|
})
|
|
9
9
|
|
|
10
|
-
it('should successully send the form', () => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
// it('should successully send the form', () => {
|
|
11
|
+
// if (Cypress.config('chromeWebSecurity')) {
|
|
12
|
+
// throw new Error(
|
|
13
|
+
// 'To get Zuora element `chromeWebSecurity` must be disabled'
|
|
14
|
+
// )
|
|
15
|
+
// }
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
// cy.get('iframe').should('exist')
|
|
18
|
+
// cy.getZuoraElement('input[name="field_creditCardHolderName"]').type(
|
|
19
|
+
// 'Gabriel Dimitrov'
|
|
20
|
+
// )
|
|
21
|
+
// cy.getZuoraElement('input[name="field_creditCardNumber"]').type(
|
|
22
|
+
// '4111 1111 1111 1111'
|
|
23
|
+
// )
|
|
24
|
+
// cy.getZuoraElement('input[name="field_cardSecurityCode"]').type('123')
|
|
25
|
+
// cy.getZuoraElement('input[name="field_creditCardPostalCode"]').type(
|
|
26
|
+
// 'E11 9HB'
|
|
27
|
+
// )
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
// cy.getZuoraElement('select[name="field_creditCardExpirationMonth"]').select(
|
|
30
|
+
// '11'
|
|
31
|
+
// )
|
|
32
|
+
// cy.getZuoraElement('select[name="field_creditCardExpirationYear"]').select(
|
|
33
|
+
// '2026'
|
|
34
|
+
// )
|
|
35
|
+
// cy.getZuoraElement('#submitButton').click()
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
})
|
|
37
|
+
// cy.contains(
|
|
38
|
+
// '[data-testid="toast-container"]',
|
|
39
|
+
// 'Your payment method has been updated'
|
|
40
|
+
// )
|
|
41
|
+
// })
|
|
42
42
|
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const getYear = () => new Date().getFullYear()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newskit-render/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.27.8",
|
|
4
4
|
"description": "Newskit Render - Core package",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -33,18 +33,18 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@apollo/client": "3.4.16",
|
|
36
|
-
"@newskit-render/api": "^0.14.
|
|
37
|
-
"@newskit-render/auth": "^0.28.
|
|
38
|
-
"@newskit-render/checkout": "^0.
|
|
39
|
-
"@newskit-render/feature-flags": "^0.10.
|
|
40
|
-
"@newskit-render/my-account": "^0.
|
|
41
|
-
"@newskit-render/shared-components": "^0.
|
|
42
|
-
"@newskit-render/sitemap": "^0.
|
|
43
|
-
"@newskit-render/validation": "^0.34.
|
|
36
|
+
"@newskit-render/api": "^0.14.2",
|
|
37
|
+
"@newskit-render/auth": "^0.28.2",
|
|
38
|
+
"@newskit-render/checkout": "^0.23.4",
|
|
39
|
+
"@newskit-render/feature-flags": "^0.10.2",
|
|
40
|
+
"@newskit-render/my-account": "^0.140.2",
|
|
41
|
+
"@newskit-render/shared-components": "^0.36.1",
|
|
42
|
+
"@newskit-render/sitemap": "^0.34.2",
|
|
43
|
+
"@newskit-render/validation": "^0.34.3",
|
|
44
44
|
"cross-fetch": "3.1.5",
|
|
45
45
|
"graphql": "15.6.0",
|
|
46
46
|
"newrelic": "7.1.0",
|
|
47
|
-
"newskit": "5.
|
|
47
|
+
"newskit": "5.1.1",
|
|
48
48
|
"next": "12.0.10",
|
|
49
49
|
"react": "17.0.2",
|
|
50
50
|
"react-dom": "17.0.2",
|
|
@@ -54,6 +54,13 @@ export const renderCustomDarkTheme = createTheme({
|
|
|
54
54
|
overrides: {
|
|
55
55
|
colors,
|
|
56
56
|
stylePresets: {
|
|
57
|
+
dividerFooterHorizontal: {
|
|
58
|
+
base: {
|
|
59
|
+
borderStyle: 'solid',
|
|
60
|
+
borderColor: '{{colors.interfaceNeutral010}}',
|
|
61
|
+
borderWidth: '{{borders.borderWidthDefault}}',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
57
64
|
cardContainer: {
|
|
58
65
|
base: {
|
|
59
66
|
backgroundColor: '{{colors.transparent}}',
|