@newskit-render/core 1.33.1 → 1.42.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 +150 -0
- package/__tests__/pages/__snapshots__/home.test.tsx.snap +42 -45
- package/app-context/AppContext.test.tsx +0 -12
- package/components/{404/404.tsx → ErrorPage/ErrorPage.tsx} +10 -6
- package/components/article/__tests__/index.test.tsx +2 -2
- package/components/article/index.tsx +5 -3
- package/components/header/index.tsx +8 -4
- package/components/section/ArticleSlice.tsx +1 -1
- package/components/section/__tests__/ArticleSlice.test.tsx +12 -11
- package/components/section/__tests__/CollectionBlock.test.tsx +1 -1
- package/components/section/__tests__/sectionUtils.test.ts +12 -9
- package/components/section/layouts/__tests__/Lead.test.tsx +2 -1
- package/components/section/layouts/__tests__/SectionRow.test.tsx +6 -5
- package/components/section/layouts/__tests__/__snapshots__/Lead.test.tsx.snap +2 -2
- package/components/section/layouts/__tests__/__snapshots__/SectionRow.test.tsx.snap +143 -58
- package/components/section/sectionUtils.ts +6 -6
- package/cypress/e2e/account/account-subscription.spec.js +222 -0
- package/cypress/e2e/account/payment-failer.spec.js +137 -0
- package/cypress/support/commands.js +28 -3
- package/helpers/global-types.ts +2 -2
- package/helpers/mocks/getPageMock.ts +59 -35
- package/infrastructure/.circleci/config.yml +2 -2
- package/package.json +11 -11
- package/pages/[section]/index.tsx +18 -7
- package/pages/_error.tsx +18 -2
- package/public/MyAccount/pending-activation.svg +16 -0
- package/queries/getPage.ts +1 -1
- package/temp/header.tsx +8 -4
- package/app-context/__snapshots__/AppContext.test.tsx.snap +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,156 @@
|
|
|
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.42.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.42.0...@newskit-render/core@1.42.1) (2022-03-25)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [1.42.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.41.1...@newskit-render/core@1.42.0) (2022-03-24)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **PPDSR-688:** update mock server data ([#649](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/649)) ([afe1b28](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/afe1b28adbf0184426e2eeb372aaf73bb1f37e02))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [1.41.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.41.0...@newskit-render/core@1.41.1) (2022-03-24)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# [1.41.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.40.0...@newskit-render/core@1.41.0) (2022-03-23)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Features
|
|
37
|
+
|
|
38
|
+
* **PPDSR-709:** Remove problematic snapshot tests ([#641](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/641)) ([2bd723a](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/2bd723a4e470904807e97820d923d6523cd4a953))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
# [1.40.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.39.0...@newskit-render/core@1.40.0) (2022-03-22)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### Features
|
|
48
|
+
|
|
49
|
+
* **PPDSR-728:** handle terminated subscriptions ([#644](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/644)) ([51a29dd](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/51a29dd0dc192c5c11e5d9dc92e22bb3b9723f73))
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
# [1.39.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.38.0...@newskit-render/core@1.39.0) (2022-03-22)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### Features
|
|
59
|
+
|
|
60
|
+
* **PPDSR-742:** Update cancel/past due banners ([#639](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/639)) ([2e16cf1](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/2e16cf16723d5e63bd73358a69c5bcc62fef3c2b))
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
# [1.38.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.37.0...@newskit-render/core@1.38.0) (2022-03-22)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### Features
|
|
70
|
+
|
|
71
|
+
* **PPDSR-711:** 500 error page ([#637](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/637)) ([e64a478](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/e64a478104dd3873db3f27ced1ba57e1eb8fa441))
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
# [1.37.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.36.1...@newskit-render/core@1.37.0) (2022-03-21)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
### Features
|
|
81
|
+
|
|
82
|
+
* **PPDSR-708:** add payment failer e2e tests ([#640](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/640)) ([6b87055](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/6b87055f2c6748d9cc44e2130bd5aebf309d2428))
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
## [1.36.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.36.0...@newskit-render/core@1.36.1) (2022-03-21)
|
|
89
|
+
|
|
90
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
# [1.36.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.35.0...@newskit-render/core@1.36.0) (2022-03-18)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
### Features
|
|
100
|
+
|
|
101
|
+
* **PPDSR-687:** update mock ([#632](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/632)) ([7a3d950](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/7a3d950f76c6faa7985192d1d04dfb8a92c8b23e))
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
# [1.35.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.34.1...@newskit-render/core@1.35.0) (2022-03-17)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
### Features
|
|
111
|
+
|
|
112
|
+
* **PPDSR-482:** Subscription / Cancellation E2E tests ([#634](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/634)) ([92e2867](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/92e2867f6f03277389896bcd877bd26e88cc7094))
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
## [1.34.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.34.0...@newskit-render/core@1.34.1) (2022-03-17)
|
|
119
|
+
|
|
120
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
# [1.34.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.33.3...@newskit-render/core@1.34.0) (2022-03-16)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
### Features
|
|
130
|
+
|
|
131
|
+
* **PPDSR-702:** update-next-version ([#629](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/629)) ([74dccae](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/74dccaec9102dd334fdae91e2138a08d10148195))
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
## [1.33.3](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.33.2...@newskit-render/core@1.33.3) (2022-03-15)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
### Bug Fixes
|
|
141
|
+
|
|
142
|
+
* **PPDSR-719:** update subscription query property ([#631](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/631)) ([09bb279](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/09bb279cbcf4078c21a01457fd02716ce9e6c6bf))
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
## [1.33.2](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.33.1...@newskit-render/core@1.33.2) (2022-03-14)
|
|
149
|
+
|
|
150
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
6
156
|
## [1.33.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.33.0...@newskit-render/core@1.33.1) (2022-03-14)
|
|
7
157
|
|
|
8
158
|
**Note:** Version bump only for package @newskit-render/core
|
|
@@ -1664,7 +1664,7 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
1664
1664
|
}
|
|
1665
1665
|
}
|
|
1666
1666
|
|
|
1667
|
-
.emotion-
|
|
1667
|
+
.emotion-109 {
|
|
1668
1668
|
border-style: solid;
|
|
1669
1669
|
border-color: #DEDEDE;
|
|
1670
1670
|
border-width: 1px;
|
|
@@ -1676,7 +1676,7 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
1676
1676
|
border-color: transparent;
|
|
1677
1677
|
}
|
|
1678
1678
|
|
|
1679
|
-
.emotion-
|
|
1679
|
+
.emotion-111 {
|
|
1680
1680
|
display: inline-block;
|
|
1681
1681
|
transition-property: color;
|
|
1682
1682
|
transition-duration: 200ms;
|
|
@@ -1686,31 +1686,31 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
1686
1686
|
text-decoration: none;
|
|
1687
1687
|
}
|
|
1688
1688
|
|
|
1689
|
-
.emotion-
|
|
1689
|
+
.emotion-111 svg {
|
|
1690
1690
|
fill: #3358CC;
|
|
1691
1691
|
}
|
|
1692
1692
|
|
|
1693
|
-
.emotion-
|
|
1693
|
+
.emotion-111:hover:not(:disabled) {
|
|
1694
1694
|
color: #2B4AAB;
|
|
1695
1695
|
-webkit-text-decoration: underline;
|
|
1696
1696
|
text-decoration: underline;
|
|
1697
1697
|
}
|
|
1698
1698
|
|
|
1699
|
-
.emotion-
|
|
1699
|
+
.emotion-111:hover:not(:disabled) svg {
|
|
1700
1700
|
fill: #2B4AAB;
|
|
1701
1701
|
}
|
|
1702
1702
|
|
|
1703
|
-
.emotion-
|
|
1703
|
+
.emotion-111:active:not(:disabled) {
|
|
1704
1704
|
color: #213A82;
|
|
1705
1705
|
-webkit-text-decoration: underline;
|
|
1706
1706
|
text-decoration: underline;
|
|
1707
1707
|
}
|
|
1708
1708
|
|
|
1709
|
-
.emotion-
|
|
1709
|
+
.emotion-111:active:not(:disabled) svg {
|
|
1710
1710
|
fill: #213A82;
|
|
1711
1711
|
}
|
|
1712
1712
|
|
|
1713
|
-
.emotion-
|
|
1713
|
+
.emotion-112 {
|
|
1714
1714
|
display: -webkit-box;
|
|
1715
1715
|
display: -webkit-flex;
|
|
1716
1716
|
display: -ms-flexbox;
|
|
@@ -1729,7 +1729,7 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
1729
1729
|
justify-content: flex-start;
|
|
1730
1730
|
}
|
|
1731
1731
|
|
|
1732
|
-
.emotion-
|
|
1732
|
+
.emotion-133 {
|
|
1733
1733
|
position: relative;
|
|
1734
1734
|
width: 100%;
|
|
1735
1735
|
display: block;
|
|
@@ -1740,11 +1740,11 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
1740
1740
|
background-color: #F4F4F4;
|
|
1741
1741
|
}
|
|
1742
1742
|
|
|
1743
|
-
.emotion-
|
|
1743
|
+
.emotion-133 svg {
|
|
1744
1744
|
fill: #C0C0C0;
|
|
1745
1745
|
}
|
|
1746
1746
|
|
|
1747
|
-
.emotion-
|
|
1747
|
+
.emotion-164 {
|
|
1748
1748
|
background:color: #F4F4F4;
|
|
1749
1749
|
}
|
|
1750
1750
|
|
|
@@ -1770,7 +1770,7 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
1770
1770
|
>
|
|
1771
1771
|
<div
|
|
1772
1772
|
class="emotion-6"
|
|
1773
|
-
data-testid="
|
|
1773
|
+
data-testid="SUPPLEMENT_LEAD_AND_4_STACK-Grid"
|
|
1774
1774
|
>
|
|
1775
1775
|
<div
|
|
1776
1776
|
class="emotion-7"
|
|
@@ -1825,7 +1825,7 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
1825
1825
|
>
|
|
1826
1826
|
<div
|
|
1827
1827
|
class="emotion-19"
|
|
1828
|
-
data-testid="
|
|
1828
|
+
data-testid="SUPPLEMENT_LEAD_AND_4_STACK-InnerGrid"
|
|
1829
1829
|
>
|
|
1830
1830
|
<div
|
|
1831
1831
|
class="emotion-20"
|
|
@@ -2017,7 +2017,7 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
2017
2017
|
<img
|
|
2018
2018
|
alt="image alt"
|
|
2019
2019
|
class="emotion-63"
|
|
2020
|
-
src="
|
|
2020
|
+
src="https://www.thesun.co.uk/wp-content/uploads/2022/03/SPORT-PREVIEW-Amadou-Onana-to-WHU.jpg?strip=all&w=620&h=413&crop=1"
|
|
2021
2021
|
/>
|
|
2022
2022
|
</picture>
|
|
2023
2023
|
</div>
|
|
@@ -2073,7 +2073,7 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
2073
2073
|
<img
|
|
2074
2074
|
alt="image alt 2"
|
|
2075
2075
|
class="emotion-63"
|
|
2076
|
-
src="
|
|
2076
|
+
src="https://www.thesun.co.uk/wp-content/uploads/2022/03/SPORT-PREVIEW-Amadou-Onana-to-WHU.jpg?strip=all&w=620&h=413&crop=1"
|
|
2077
2077
|
/>
|
|
2078
2078
|
</picture>
|
|
2079
2079
|
</div>
|
|
@@ -2121,15 +2121,12 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
2121
2121
|
class="emotion-22"
|
|
2122
2122
|
>
|
|
2123
2123
|
<picture
|
|
2124
|
-
class="emotion-
|
|
2124
|
+
class="emotion-10"
|
|
2125
2125
|
>
|
|
2126
|
-
<div
|
|
2127
|
-
class="emotion-62"
|
|
2128
|
-
/>
|
|
2129
2126
|
<img
|
|
2130
|
-
alt="
|
|
2131
|
-
class="emotion-
|
|
2132
|
-
src="
|
|
2127
|
+
alt=""
|
|
2128
|
+
class="emotion-11"
|
|
2129
|
+
src=""
|
|
2133
2130
|
/>
|
|
2134
2131
|
</picture>
|
|
2135
2132
|
</div>
|
|
@@ -2185,7 +2182,7 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
2185
2182
|
<img
|
|
2186
2183
|
alt="image alt 3"
|
|
2187
2184
|
class="emotion-63"
|
|
2188
|
-
src="
|
|
2185
|
+
src="https://www.thesun.co.uk/wp-content/uploads/2022/03/SPORT-PREVIEW-Amadou-Onana-to-WHU.jpg?strip=all&w=620&h=413&crop=1"
|
|
2189
2186
|
/>
|
|
2190
2187
|
</picture>
|
|
2191
2188
|
</div>
|
|
@@ -2227,7 +2224,7 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
2227
2224
|
</div>
|
|
2228
2225
|
<hr
|
|
2229
2226
|
aria-hidden="true"
|
|
2230
|
-
class="emotion-
|
|
2227
|
+
class="emotion-109"
|
|
2231
2228
|
data-testid="divider"
|
|
2232
2229
|
/>
|
|
2233
2230
|
</div>
|
|
@@ -2242,11 +2239,11 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
2242
2239
|
</h2>
|
|
2243
2240
|
<p>
|
|
2244
2241
|
<a
|
|
2245
|
-
class="emotion-
|
|
2242
|
+
class="emotion-111"
|
|
2246
2243
|
href="/catagory-one/demo-1/test-headline"
|
|
2247
2244
|
>
|
|
2248
2245
|
<span
|
|
2249
|
-
class="emotion-
|
|
2246
|
+
class="emotion-112"
|
|
2250
2247
|
>
|
|
2251
2248
|
<span
|
|
2252
2249
|
class="emotion-51"
|
|
@@ -2258,11 +2255,11 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
2258
2255
|
</p>
|
|
2259
2256
|
<p>
|
|
2260
2257
|
<a
|
|
2261
|
-
class="emotion-
|
|
2258
|
+
class="emotion-111"
|
|
2262
2259
|
href="/catagory-two/demo-2/test-headline-2"
|
|
2263
2260
|
>
|
|
2264
2261
|
<span
|
|
2265
|
-
class="emotion-
|
|
2262
|
+
class="emotion-112"
|
|
2266
2263
|
>
|
|
2267
2264
|
<span
|
|
2268
2265
|
class="emotion-51"
|
|
@@ -2284,11 +2281,11 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
2284
2281
|
</h2>
|
|
2285
2282
|
<p>
|
|
2286
2283
|
<a
|
|
2287
|
-
class="emotion-
|
|
2284
|
+
class="emotion-111"
|
|
2288
2285
|
href="/uncategorized"
|
|
2289
2286
|
>
|
|
2290
2287
|
<span
|
|
2291
|
-
class="emotion-
|
|
2288
|
+
class="emotion-112"
|
|
2292
2289
|
>
|
|
2293
2290
|
<span
|
|
2294
2291
|
class="emotion-51"
|
|
@@ -2300,11 +2297,11 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
2300
2297
|
</p>
|
|
2301
2298
|
<p>
|
|
2302
2299
|
<a
|
|
2303
|
-
class="emotion-
|
|
2300
|
+
class="emotion-111"
|
|
2304
2301
|
href="/uncategorized"
|
|
2305
2302
|
>
|
|
2306
2303
|
<span
|
|
2307
|
-
class="emotion-
|
|
2304
|
+
class="emotion-112"
|
|
2308
2305
|
>
|
|
2309
2306
|
<span
|
|
2310
2307
|
class="emotion-51"
|
|
@@ -2316,11 +2313,11 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
2316
2313
|
</p>
|
|
2317
2314
|
<p>
|
|
2318
2315
|
<a
|
|
2319
|
-
class="emotion-
|
|
2316
|
+
class="emotion-111"
|
|
2320
2317
|
href="/uncategorized"
|
|
2321
2318
|
>
|
|
2322
2319
|
<span
|
|
2323
|
-
class="emotion-
|
|
2320
|
+
class="emotion-112"
|
|
2324
2321
|
>
|
|
2325
2322
|
<span
|
|
2326
2323
|
class="emotion-51"
|
|
@@ -2339,7 +2336,7 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
2339
2336
|
>
|
|
2340
2337
|
<div
|
|
2341
2338
|
class="emotion-6"
|
|
2342
|
-
data-testid="
|
|
2339
|
+
data-testid="SUPPLEMENT_LEAD_AND_4_STACK-Grid"
|
|
2343
2340
|
>
|
|
2344
2341
|
<div
|
|
2345
2342
|
class="emotion-7"
|
|
@@ -2352,7 +2349,7 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
2352
2349
|
class="emotion-9"
|
|
2353
2350
|
>
|
|
2354
2351
|
<picture
|
|
2355
|
-
class="emotion-
|
|
2352
|
+
class="emotion-133"
|
|
2356
2353
|
>
|
|
2357
2354
|
<div
|
|
2358
2355
|
class="emotion-62"
|
|
@@ -2391,7 +2388,7 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
2391
2388
|
>
|
|
2392
2389
|
<div
|
|
2393
2390
|
class="emotion-19"
|
|
2394
|
-
data-testid="
|
|
2391
|
+
data-testid="SUPPLEMENT_LEAD_AND_4_STACK-InnerGrid"
|
|
2395
2392
|
>
|
|
2396
2393
|
<div
|
|
2397
2394
|
class="emotion-20"
|
|
@@ -2404,7 +2401,7 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
2404
2401
|
class="emotion-22"
|
|
2405
2402
|
>
|
|
2406
2403
|
<picture
|
|
2407
|
-
class="emotion-
|
|
2404
|
+
class="emotion-133"
|
|
2408
2405
|
>
|
|
2409
2406
|
<div
|
|
2410
2407
|
class="emotion-62"
|
|
@@ -2445,7 +2442,7 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
2445
2442
|
class="emotion-22"
|
|
2446
2443
|
>
|
|
2447
2444
|
<picture
|
|
2448
|
-
class="emotion-
|
|
2445
|
+
class="emotion-133"
|
|
2449
2446
|
>
|
|
2450
2447
|
<div
|
|
2451
2448
|
class="emotion-62"
|
|
@@ -2484,7 +2481,7 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
2484
2481
|
class="emotion-4"
|
|
2485
2482
|
/>
|
|
2486
2483
|
<div
|
|
2487
|
-
class="emotion-
|
|
2484
|
+
class="emotion-164"
|
|
2488
2485
|
>
|
|
2489
2486
|
<div
|
|
2490
2487
|
class="emotion-42"
|
|
@@ -2577,7 +2574,7 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
2577
2574
|
<img
|
|
2578
2575
|
alt="image alt"
|
|
2579
2576
|
class="emotion-63"
|
|
2580
|
-
src="
|
|
2577
|
+
src="https://www.thesun.co.uk/wp-content/uploads/2022/03/SPORT-PREVIEW-Amadou-Onana-to-WHU.jpg?strip=all&w=620&h=413&crop=1"
|
|
2581
2578
|
/>
|
|
2582
2579
|
</picture>
|
|
2583
2580
|
</div>
|
|
@@ -2633,7 +2630,7 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
2633
2630
|
<img
|
|
2634
2631
|
alt="image alt 2"
|
|
2635
2632
|
class="emotion-63"
|
|
2636
|
-
src="
|
|
2633
|
+
src="https://www.thesun.co.uk/wp-content/uploads/2022/03/SPORT-PREVIEW-Amadou-Onana-to-WHU.jpg?strip=all&w=620&h=413&crop=1"
|
|
2637
2634
|
/>
|
|
2638
2635
|
</picture>
|
|
2639
2636
|
</div>
|
|
@@ -2689,7 +2686,7 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
2689
2686
|
<img
|
|
2690
2687
|
alt="image alt 3"
|
|
2691
2688
|
class="emotion-63"
|
|
2692
|
-
src="
|
|
2689
|
+
src="https://www.thesun.co.uk/wp-content/uploads/2022/03/SPORT-PREVIEW-Amadou-Onana-to-WHU.jpg?strip=all&w=620&h=413&crop=1"
|
|
2693
2690
|
/>
|
|
2694
2691
|
</picture>
|
|
2695
2692
|
</div>
|
|
@@ -2745,7 +2742,7 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
2745
2742
|
<img
|
|
2746
2743
|
alt="image alt 3"
|
|
2747
2744
|
class="emotion-63"
|
|
2748
|
-
src="
|
|
2745
|
+
src="https://www.thesun.co.uk/wp-content/uploads/2022/03/SPORT-PREVIEW-Amadou-Onana-to-WHU.jpg?strip=all&w=620&h=413&crop=1"
|
|
2749
2746
|
/>
|
|
2750
2747
|
</picture>
|
|
2751
2748
|
</div>
|
|
@@ -2787,7 +2784,7 @@ exports[`getServerSideProps Homepage 1`] = `
|
|
|
2787
2784
|
</div>
|
|
2788
2785
|
<hr
|
|
2789
2786
|
aria-hidden="true"
|
|
2790
|
-
class="emotion-
|
|
2787
|
+
class="emotion-109"
|
|
2791
2788
|
data-testid="divider"
|
|
2792
2789
|
/>
|
|
2793
2790
|
</div>
|
|
@@ -9,18 +9,6 @@ const container = document.createElement('div')
|
|
|
9
9
|
document.body.appendChild(container)
|
|
10
10
|
|
|
11
11
|
describe('AppContext tests', () => {
|
|
12
|
-
test('renders the content without error', () => {
|
|
13
|
-
render(
|
|
14
|
-
<AppContextProvider>
|
|
15
|
-
<div>Test</div>
|
|
16
|
-
</AppContextProvider>,
|
|
17
|
-
container
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
expect(container.textContent).toBe('Test')
|
|
21
|
-
expect(container.innerHTML).toMatchSnapshot()
|
|
22
|
-
})
|
|
23
|
-
|
|
24
12
|
test('renders the content with the default theme', () => {
|
|
25
13
|
render(
|
|
26
14
|
<AppContextProvider>
|
|
@@ -60,10 +60,15 @@ const gridOverride = {
|
|
|
60
60
|
xsColumnGutter: 'space000',
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
type ErrorPageProps = {
|
|
64
|
+
title: string
|
|
65
|
+
errorMassage: string
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const ErrorPage = ({ title, errorMassage }: ErrorPageProps) => (
|
|
64
69
|
<>
|
|
65
70
|
<Head>
|
|
66
|
-
<title>
|
|
71
|
+
<title>{title}</title>
|
|
67
72
|
</Head>
|
|
68
73
|
<Layout backgroundColor="white" gridOverride={gridOverride}>
|
|
69
74
|
<Cell xs={10} xsOffset={1} md={12} mdOffset={0}>
|
|
@@ -84,7 +89,7 @@ const FourOhFour = () => (
|
|
|
84
89
|
}}
|
|
85
90
|
stylePreset="inkContrast"
|
|
86
91
|
>
|
|
87
|
-
|
|
92
|
+
{title}
|
|
88
93
|
</TextBlock>
|
|
89
94
|
</Block>
|
|
90
95
|
|
|
@@ -97,8 +102,7 @@ const FourOhFour = () => (
|
|
|
97
102
|
stylePreset="inkBase"
|
|
98
103
|
style={{ whiteSpace: 'pre-line' }}
|
|
99
104
|
>
|
|
100
|
-
|
|
101
|
-
into your browser, it might be worth checking and trying again.
|
|
105
|
+
{errorMassage}
|
|
102
106
|
</TextBlock>
|
|
103
107
|
</Block>
|
|
104
108
|
<Block
|
|
@@ -126,4 +130,4 @@ const FourOhFour = () => (
|
|
|
126
130
|
</>
|
|
127
131
|
)
|
|
128
132
|
|
|
129
|
-
export default
|
|
133
|
+
export default ErrorPage
|
|
@@ -59,7 +59,7 @@ const articleData: ArticleProps = {
|
|
|
59
59
|
],
|
|
60
60
|
},
|
|
61
61
|
media: {
|
|
62
|
-
|
|
62
|
+
crops: [{ url: 'img//url', alt: 'testIMG', aspectRatio: '1:1' }],
|
|
63
63
|
},
|
|
64
64
|
highlights: [
|
|
65
65
|
{
|
|
@@ -189,7 +189,7 @@ describe('Article', () => {
|
|
|
189
189
|
const { getByAltText } = renderWithTheme(Article, articleData)
|
|
190
190
|
const img = getByAltText('testIMG')
|
|
191
191
|
const articleImage = articleData?.media as Image
|
|
192
|
-
expect(img.getAttribute('src')).toBe(articleImage.
|
|
192
|
+
expect(img.getAttribute('src')).toBe(articleImage.crops[0].url)
|
|
193
193
|
})
|
|
194
194
|
|
|
195
195
|
test('should not render image', () => {
|
|
@@ -129,7 +129,9 @@ const ArticlePage: React.FC<ArticleProps> = ({
|
|
|
129
129
|
gscId={gscId}
|
|
130
130
|
fbType="article"
|
|
131
131
|
fbImageUrl={
|
|
132
|
-
(media && '
|
|
132
|
+
(media && 'crops' in media && media.crops[0]
|
|
133
|
+
? media.crops[0].url
|
|
134
|
+
: '') as string
|
|
133
135
|
}
|
|
134
136
|
twUsername={twitterUsername}
|
|
135
137
|
/>
|
|
@@ -226,7 +228,7 @@ const ArticlePage: React.FC<ArticleProps> = ({
|
|
|
226
228
|
</Visible>
|
|
227
229
|
</Block>
|
|
228
230
|
|
|
229
|
-
{media && '
|
|
231
|
+
{media && 'crops' in media && (
|
|
230
232
|
<>
|
|
231
233
|
<Block
|
|
232
234
|
spaceStack={{
|
|
@@ -235,7 +237,7 @@ const ArticlePage: React.FC<ArticleProps> = ({
|
|
|
235
237
|
}}
|
|
236
238
|
>
|
|
237
239
|
<StyledFigure>
|
|
238
|
-
<Image src={media.
|
|
240
|
+
<Image src={media.crops[0].url} alt={media.crops[0].alt} />
|
|
239
241
|
</StyledFigure>
|
|
240
242
|
</Block>
|
|
241
243
|
</>
|
|
@@ -72,19 +72,23 @@ const pastDueBanner = {
|
|
|
72
72
|
},
|
|
73
73
|
terminated: {
|
|
74
74
|
title: 'Your subscription has been terminated',
|
|
75
|
+
phoneNumber: 'XXXX-XXX-XXXX',
|
|
75
76
|
text:
|
|
76
|
-
'We didn’t receive payment for your subscription. To reactivate it, please call
|
|
77
|
+
'We didn’t receive payment for your subscription. To reactivate it, please call ##PHONE_NUMBER##.',
|
|
78
|
+
dismissDays: 7,
|
|
77
79
|
},
|
|
78
80
|
cancelled: {
|
|
79
81
|
title: 'Your subscription has been cancelled.',
|
|
82
|
+
phoneNumber: 'XXXX-XXX-XXXX',
|
|
80
83
|
text:
|
|
81
|
-
'You’ll no longer have access to subscription benefits. To re-activate call
|
|
84
|
+
'You’ll no longer have access to subscription benefits. To re-activate call ##PHONE_NUMBER##.',
|
|
85
|
+
dismissDays: 7,
|
|
82
86
|
},
|
|
83
87
|
toBeCancelled: {
|
|
84
88
|
title: 'Your subscription will end soon.',
|
|
85
|
-
phoneNumber: '
|
|
89
|
+
phoneNumber: 'XXXX-XXX-XXXX',
|
|
86
90
|
text:
|
|
87
|
-
'You have
|
|
91
|
+
'You have cancelled your subscription and will lose access to all benefits on ##DATE##. To re-activate your subscription call ##PHONE_NUMBER##.',
|
|
88
92
|
},
|
|
89
93
|
treshold: {
|
|
90
94
|
firstNotice: 26,
|
|
@@ -11,7 +11,7 @@ const sliceBlockBuilder = (slice: Slice, collection: CollectionBlock) => {
|
|
|
11
11
|
const sectionURL = collection?.link?.url || '/uncategorized'
|
|
12
12
|
/* add layout to case statments when ready */
|
|
13
13
|
const sliceTypes = {
|
|
14
|
-
|
|
14
|
+
SUPPLEMENT_LEAD_AND_4_STACK: <Lead slice={slice} />,
|
|
15
15
|
SECONDARY_4: (
|
|
16
16
|
<SectionContext.Consumer>
|
|
17
17
|
{({ isIndexPage }) => (
|