From 2d7aedb169879284d583549590e138e6a4f172e5 Mon Sep 17 00:00:00 2001 From: fweddi Date: Wed, 2 Sep 2026 09:18:20 +0100 Subject: [PATCH] Expand name of test to future-proof us when we test articles using same test --- ab-testing/config/abTests.ts | 4 ++-- .../src/model/enhanceCards.test.ts | 18 +++++++++--------- dotcom-rendering/src/model/enhanceCards.ts | 3 +-- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/ab-testing/config/abTests.ts b/ab-testing/config/abTests.ts index 1c3a6f2ef42..d4b61b3b9ba 100644 --- a/ab-testing/config/abTests.ts +++ b/ab-testing/config/abTests.ts @@ -196,8 +196,8 @@ const ABTests: ABTest[] = [ shouldForceMetricsCollection: false, }, { - name: "fronts-and-curation-editorial-headline-test", - description: "Allow editorial headline A/B tests to run on web", + name: "fronts-and-curation-editorial-test", + description: "Allow editorial A/B tests to run on web", owners: [ "fronts.and.curation@guardian.co.uk", "ab.test.mission@guardian.co.uk", diff --git a/dotcom-rendering/src/model/enhanceCards.test.ts b/dotcom-rendering/src/model/enhanceCards.test.ts index 6cd200a41c3..65ead657afd 100644 --- a/dotcom-rendering/src/model/enhanceCards.test.ts +++ b/dotcom-rendering/src/model/enhanceCards.test.ts @@ -678,7 +678,7 @@ describe('Enhance Cards', () => { decideHeadline( cardWithNoEditorialTest, { - 'fronts-and-curation-editorial-headline-test': 'a', + 'fronts-and-curation-editorial-test': 'a', }, true, 'test-front', @@ -691,7 +691,7 @@ describe('Enhance Cards', () => { decideHeadline( cardWithEditorialTest, { - 'fronts-and-curation-editorial-headline-test': 'a', + 'fronts-and-curation-editorial-test': 'a', }, true, 'invalid-test-front', @@ -704,7 +704,7 @@ describe('Enhance Cards', () => { decideHeadline( cardWithEditorialTest, { - 'fronts-and-curation-editorial-headline-test': 'a', + 'fronts-and-curation-editorial-test': 'a', }, false, 'test-front', @@ -717,7 +717,7 @@ describe('Enhance Cards', () => { decideHeadline( cardWithEditorialTest, { - 'fronts-and-curation-editorial-headline-test': 'a', + 'fronts-and-curation-editorial-test': 'a', }, true, 'test-front', @@ -730,7 +730,7 @@ describe('Enhance Cards', () => { decideHeadline( cardWithEditorialTest, { - 'fronts-and-curation-editorial-headline-test': 'b', + 'fronts-and-curation-editorial-test': 'b', }, true, 'test-front', @@ -743,7 +743,7 @@ describe('Enhance Cards', () => { decideHeadline( cardWithEditorialTest, { - 'fronts-and-curation-editorial-headline-test': 'c', + 'fronts-and-curation-editorial-test': 'c', }, true, 'test-front', @@ -756,7 +756,7 @@ describe('Enhance Cards', () => { decideHeadline( cardWithEditorialTestWithUndefinedVariantMeta, { - 'fronts-and-curation-editorial-headline-test': 'a', + 'fronts-and-curation-editorial-test': 'a', }, true, 'test-front', @@ -769,7 +769,7 @@ describe('Enhance Cards', () => { decideHeadline( cardWithExpiredEditorialTest, { - 'fronts-and-curation-editorial-headline-test': 'a', + 'fronts-and-curation-editorial-test': 'a', }, true, 'test-front', @@ -782,7 +782,7 @@ describe('Enhance Cards', () => { decideHeadline( cardWithManuallyEndedEditorialTest, { - 'fronts-and-curation-editorial-headline-test': 'a', + 'fronts-and-curation-editorial-test': 'a', }, true, 'test-front', diff --git a/dotcom-rendering/src/model/enhanceCards.ts b/dotcom-rendering/src/model/enhanceCards.ts index af086355368..f9a6eac8344 100644 --- a/dotcom-rendering/src/model/enhanceCards.ts +++ b/dotcom-rendering/src/model/enhanceCards.ts @@ -216,8 +216,7 @@ export const decideHeadline = ( ): string => { const defaultHeadline = faciaCard.header.headline; - const testBucket = - serverSideABTests['fronts-and-curation-editorial-headline-test']; + const testBucket = serverSideABTests['fronts-and-curation-editorial-test']; const activeEditorialTest = findActiveEditorialTest( faciaCard.properties.tests,