From 4306a7b5e3165f2b5922ffb4f1210494068a34e0 Mon Sep 17 00:00:00 2001 From: Anna Beddow Date: Mon, 24 Aug 2026 17:14:33 +0100 Subject: [PATCH 1/2] Limit editorial headline AB testing to the US network front during initial testing. --- dotcom-rendering/src/model/enhanceCards.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dotcom-rendering/src/model/enhanceCards.ts b/dotcom-rendering/src/model/enhanceCards.ts index 3ce42617218..f58f4e23382 100644 --- a/dotcom-rendering/src/model/enhanceCards.ts +++ b/dotcom-rendering/src/model/enhanceCards.ts @@ -237,6 +237,12 @@ export const decideHeadline = ( if (!testCanRunOnPage) return defaultHeadline; + /* + * Initial rollout of Editorial AB testing will be limited to the US front only. + * Removal of this front restriction will be covered by https://github.com/guardian/frontend/issues/29129 + */ + if (pageId !== 'us') return defaultHeadline; + const variantMeta = activeEditorialTest.variantMeta.find( (variant) => variant.id.toLowerCase() === testBucket, ); From df0d1e670fd6c171d583663e49b1fb116be68fc8 Mon Sep 17 00:00:00 2001 From: Anna Beddow Date: Mon, 24 Aug 2026 17:14:45 +0100 Subject: [PATCH 2/2] Update tests to use the US front as the front ID --- .../src/model/enhanceCards.test.ts | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/dotcom-rendering/src/model/enhanceCards.test.ts b/dotcom-rendering/src/model/enhanceCards.test.ts index 6cd200a41c3..ff403487b3a 100644 --- a/dotcom-rendering/src/model/enhanceCards.test.ts +++ b/dotcom-rendering/src/model/enhanceCards.test.ts @@ -603,7 +603,7 @@ describe('Enhance Cards', () => { ] as VariantMeta[], startDate: Date.now() - oneHourInMilliseconds, expiryDate: Date.now() + oneHourInMilliseconds, - frontsThisTestCanRunOn: ['test-front'], + frontsThisTestCanRunOn: ['us'], hasManuallyEndedOnThisTrail: false, }, ], @@ -669,7 +669,7 @@ describe('Enhance Cards', () => { it('returns the default headline if editorial test exists and page is in allowed fronts list, but user is not in a test bucket', () => { expect( - decideHeadline(cardWithEditorialTest, {}, true, 'test-front'), + decideHeadline(cardWithEditorialTest, {}, true, 'us'), ).toEqual('Headline'); }); @@ -681,7 +681,7 @@ describe('Enhance Cards', () => { 'fronts-and-curation-editorial-headline-test': 'a', }, true, - 'test-front', + 'us', ), ).toEqual('Headline'); }); @@ -694,7 +694,7 @@ describe('Enhance Cards', () => { 'fronts-and-curation-editorial-headline-test': 'a', }, true, - 'invalid-test-front', + 'invalid-us', ), ).toEqual('Headline'); }); @@ -707,7 +707,7 @@ describe('Enhance Cards', () => { 'fronts-and-curation-editorial-headline-test': 'a', }, false, - 'test-front', + 'us', ), ).toEqual('Headline'); }); @@ -720,7 +720,7 @@ describe('Enhance Cards', () => { 'fronts-and-curation-editorial-headline-test': 'a', }, true, - 'test-front', + 'us', ), ).toEqual('Headline A'); }); @@ -733,7 +733,7 @@ describe('Enhance Cards', () => { 'fronts-and-curation-editorial-headline-test': 'b', }, true, - 'test-front', + 'us', ), ).toEqual('Headline B'); }); @@ -746,7 +746,7 @@ describe('Enhance Cards', () => { 'fronts-and-curation-editorial-headline-test': 'c', }, true, - 'test-front', + 'us', ), ).toEqual('Headline'); }); @@ -759,7 +759,7 @@ describe('Enhance Cards', () => { 'fronts-and-curation-editorial-headline-test': 'a', }, true, - 'test-front', + 'us', ), ).toEqual('Headline'); }); @@ -772,7 +772,7 @@ describe('Enhance Cards', () => { 'fronts-and-curation-editorial-headline-test': 'a', }, true, - 'test-front', + 'us', ), ).toEqual('Headline'); }); @@ -785,7 +785,7 @@ describe('Enhance Cards', () => { 'fronts-and-curation-editorial-headline-test': 'a', }, true, - 'test-front', + 'us', ), ).toEqual('Headline'); });