Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions dotcom-rendering/src/model/enhanceCards.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ describe('Enhance Cards', () => {
] as VariantMeta[],
startDate: Date.now() - oneHourInMilliseconds,
expiryDate: Date.now() + oneHourInMilliseconds,
frontsThisTestCanRunOn: ['test-front'],
frontsThisTestCanRunOn: ['us'],
hasManuallyEndedOnThisTrail: false,
},
],
Expand Down Expand Up @@ -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');
});

Expand All @@ -681,7 +681,7 @@ describe('Enhance Cards', () => {
'fronts-and-curation-editorial-headline-test': 'a',
},
true,
'test-front',
'us',
),
).toEqual('Headline');
});
Expand All @@ -694,7 +694,7 @@ describe('Enhance Cards', () => {
'fronts-and-curation-editorial-headline-test': 'a',
},
true,
'invalid-test-front',
'invalid-us',
),
).toEqual('Headline');
});
Expand All @@ -707,7 +707,7 @@ describe('Enhance Cards', () => {
'fronts-and-curation-editorial-headline-test': 'a',
},
false,
'test-front',
'us',
),
).toEqual('Headline');
});
Expand All @@ -720,7 +720,7 @@ describe('Enhance Cards', () => {
'fronts-and-curation-editorial-headline-test': 'a',
},
true,
'test-front',
'us',
),
).toEqual('Headline A');
});
Expand All @@ -733,7 +733,7 @@ describe('Enhance Cards', () => {
'fronts-and-curation-editorial-headline-test': 'b',
},
true,
'test-front',
'us',
),
).toEqual('Headline B');
});
Expand All @@ -746,7 +746,7 @@ describe('Enhance Cards', () => {
'fronts-and-curation-editorial-headline-test': 'c',
},
true,
'test-front',
'us',
),
).toEqual('Headline');
});
Expand All @@ -759,7 +759,7 @@ describe('Enhance Cards', () => {
'fronts-and-curation-editorial-headline-test': 'a',
},
true,
'test-front',
'us',
),
).toEqual('Headline');
});
Expand All @@ -772,7 +772,7 @@ describe('Enhance Cards', () => {
'fronts-and-curation-editorial-headline-test': 'a',
},
true,
'test-front',
'us',
),
).toEqual('Headline');
});
Expand All @@ -785,7 +785,7 @@ describe('Enhance Cards', () => {
'fronts-and-curation-editorial-headline-test': 'a',
},
true,
'test-front',
'us',
),
).toEqual('Headline');
});
Expand Down
6 changes: 6 additions & 0 deletions dotcom-rendering/src/model/enhanceCards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
Expand Down
Loading