Skip to content
Closed
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
11 changes: 11 additions & 0 deletions docs/storybook/stories/Color/Display/DataVisColors.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -313,3 +313,14 @@ export const DataVisMutedColors = ({colorTokens}) => {
</Table.Container>
)
}

// 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'],
}
22 changes: 22 additions & 0 deletions e2e/storybook.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, string | boolean>
Expand Down
Loading