Skip to content
Draft
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
12 changes: 12 additions & 0 deletions ab-testing/config/abTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,18 @@ const ABTests: ABTest[] = [
groups: ["control", "variant"],
shouldForceMetricsCollection: true,
},
{
name: "webx-world-cup-2026-subnav",
description:
"Test of World Cup 2026 subnav on world cup related content",
owners: ["dotcom.platform@guardian.co.uk:"],
expirationDate: "2026-07-20",
type: "server",
status: "ON",
audienceSize: 0 / 100,
groups: ["enable"],
shouldForceMetricsCollection: false,
},
];

const activeABtests = ABTests.filter((test) => test.status === "ON");
Expand Down
69 changes: 69 additions & 0 deletions dotcom-rendering/src/components/DirectoryPageNav.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
import { allModes } from '../../.storybook/modes';
import preview from '../../.storybook/preview';
import { BetaABTests } from '../experiments/lib/beta-ab-tests';
import { setBetaABTests } from '../lib/useAB';
import { ConfigProvider } from './ConfigContext';
import { DirectoryPageNav } from './DirectoryPageNav';

const mockAB = new BetaABTests({
isServer: true,
serverSideABTests: {
'webx-world-cup-2026-subnav': 'enable',
},
});
setBetaABTests(mockAB);

const meta = preview.meta({
component: DirectoryPageNav,
title: 'Components/Directory Page Nav',
Expand All @@ -22,6 +33,64 @@ export const WomensEuro2025 = meta.story({
},
});

export const WorldCup2026 = meta.story({
args: {
pageId: 'football/world-cup-2026',
},
});

export const WorldCup2026MatchCenter = meta.story({
args: {
pageId: 'football/world-cup-2026/overview',
},
});

export const WorldCup2026ArticleWeb = meta.story({
args: {
pageId: 'football/2026/may/19/brazils-world-cup-squad-offers-a-hint-of-the-magical-pragmatism-of-1994',
pageTags: [
{
id: 'football/world-cup-2026',
type: 'Topic',
title: 'World Cup 2026',
},
],
},
});

export const WorldCup2026ArticleApp = meta.story({
render: (args) => (
<ConfigProvider
value={{
renderingTarget: 'Apps',
darkModeAvailable: true,
assetOrigin: '/',
editionId: 'UK',
}}
>
<DirectoryPageNav {...args} />
</ConfigProvider>
),
args: {
pageId: 'football/2026/may/19/brazils-world-cup-squad-offers-a-hint-of-the-magical-pragmatism-of-1994',
pageTags: [
{
id: 'football/world-cup-2026',
type: 'Topic',
title: 'World Cup 2026',
},
],
},
parameters: {
chromatic: {
modes: {
'apps light': allModes['light'],
'apps dark': allModes['dark'],
},
},
},
});

export const OtherCompetition = meta.story({
args: {
pageId: 'football/premierleague/table',
Expand Down
Loading
Loading