Skip to content

Commit fdc8787

Browse files
committed
Add vrt for FilteredActionList
1 parent 5bd41cf commit fdc8787

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import {test, expect} from '@playwright/test'
2+
import {visit} from '../test-helpers/storybook'
3+
import {themes} from '../test-helpers/themes'
4+
5+
const stories = [
6+
{
7+
title: 'Default',
8+
id: 'components-filteredactionlist--default',
9+
},
10+
{
11+
title: 'With Long Items',
12+
id: 'components-filteredactionlist-examples--with-long-items',
13+
},
14+
] as const
15+
16+
test.describe('FilteredActionList', () => {
17+
for (const story of stories) {
18+
test.describe(story.title, () => {
19+
for (const theme of themes) {
20+
test(`default @vrt ${theme}`, async ({page}) => {
21+
await visit(page, {
22+
id: story.id,
23+
globals: {
24+
colorScheme: theme,
25+
},
26+
})
27+
28+
// Default state
29+
await expect(page).toHaveScreenshot(`FilteredActionList.${story.title}.${theme}.png`)
30+
})
31+
}
32+
})
33+
}
34+
})

0 commit comments

Comments
 (0)