From d22ceeae753e2c4b5ca7edef4f14d3e9f7026667 Mon Sep 17 00:00:00 2001 From: Liu Liu Date: Thu, 22 Oct 2026 15:35:23 -0700 Subject: [PATCH] fix(storybook): preserve legacy data visualization story links Restore the published Highcharts accent and muted story IDs as hidden aliases of the current DataVis stories. Cover legacy and current URLs in light and dark themes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Color/Display/DataVisColors.stories.tsx | 11 ++++++++++ e2e/storybook.test.ts | 22 +++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/docs/storybook/stories/Color/Display/DataVisColors.stories.tsx b/docs/storybook/stories/Color/Display/DataVisColors.stories.tsx index a0cda31ea..5e197d792 100644 --- a/docs/storybook/stories/Color/Display/DataVisColors.stories.tsx +++ b/docs/storybook/stories/Color/Display/DataVisColors.stories.tsx @@ -313,3 +313,14 @@ export const DataVisMutedColors = ({colorTokens}) => { ) } + +// Preserve published links without duplicating the current stories in the sidebar. +export const HighchartsAccentColors = { + render: DataVisAccentColors, + tags: ['!dev', '!test'], +} + +export const HighchartsMutedColors = { + render: DataVisMutedColors, + tags: ['!dev', '!test'], +} diff --git a/e2e/storybook.test.ts b/e2e/storybook.test.ts index f65af39e8..537f21d60 100644 --- a/e2e/storybook.test.ts +++ b/e2e/storybook.test.ts @@ -130,6 +130,28 @@ test.describe('storybook', () => { } }) +test.describe('data visualization story links', () => { + for (const theme of ['light', 'dark']) { + for (const variant of ['accent', 'muted']) { + for (const prefix of ['highcharts', 'data-vis']) { + const id = `color-datavis--${prefix}-${variant}-colors` + + test(`${id} (${theme})`, async ({page}) => { + await visit(page, {id, globals: {theme}}) + + const table = page.getByRole('table', {name: `Data visualization ${variant} colors`}) + await expect(table).toBeVisible() + await expect(table.getByRole('row').nth(1)).toBeVisible() + await expect(table.locator('.ColorTokenSwatch-bg').first()).not.toHaveCSS( + 'background-color', + 'rgba(0, 0, 0, 0)', + ) + }) + } + } + } +}) + interface Options { id: string args?: Record