@newskit-render/core 1.59.0 → 1.68.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.
Files changed (56) hide show
  1. package/CHANGELOG.md +327 -0
  2. package/README.md +16 -0
  3. package/__pacts__/spec/newskitApi.consumer.pact.ts +19 -32
  4. package/__tests__/pages/[articleSlug].test.tsx +1 -55
  5. package/__tests__/pages/__snapshots__/home.test.tsx.snap +657 -626
  6. package/__tests__/pages/__snapshots__/relatedArticles.test.tsx.snap +651 -0
  7. package/__tests__/pages/relatedArticles.test.tsx +23 -11
  8. package/components/article/__tests__/__snapshots__/index.test.tsx.snap +1091 -1060
  9. package/components/footer/index.tsx +1 -1
  10. package/components/header/banner-messages.ts +45 -0
  11. package/components/header/index.tsx +31 -287
  12. package/components/header/navigation-links.ts +20 -0
  13. package/components/layout/LayoutTemplate.tsx +4 -1
  14. package/config/__tests__/index.test.ts +53 -0
  15. package/config/environment.ts +67 -0
  16. package/config/index.ts +2 -85
  17. package/config/multiTenancy.ts +12 -0
  18. package/{app-context → context/app-context}/AppContext.test.tsx +7 -3
  19. package/{app-context/AppContext.tsx → context/app-context/index.tsx} +5 -1
  20. package/context/index.tsx +2 -0
  21. package/context/multi-tenancy/MultiTenancy.test.tsx +47 -0
  22. package/context/multi-tenancy/index.tsx +31 -0
  23. package/css/index.ts +224 -0
  24. package/cypress/support/commands.js +8 -4
  25. package/helpers/__tests__/createThemeDropdownObject.test.ts +3 -3
  26. package/helpers/__tests__/getRecommendation.test.ts +62 -0
  27. package/helpers/createThemeDropdownObject.ts +3 -3
  28. package/helpers/getRecommendations.ts +29 -0
  29. package/helpers/global-types.ts +8 -0
  30. package/{__tests__/pages/mocks.ts → helpers/mocks/getRecommendationsMock.ts} +2 -6
  31. package/helpers/multiTenancy.ts +19 -0
  32. package/infrastructure/helm/values-dev.yaml +1 -1
  33. package/infrastructure/helm/values-pr.yaml +1 -1
  34. package/infrastructure/helm/values-prod.yaml +1 -1
  35. package/jest.config.js +1 -2
  36. package/package.json +13 -11
  37. package/pages/[section]/[articleId]/[articleSlug].tsx +17 -10
  38. package/pages/[section]/[articleId]/relatedArticles.tsx +49 -40
  39. package/pages/_app.tsx +43 -257
  40. package/pages/account/cancellation/index.tsx +1 -1
  41. package/pages/account/edit/[field].tsx +1 -1
  42. package/pages/account/index.tsx +1 -1
  43. package/pages/account/newsletters-and-alerts/index.tsx +1 -1
  44. package/pages/account/payment/index.tsx +1 -1
  45. package/pages/account/subscription-and-billing/index.tsx +1 -1
  46. package/pages/api/auth/[...nextauth].ts +5 -1
  47. package/pages/api/recommendations/[...slug].ts +21 -0
  48. package/pages/checkout/account-creation/index.tsx +1 -1
  49. package/pages/checkout/payment-details/index.tsx +1 -1
  50. package/pages/help-hub/[id]/index.tsx +22 -9
  51. package/pages/help-hub/index.tsx +22 -9
  52. package/pages/help-hub/results.tsx +24 -0
  53. package/pages/index.tsx +1 -0
  54. package/theme/strings/demo.ts +1 -0
  55. package/theme/strings/index.ts +1 -0
  56. package/components/header/index.test.tsx +0 -73
package/CHANGELOG.md CHANGED
@@ -3,6 +3,333 @@
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.68.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.68.0-alpha.5...@newskit-render/core@1.68.0) (2022-06-27)
7
+
8
+ **Note:** Version bump only for package @newskit-render/core
9
+
10
+
11
+
12
+
13
+
14
+ # [1.68.0-alpha.4](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.67.0...@newskit-render/core@1.68.0-alpha.4) (2022-06-27)
15
+
16
+
17
+ ### Features
18
+
19
+ * **PPDSR-827:** 2/3 Help Hub - Layout ([#761](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/761)) ([cb340a6](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/cb340a61229f49cd0899371adcf51155b74eb471))
20
+ * **PPDSR-827:** 1/3 Help Hub - Introduce common NavigationPrimary header ([#752](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/752)) ([5b55fd1](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/5b55fd130a1fea5d5440a93b2cb67a026a52558b))
21
+ * **PPDSR-843:** Add multi-tenancy ([#756](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/756)) ([0481497](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/04814974fb49007506b3534f2d6de8a617fa4589))
22
+ * **PPDSR-XXX:** add install deps for security ([#766](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/766)) ([69ff219](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/69ff219254c0deb3da1c8de480706635d74cf229))
23
+
24
+
25
+
26
+
27
+
28
+ # [1.68.0-alpha.3](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.67.0...@newskit-render/core@1.68.0-alpha.3) (2022-06-27)
29
+
30
+
31
+ ### Features
32
+
33
+ * **PPDSR-827:** 2/3 Help Hub - Layout ([#761](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/761)) ([cb340a6](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/cb340a61229f49cd0899371adcf51155b74eb471))
34
+ * **PPDSR-827:** 1/3 Help Hub - Introduce common NavigationPrimary header ([#752](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/752)) ([5b55fd1](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/5b55fd130a1fea5d5440a93b2cb67a026a52558b))
35
+ * **PPDSR-843:** Add multi-tenancy ([#756](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/756)) ([0481497](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/04814974fb49007506b3534f2d6de8a617fa4589))
36
+
37
+
38
+
39
+
40
+
41
+ # [1.68.0-alpha.2](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.67.0...@newskit-render/core@1.68.0-alpha.2) (2022-06-23)
42
+
43
+
44
+ ### Features
45
+
46
+ * **PPDSR-827:** 2/3 Help Hub - Layout ([#761](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/761)) ([cb340a6](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/cb340a61229f49cd0899371adcf51155b74eb471))
47
+ * **PPDSR-827:** 1/3 Help Hub - Introduce common NavigationPrimary header ([#752](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/752)) ([5b55fd1](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/5b55fd130a1fea5d5440a93b2cb67a026a52558b))
48
+ * **PPDSR-843:** Add multi-tenancy ([#756](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/756)) ([0481497](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/04814974fb49007506b3534f2d6de8a617fa4589))
49
+
50
+
51
+
52
+
53
+
54
+ # [1.68.0-alpha.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.67.0...@newskit-render/core@1.68.0-alpha.1) (2022-06-22)
55
+
56
+
57
+ ### Features
58
+
59
+ * **PPDSR-827:** 1/3 Help Hub - Introduce common NavigationPrimary header ([#752](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/752)) ([5b55fd1](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/5b55fd130a1fea5d5440a93b2cb67a026a52558b))
60
+ * **PPDSR-843:** Add multi-tenancy ([#756](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/756)) ([0481497](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/04814974fb49007506b3534f2d6de8a617fa4589))
61
+
62
+
63
+
64
+
65
+
66
+ # [1.68.0-alpha.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.67.0...@newskit-render/core@1.68.0-alpha.0) (2022-06-21)
67
+
68
+
69
+ ### Features
70
+
71
+ * **PPDSR-827:** 1/3 Help Hub - Introduce common NavigationPrimary header ([#752](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/752)) ([5b55fd1](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/5b55fd130a1fea5d5440a93b2cb67a026a52558b))
72
+
73
+
74
+
75
+
76
+
77
+ ## [1.67.1-alpha.2](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.67.0...@newskit-render/core@1.67.1-alpha.2) (2022-06-20)
78
+
79
+ **Note:** Version bump only for package @newskit-render/core
80
+
81
+
82
+
83
+
84
+
85
+ ## [1.67.1-alpha.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.67.0...@newskit-render/core@1.67.1-alpha.1) (2022-06-16)
86
+
87
+ **Note:** Version bump only for package @newskit-render/core
88
+
89
+
90
+
91
+
92
+
93
+ ## [1.67.1-alpha.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.67.0...@newskit-render/core@1.67.1-alpha.0) (2022-06-16)
94
+
95
+ **Note:** Version bump only for package @newskit-render/core
96
+
97
+
98
+
99
+
100
+
101
+ # [1.67.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.67.0-alpha.0...@newskit-render/core@1.67.0) (2022-06-16)
102
+
103
+ **Note:** Version bump only for package @newskit-render/core
104
+
105
+
106
+
107
+
108
+
109
+ ## [1.66.2-alpha.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.66.1...@newskit-render/core@1.66.2-alpha.1) (2022-06-14)
110
+
111
+
112
+ ### Bug Fixes
113
+
114
+ * **PPDSR-998:** update cookie values ([#757](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/757)) ([142d7f6](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/142d7f6213294460e2b454da7da2c93693d3121a))
115
+
116
+
117
+
118
+
119
+
120
+ ## [1.66.2-alpha.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.66.1...@newskit-render/core@1.66.2-alpha.0) (2022-06-10)
121
+
122
+
123
+ ### Bug Fixes
124
+
125
+ * **PPDSR-998:** update cookie values ([#757](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/757)) ([142d7f6](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/142d7f6213294460e2b454da7da2c93693d3121a))
126
+
127
+
128
+
129
+
130
+
131
+ ## [1.66.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.66.1-alpha.0...@newskit-render/core@1.66.1) (2022-06-07)
132
+
133
+ **Note:** Version bump only for package @newskit-render/core
134
+
135
+
136
+
137
+
138
+
139
+ # [1.66.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.66.0-alpha.0...@newskit-render/core@1.66.0) (2022-06-02)
140
+
141
+ **Note:** Version bump only for package @newskit-render/core
142
+
143
+
144
+
145
+
146
+
147
+ # [1.65.0-alpha.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.64.0...@newskit-render/core@1.65.0-alpha.0) (2022-06-01)
148
+
149
+
150
+ ### Features
151
+
152
+ * **PPDSR-XXX:** Update SSL certificate ([#737](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/737)) ([2b706e3](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/2b706e3fd9a6c935bfde15d7d1082a7f7937307e))
153
+
154
+
155
+
156
+
157
+
158
+ ## [1.64.1-alpha.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.64.0...@newskit-render/core@1.64.1-alpha.0) (2022-06-01)
159
+
160
+ **Note:** Version bump only for package @newskit-render/core
161
+
162
+
163
+
164
+
165
+
166
+ # [1.64.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.64.0-alpha.0...@newskit-render/core@1.64.0) (2022-05-31)
167
+
168
+ **Note:** Version bump only for package @newskit-render/core
169
+
170
+
171
+
172
+
173
+
174
+ ## [1.63.2](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.63.2-alpha.0...@newskit-render/core@1.63.2) (2022-05-31)
175
+
176
+ **Note:** Version bump only for package @newskit-render/core
177
+
178
+
179
+
180
+
181
+
182
+ ## [1.63.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.63.0...@newskit-render/core@1.63.1) (2022-05-31)
183
+
184
+ **Note:** Version bump only for package @newskit-render/core
185
+
186
+
187
+
188
+
189
+
190
+ # [1.63.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.63.0-alpha.0...@newskit-render/core@1.63.0) (2022-05-31)
191
+
192
+ **Note:** Version bump only for package @newskit-render/core
193
+
194
+
195
+
196
+
197
+
198
+ ## [1.62.2](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.62.2-alpha.0...@newskit-render/core@1.62.2) (2022-05-31)
199
+
200
+ **Note:** Version bump only for package @newskit-render/core
201
+
202
+
203
+
204
+
205
+
206
+ ## [1.62.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.62.1-alpha.0...@newskit-render/core@1.62.1) (2022-05-31)
207
+
208
+ **Note:** Version bump only for package @newskit-render/core
209
+
210
+
211
+
212
+
213
+
214
+ # [1.62.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.62.0-alpha.3...@newskit-render/core@1.62.0) (2022-05-31)
215
+
216
+ **Note:** Version bump only for package @newskit-render/core
217
+
218
+
219
+
220
+
221
+
222
+ # [1.62.0-alpha.2](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.62.0-alpha.1...@newskit-render/core@1.62.0-alpha.2) (2022-05-31)
223
+
224
+
225
+ ### Features
226
+
227
+ * **PPDSR-655:** update versions ([#741](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/741)) ([ace8042](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/ace80427b7f7ed35aa6f94461c87b5ec220d251b))
228
+
229
+
230
+
231
+
232
+
233
+ # [1.62.0-alpha.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.61.0-alpha.7...@newskit-render/core@1.62.0-alpha.1) (2022-05-31)
234
+
235
+
236
+ ### Features
237
+
238
+ * **PPDSR-655:** update versions ([#740](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/740)) ([c4c01b0](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/c4c01b0b34088aa2477f8fb981778a1e39db6c77))
239
+
240
+
241
+
242
+
243
+
244
+ # [1.61.0-alpha.7](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.61.0...@newskit-render/core@1.61.0-alpha.7) (2022-05-30)
245
+
246
+
247
+ ### Features
248
+
249
+ * **PPDSR-655:** add push version bump ([#739](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/739)) ([175ff0c](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/175ff0c045962999a7d567f369d136a6794f81ef))
250
+
251
+
252
+
253
+
254
+
255
+ # [1.61.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.61.0-alpha.6...@newskit-render/core@1.61.0) (2022-05-30)
256
+
257
+ **Note:** Version bump only for package @newskit-render/core
258
+
259
+
260
+
261
+
262
+
263
+ # [1.61.0-alpha.5](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.61.0-alpha.4...@newskit-render/core@1.61.0-alpha.5) (2022-05-30)
264
+
265
+ **Note:** Version bump only for package @newskit-render/core
266
+
267
+
268
+
269
+
270
+
271
+ # [1.61.0-alpha.4](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.61.0-alpha.3...@newskit-render/core@1.61.0-alpha.4) (2022-05-27)
272
+
273
+ **Note:** Version bump only for package @newskit-render/core
274
+
275
+
276
+
277
+
278
+
279
+ # [1.61.0-alpha.3](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.61.0-alpha.2...@newskit-render/core@1.61.0-alpha.3) (2022-05-27)
280
+
281
+ **Note:** Version bump only for package @newskit-render/core
282
+
283
+
284
+
285
+
286
+
287
+ # [1.61.0-alpha.2](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.61.0-alpha.1...@newskit-render/core@1.61.0-alpha.2) (2022-05-27)
288
+
289
+ **Note:** Version bump only for package @newskit-render/core
290
+
291
+
292
+
293
+
294
+
295
+ # [1.61.0-alpha.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.61.0-alpha.0...@newskit-render/core@1.61.0-alpha.1) (2022-05-27)
296
+
297
+ **Note:** Version bump only for package @newskit-render/core
298
+
299
+
300
+
301
+
302
+
303
+ # [1.61.0-alpha.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.60.0...@newskit-render/core@1.61.0-alpha.0) (2022-05-27)
304
+
305
+
306
+ ### Features
307
+
308
+ * **PPDSR-665:** update alpha build ([#719](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/719)) ([6d58e3a](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/6d58e3a8998319fb2f17b49fd79983149b5adbe4))
309
+
310
+
311
+
312
+
313
+
314
+ # [1.60.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.59.1...@newskit-render/core@1.60.0) (2022-05-26)
315
+
316
+
317
+ ### Features
318
+
319
+ * **PPDSR-XXX:** check can - deploy ([#727](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/727)) ([d7bdc9a](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/d7bdc9a2e69bf0b32626fbcc428481671f42a6ab))
320
+
321
+
322
+
323
+
324
+
325
+ ## [1.59.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.59.0...@newskit-render/core@1.59.1) (2022-05-25)
326
+
327
+ **Note:** Version bump only for package @newskit-render/core
328
+
329
+
330
+
331
+
332
+
6
333
  # [1.59.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.57.1...@newskit-render/core@1.59.0) (2022-05-23)
7
334
 
8
335
 
package/README.md CHANGED
@@ -22,6 +22,22 @@ or with npm
22
22
  ```
23
23
  npm start
24
24
  ```
25
+ ## Rquired Environment Variables
26
+
27
+ In order to run the application,we need the following required environment variables.
28
+
29
+ ```
30
+ SITE_HOST=""
31
+ NEWSKIT_API_ENV_URL=""
32
+ NEWSKIT_API_X_API_KEY=""
33
+ OKTA_CLIENT_ID=""
34
+ OKTA_CLIENT_SECRET=""
35
+ OKTA_DOMAIN=""
36
+ PUBLISHER=""
37
+ ```
38
+ ## Endpoints
39
+
40
+ GET /api/recommendations - Returns a list on recommendations articles based on the recommendations slug.The recommendations slug is provided be the query param `articleId`.Also accepts a `userId` which allows us to fetch personalised recommendations.
25
41
 
26
42
  ## Ads Library
27
43
 
@@ -10,7 +10,7 @@ describe('Test pact with Newskit Api', () => {
10
10
  describe('When a request to get Universal Article is made', () => {
11
11
  beforeAll(async () => {
12
12
  await provider.setup().then(() => {
13
- const id = 'demo-9'
13
+ const id = '17842504'
14
14
  const publisher = 'DEMO'
15
15
  provider.addInteraction(
16
16
  new GraphQLInteraction()
@@ -30,54 +30,41 @@ describe('Test pact with Newskit Api', () => {
30
30
  body: {
31
31
  data: {
32
32
  universalArticle: {
33
- id: like('demo-9'),
33
+ id: like('17842504'),
34
34
  url: like('https://mock-site-url/some-location'),
35
- label: like('Mock label'),
35
+ // label: like(''),
36
36
  slug: like('some-location'),
37
37
  publisher: like('DEMO'),
38
38
  headline: like(
39
- 'Mock Article: Lorem ipsum dolor sit amet consectetur adipiscing elit'
39
+ "Drying your wet iPhone in rice 'is a MYTH' how to save a soaked mobile"
40
40
  ),
41
- kicker: like(''),
42
- flags: eachLike('UPDATED'),
41
+ kicker: like('WAT-ER PUZZLE!'),
42
+ flags: eachLike(''),
43
43
  bylines: [
44
44
  {
45
- type: like('author'),
46
- slug: like('mock-author'),
47
- name: like('Mock Author'),
48
- },
49
- {
50
- value: like('Chief Mock Author'),
51
45
  type: like('inline'),
46
+ value: like('Sean Keach'),
52
47
  },
53
48
  ],
54
- publishedDateTime: like('2019-02-14T00:00:00.000Z'),
55
- updatedDateTime: like('2019-02-14T00:37:17.000Z'),
49
+ publishedDateTime: like('2022-03-04T11:35:13.000Z'),
50
+ updatedDateTime: like('2022-03-04T11:35:18.000Z'),
56
51
  summary: {
57
52
  children: [
58
53
  {
59
54
  text: like(
60
- 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis eget lorem vel nunc feugiat malesuada ut ac nisi. Morbi odio ipsum, dignissim nec turpis vel, laoreet condimentum tortor. Duis laoreet tincidunt ullamcorper.'
61
- ),
62
- },
63
- {
64
- text: like(
65
- 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis eget lorem vel nunc feugiat malesuada ut ac nisi. Morbi odio ipsum, dignissim nec turpis vel, laoreet condimentum tortor. Duis laoreet tincidunt ullamcorper.'
66
- ),
67
- },
68
- {
69
- url: like('http://this-is-a-url/'),
70
- text: like(
71
- 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis eget lorem vel nunc feugiat malesuada ut ac nisi. Morbi odio ipsum, dignissim nec turpis vel, laoreet condimentum tortor. Duis laoreet tincidunt ullamcorper.'
72
- ),
73
- },
74
- {
75
- text: like(
76
- 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis eget lorem vel nunc feugiat malesuada ut ac nisi. Morbi odio ipsum, dignissim nec turpis vel, laoreet condimentum tortor. Duis laoreet tincidunt ullamcorper.'
55
+ 'There are more effective ways to dry out your iPhone and using rice could even cause damage to your handset.'
77
56
  ),
78
57
  },
79
58
  ],
80
59
  },
60
+ media: {
61
+ crops: eachLike({
62
+ url:
63
+ 'https://www.thesun.co.uk/wp-content/uploads/2022/03/iphone-in-rice.jpg?strip=all&w=620&h=413&crop=1',
64
+ alt: null,
65
+ aspectRatio: 'landscape',
66
+ }),
67
+ },
81
68
  },
82
69
  },
83
70
  },
@@ -88,7 +75,7 @@ describe('Test pact with Newskit Api', () => {
88
75
 
89
76
  test('should return the correct data', async () => {
90
77
  await expect(
91
- getUniversalArticle({ id: 'demo-9', publisher: 'DEMO' })
78
+ getUniversalArticle({ id: '17842504', publisher: 'DEMO' })
92
79
  ).resolves.not.toThrowError()
93
80
  })
94
81
 
@@ -54,31 +54,7 @@ const props: ArticleSlug = {
54
54
  twitterUsername: 'D_Trump',
55
55
  siteHost: 'hostname',
56
56
  gscId: '4320982',
57
- recommendations: [
58
- {
59
- href:
60
- 'https://www.thesun.co.uk/wp-content/uploads/2022/03/image-656eaa885d.jpg?strip=all&w=600&h=338&crop=1',
61
- tag: 'FOOT ON THE GAZ',
62
- text:
63
- 'Bale considering short deal with new club before RETIRING after World Cup',
64
- title: 'FOOT ON THE GAZ',
65
- },
66
- {
67
- href:
68
- 'https://www.thesun.co.uk/wp-content/uploads/2022/03/image-a21f115694-1.jpg?strip=all&w=600&h=338&crop=1',
69
- tag: 'TOUGH TIMES',
70
- text:
71
- 'I only made £5k last year - I sold £801k villa for cash, says Claire Sweeney',
72
- title: 'TOUGH TIMES',
73
- },
74
- {
75
- href: null,
76
- tag: 'TOUGH TIMES',
77
- text:
78
- 'I only made £5k last year - I sold £801k villa for cash, says Claire Sweeney',
79
- title: 'TOUGH TIMES',
80
- },
81
- ],
57
+ articleId: 'test-1',
82
58
  }
83
59
 
84
60
  const user = {
@@ -131,36 +107,6 @@ jest.mock('@newskit-render/my-account', () => {
131
107
  }
132
108
  })
133
109
 
134
- jest.mock('@newskit-render/standalone-components', () => {
135
- return {
136
- recommendationsProvider: jest.fn().mockResolvedValueOnce([
137
- {
138
- href:
139
- 'https://www.thesun.co.uk/wp-content/uploads/2022/03/image-656eaa885d.jpg?strip=all&w=600&h=338&crop=1',
140
- tag: 'FOOT ON THE GAZ',
141
- text:
142
- 'Bale considering short deal with new club before RETIRING after World Cup',
143
- title: 'FOOT ON THE GAZ',
144
- },
145
- {
146
- href:
147
- 'https://www.thesun.co.uk/wp-content/uploads/2022/03/image-a21f115694-1.jpg?strip=all&w=600&h=338&crop=1',
148
- tag: 'TOUGH TIMES',
149
- text:
150
- 'I only made £5k last year - I sold £801k villa for cash, says Claire Sweeney',
151
- title: 'TOUGH TIMES',
152
- },
153
- {
154
- href: null,
155
- tag: 'TOUGH TIMES',
156
- text:
157
- 'I only made £5k last year - I sold £801k villa for cash, says Claire Sweeney',
158
- title: 'TOUGH TIMES',
159
- },
160
- ]),
161
- }
162
- })
163
-
164
110
  describe('Article', () => {
165
111
  describe('getServerSideProps', () => {
166
112
  it('should return props', async () => {