Skip to content

Commit 5c9dfb2

Browse files
Jakeiii-hardy
andauthored
Client for reading Fastly dictionary ab test state (#14344)
Co-authored-by: Imogen Hardy <[email protected]>
1 parent 2195532 commit 5c9dfb2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+2853
-2042
lines changed

dotcom-rendering/fixtures/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ module.exports = {
156156
googletagUrl: '//securepubads.g.doubleclick.net/tag/js/gpt.js',
157157
mmaUrl: 'https://manage.theguardian.com',
158158
abTests: {},
159+
serverSideABTests: {},
159160
edition: 'UK',
160161
ipsosTag: 'environment',
161162
isLiveBlog: false,

dotcom-rendering/fixtures/generated/cricket-match.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1882,6 +1882,7 @@ export const cricketMatchData: FECricketMatchPage = {
18821882
prebidBidCache: true,
18831883
},
18841884
abTests: {},
1885+
serverSideABTests: {},
18851886
googletagUrl: '//securepubads.g.doubleclick.net/tag/js/gpt.js',
18861887
stage: 'PROD',
18871888
frontendAssetsFullURL: 'https://assets.guim.co.uk/',
@@ -1901,7 +1902,7 @@ export const cricketMatchData: FECricketMatchPage = {
19011902
forecastsapiurl: '/weatherapi/forecast',
19021903
supportUrl: 'https://support.theguardian.com',
19031904
commercialBundleUrl:
1904-
'https://assets.guim.co.uk/commercial/b46e5e342ee9d3f9e36a/graun.standalone.commercial.js',
1905+
'https://assets.guim.co.uk/commercial/d05ba48ca72061c05d80/graun.standalone.commercial.js',
19051906
idOAuthUrl: 'https://oauth.theguardian.com',
19061907
webTitle: 'Fifth Test Match, The Kia Oval',
19071908
isFront: false,

dotcom-rendering/fixtures/generated/fe-articles/Analysis.ts

Lines changed: 64 additions & 67 deletions
Large diffs are not rendered by default.

dotcom-rendering/fixtures/generated/fe-articles/Audio.ts

Lines changed: 67 additions & 70 deletions
Large diffs are not rendered by default.

dotcom-rendering/fixtures/generated/fe-articles/Comment.ts

Lines changed: 48 additions & 51 deletions
Large diffs are not rendered by default.

dotcom-rendering/fixtures/generated/fe-articles/Dead.ts

Lines changed: 99 additions & 97 deletions
Large diffs are not rendered by default.

dotcom-rendering/fixtures/generated/fe-articles/Editorial.ts

Lines changed: 40 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export const Editorial: FEArticle = {
9797
},
9898
],
9999
},
100-
elementId: 'dfb472d2-1d83-4332-bb06-ebb02fab56ef',
100+
elementId: '64f27ca5-46e2-4a85-b2ff-ac5680ecc888',
101101
imageSources: [
102102
{
103103
weighting: 'inline',
@@ -297,32 +297,32 @@ export const Editorial: FEArticle = {
297297
{
298298
_type: 'model.dotcomrendering.pageElements.TextBlockElement',
299299
html: '<p>The greatest advances in the battle against the coronavirus have been made by modern science, but before there were vaccines, countries had to rely on older techniques: stopping people mingling; preventing new cases of the disease arriving from overseas. Britain’s record with lockdowns is not great (late to implement, premature in lifting), but with quarantine at the border there is barely even a record to defend. For much of last year there was a notional obligation on travellers from various countries to self-isolate on arrival in the UK, but with a shifting roster of places that qualified for “safe” travel corridors.</p>',
300-
elementId: '444bb991-3779-49ed-abd5-3a2535903440',
300+
elementId: '350074cb-d950-4e69-b762-f4917e294151',
301301
},
302302
{
303303
_type: 'model.dotcomrendering.pageElements.TextBlockElement',
304304
html: '<p>There were many categories of exemption. The regulations were unclear and poorly implemented. <a href="https://www.theguardian.com/world/commentisfree/2021/jan/28/uk-covid-travel-quarantine-hotel" title="">Efforts at enforcement have been patchy</a>. Essentially, self-isolation has been self-policed. Only towards the end of last year, as it became clear that mutant strains of the virus were spreading – and that Britain’s approach was persistently failing – did the government start focusing on <a href="https://www.theguardian.com/world/2021/jan/27/how-quarantine-rules-work-and-what-uk-government-is-planning" title="">quarantine as part of the anti-virus arsenal</a>. More travellers are now required to show proof of a negative Covid test and there are tighter restrictions on arrivals from certain “hotspot” countries. That approach is still flawed. People, and the virus they might carry, do not always travel straight from the heart of an outbreak to the UK. Mutations are dispersed along multiple paths.</p>',
305-
elementId: 'a84e7e42-1755-4138-a6c9-af07f7d4b3bf',
305+
elementId: 'a55607e4-7309-478c-8585-64a0673488f7',
306306
},
307307
{
308308
_type: 'model.dotcomrendering.pageElements.TextBlockElement',
309309
html: '<p>Ministers have said further border measures are required, but cannot say when they will be applied. The new regime is expected to involve diverting large numbers of arrivals to government-approved hotels for up to 10 days, with an option of getting out sooner with a negative test. The Department for Transport and the Treasury <a href="https://www.theguardian.com/world/2021/feb/03/grant-shapps-resists-blanket-border-controls-to-stem-covid-in-britain" title="">have been squeamish</a> about the cost of such a regime. Passengers would get a bill, but the whole system would still be expensive and inflict another wound on an already injured aviation sector.</p>',
310-
elementId: '55f8f7ec-5644-4212-bc09-f790b8615bb6',
310+
elementId: '69b58f12-6653-49b0-be16-1da318071986',
311311
},
312312
{
313313
_type: 'model.dotcomrendering.pageElements.TextBlockElement',
314314
html: '<p>But, as has been demonstrated many times in the pandemic, resisting tighter restrictions to avoid an immediate financial burden is a false economy. Delay allows the disease to spread. The onerous measures are still required and have to be in place for longer. That remains true even as the vaccination programme is rolled out. Not enough is yet known about vaccine resilience in the face of recently discovered coronavirus variants, let alone any future mutations. <a href="https://www.theguardian.com/world/2021/jan/22/covid-vaccines-what-are-the-implications-of-new-variants-of-virus" title="">The risk is not negligible.</a></p>',
315-
elementId: '5b1e1f08-3bf9-4a54-b556-9e5330c5abe0',
315+
elementId: '82f6f1d2-224c-40ed-8fb8-bcdfd7c0d34c',
316316
},
317317
{
318318
_type: 'model.dotcomrendering.pageElements.TextBlockElement',
319319
html: '<p>Countries with the strongest records against disease have applied the full range of containment measures quickly and thoroughly, including efficient testing, contact tracing, and a presumption that all new arrivals face quarantine (with some flexibility for humanitarian exceptions, naturally). That principle should be the basis for the UK’s regime. A speedy vaccination roll-out has given Boris Johnson <a href="https://www.theguardian.com/society/2021/jan/31/daily-record-as-600000-people-in-the-uk-receive-covid-jabs-on-saturday" title="">cause to celebrate</a> his government’s accomplishments relative to other countries. Ministerial relief at having something to cheer is palpable, but it must not lead to neglect of other fronts in the battle or feed the culture of impatience and denial that causes many Conservative MPs to demand unwarranted easing of restrictions.</p>',
320-
elementId: 'd105bed6-3e2b-4291-9fc6-da6eaf118bfc',
320+
elementId: '473860cf-fd40-42c1-b4ed-c0ba426c963c',
321321
},
322322
{
323323
_type: 'model.dotcomrendering.pageElements.TextBlockElement',
324324
html: '<p>No one should belittle the social, economic and psychological cost of anti-Covid restrictions. Quarantine, like lockdown, is a harsh instrument to be used only as an emergency resort. But we are now a year into such an emergency. The government’s haphazard approach, justified by a pursuit of short-term economic relief, has only prolonged the ordeal. The vaccine programme illuminates a way out. It would be a tragic squandering of that success if overreliance on new technology were to breed complacency regarding older but no less vital methods of protecting the public.</p>',
325-
elementId: '7b5faf0c-a2ef-4edf-accb-1a81954208a1',
325+
elementId: '83bf082a-69bb-40ad-8067-28f827af260a',
326326
},
327327
],
328328
attributes: {
@@ -535,7 +535,7 @@ export const Editorial: FEArticle = {
535535
productID: 'theguardian.com:basic',
536536
},
537537
image: [
538-
'https://i.guim.co.uk/img/media/c8200f3ea53cda44927b11af11e8fc731afc3f34/0_0_5322_3193/master/5322.jpg?width=1200&height=630&quality=85&auto=format&fit=crop&overlay-align=bottom%2Cleft&overlay-width=100p&overlay-base64=L2ltZy9zdGF0aWMvb3ZlcmxheXMvdGctb3BpbmlvbnMtYWdlLTIwMjEucG5n&enable=upscale&s=e7c2330f3db61275d41a19075da11728',
538+
'https://i.guim.co.uk/img/media/c8200f3ea53cda44927b11af11e8fc731afc3f34/0_0_5322_3193/master/5322.jpg?width=1200&height=630&quality=85&auto=format&fit=crop&precrop=40:21,offset-x50,offset-y0&overlay-align=bottom%2Cleft&overlay-width=100p&overlay-base64=L2ltZy9zdGF0aWMvb3ZlcmxheXMvdGctb3BpbmlvbnMtYWdlLTIwMjEucG5n&enable=upscale&s=1af342de88461ffd633fdeb521ec0a7c',
539539
'https://i.guim.co.uk/img/media/c8200f3ea53cda44927b11af11e8fc731afc3f34/0_0_5322_3193/master/5322.jpg?width=1200&height=1200&quality=85&auto=format&fit=crop&s=aefabb0b00e0f22e6369e0e289b1d699',
540540
'https://i.guim.co.uk/img/media/c8200f3ea53cda44927b11af11e8fc731afc3f34/0_0_5322_3193/master/5322.jpg?width=1200&height=900&quality=85&auto=format&fit=crop&s=7826af58a1f33eca97d979efbeb2fd0e',
541541
'https://i.guim.co.uk/img/media/c8200f3ea53cda44927b11af11e8fc731afc3f34/0_0_5322_3193/master/5322.jpg?width=1200&quality=85&auto=format&fit=max&s=0701f8ecfdb34e888d932a0c334c886e',
@@ -570,7 +570,7 @@ export const Editorial: FEArticle = {
570570
'article:author': 'https://www.theguardian.com/profile/editorial',
571571
'og:image:width': '1200',
572572
'og:image':
573-
'https://i.guim.co.uk/img/media/c8200f3ea53cda44927b11af11e8fc731afc3f34/0_0_5322_3193/master/5322.jpg?width=1200&height=630&quality=85&auto=format&fit=crop&overlay-align=bottom%2Cleft&overlay-width=100p&overlay-base64=L2ltZy9zdGF0aWMvb3ZlcmxheXMvdGctb3BpbmlvbnMtYWdlLTIwMjEucG5n&enable=upscale&s=e7c2330f3db61275d41a19075da11728',
573+
'https://i.guim.co.uk/img/media/c8200f3ea53cda44927b11af11e8fc731afc3f34/0_0_5322_3193/master/5322.jpg?width=1200&height=630&quality=85&auto=format&fit=crop&precrop=40:21,offset-x50,offset-y0&overlay-align=bottom%2Cleft&overlay-width=100p&overlay-base64=L2ltZy9zdGF0aWMvb3ZlcmxheXMvdGctb3BpbmlvbnMtYWdlLTIwMjEucG5n&enable=upscale&s=1af342de88461ffd633fdeb521ec0a7c',
574574
'al:ios:url':
575575
'gnmguardian://commentisfree/2021/feb/03/the-guardian-view-on-quarantine-an-old-method-and-a-vital-one?contenttype=Article&source=applinks',
576576
'article:publisher': 'https://www.facebook.com/theguardian',
@@ -603,7 +603,7 @@ export const Editorial: FEArticle = {
603603
'twitter:app:url:iphone':
604604
'gnmguardian://commentisfree/2021/feb/03/the-guardian-view-on-quarantine-an-old-method-and-a-vital-one?contenttype=Article&source=twitter',
605605
'twitter:image':
606-
'https://i.guim.co.uk/img/media/c8200f3ea53cda44927b11af11e8fc731afc3f34/0_0_5322_3193/master/5322.jpg?width=1200&height=630&quality=85&auto=format&fit=crop&overlay-align=bottom%2Cleft&overlay-width=100p&overlay-base64=L2ltZy9zdGF0aWMvb3ZlcmxheXMvdGctb3BpbmlvbnMtYWdlLTIwMjEucG5n&s=3ae71df7698ef52ebb1e0c89bf8574b6',
606+
'https://i.guim.co.uk/img/media/c8200f3ea53cda44927b11af11e8fc731afc3f34/0_0_5322_3193/master/5322.jpg?width=1200&height=630&quality=85&auto=format&fit=crop&precrop=40:21,offset-x50,offset-y0&overlay-align=bottom%2Cleft&overlay-width=100p&overlay-base64=L2ltZy9zdGF0aWMvb3ZlcmxheXMvdGctb3BpbmlvbnMtYWdlLTIwMjEucG5n&s=336744e57f749ed41457eb13c074d605',
607607
'twitter:site': '@guardian',
608608
'twitter:app:url:ipad':
609609
'gnmguardian://commentisfree/2021/feb/03/the-guardian-view-on-quarantine-an-old-method-and-a-vital-one?contenttype=Article&source=twitter',
@@ -765,6 +765,7 @@ export const Editorial: FEArticle = {
765765
googletagUrl: '//securepubads.g.doubleclick.net/tag/js/gpt.js',
766766
mmaUrl: 'https://manage.theguardian.com',
767767
abTests: {},
768+
serverSideABTests: {},
768769
edition: 'UK',
769770
ipsosTag: 'environment',
770771
isLiveBlog: false,
@@ -1141,7 +1142,7 @@ export const Editorial: FEArticle = {
11411142
url: '/world/europe-news',
11421143
},
11431144
{
1144-
title: 'US',
1145+
title: 'US news',
11451146
url: '/us-news',
11461147
longTitle: 'US news',
11471148
},
@@ -1222,6 +1223,11 @@ export const Editorial: FEArticle = {
12221223
url: '/football/teams',
12231224
longTitle: 'football/teams',
12241225
},
1226+
{
1227+
title: 'Euro 2025',
1228+
url: '/football/women-s-euro-2025',
1229+
longTitle: 'football/women-s-euro-2025',
1230+
},
12251231
],
12261232
},
12271233
{
@@ -1396,6 +1402,11 @@ export const Editorial: FEArticle = {
13961402
url: '/football/teams',
13971403
longTitle: 'football/teams',
13981404
},
1405+
{
1406+
title: 'Euro 2025',
1407+
url: '/football/women-s-euro-2025',
1408+
longTitle: 'football/women-s-euro-2025',
1409+
},
13991410
],
14001411
},
14011412
{
@@ -1624,28 +1635,6 @@ export const Editorial: FEArticle = {
16241635
title: 'Inside the Guardian',
16251636
url: 'https://www.theguardian.com/insidetheguardian',
16261637
},
1627-
{
1628-
title: 'The Observer',
1629-
url: '/observer',
1630-
children: [
1631-
{
1632-
title: 'Comment',
1633-
url: '/theobserver/news/comment',
1634-
},
1635-
{
1636-
title: 'The New Review',
1637-
url: '/theobserver/new-review',
1638-
},
1639-
{
1640-
title: 'Observer Magazine',
1641-
url: '/theobserver/magazine',
1642-
},
1643-
{
1644-
title: 'Observer Food Monthly',
1645-
url: '/theobserver/foodmonthly',
1646-
},
1647-
],
1648-
},
16491638
{
16501639
title: 'Guardian Weekly',
16511640
url: 'https://www.theguardian.com/weekly?INTCMP=gdnwb_mawns_editorial_gweekly_GW_TopNav_UK',
@@ -1663,17 +1652,13 @@ export const Editorial: FEArticle = {
16631652
url: '/crosswords/series/quick',
16641653
},
16651654
{
1666-
title: 'Speedy',
1667-
url: '/crosswords/series/speedy',
1655+
title: 'Sunday quick',
1656+
url: '/crosswords/series/sunday-quick',
16681657
},
16691658
{
16701659
title: 'Quick cryptic',
16711660
url: '/crosswords/series/quick-cryptic',
16721661
},
1673-
{
1674-
title: 'Everyman',
1675-
url: '/crosswords/series/everyman',
1676-
},
16771662
{
16781663
title: 'Quiptic',
16791664
url: '/crosswords/series/quiptic',
@@ -1686,10 +1671,6 @@ export const Editorial: FEArticle = {
16861671
title: 'Prize',
16871672
url: '/crosswords/series/prize',
16881673
},
1689-
{
1690-
title: 'Azed',
1691-
url: '/crosswords/series/azed',
1692-
},
16931674
{
16941675
title: 'Genius',
16951676
url: '/crosswords/series/genius',
@@ -1712,6 +1693,10 @@ export const Editorial: FEArticle = {
17121693
title: 'Corrections',
17131694
url: '/theguardian/series/corrections-and-clarifications',
17141695
},
1696+
{
1697+
title: 'Tips',
1698+
url: 'https://www.theguardian.com/tips',
1699+
},
17151700
],
17161701
brandExtensions: [
17171702
{
@@ -1976,6 +1961,18 @@ export const Editorial: FEArticle = {
19761961
dataLinkName: 'uk : footer : patrons',
19771962
extraClasses: '',
19781963
},
1964+
{
1965+
text: 'Tips',
1966+
url: 'https://www.theguardian.com/tips',
1967+
dataLinkName: 'uk : footer : tips',
1968+
extraClasses: '',
1969+
},
1970+
{
1971+
text: 'Accessibility settings',
1972+
url: '/help/accessibility-help',
1973+
dataLinkName: 'accessibility settings',
1974+
extraClasses: '',
1975+
},
19791976
],
19801977
],
19811978
},

0 commit comments

Comments
 (0)