File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+ } )
You can’t perform that action at this time.
0 commit comments