You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<td>Run multiple auto-screenshot tests with different [storybook globals](https://storybook.js.org/docs/7/essentials/toolbars-and-globals#globals)</td>
99
+
</tr>
88
100
<tr>
89
101
<td>localport</td>
90
102
<td>`Number`</td>
@@ -113,6 +125,28 @@ With this minimal config, you will be able to run `npx testplane --storybook` to
113
125
unconditionally.
114
126
</Admonition>
115
127
128
+
#### autoScreenshotStorybookGlobals
129
+
130
+
For example, with `autoScreenshotStorybookGlobals` set to:
131
+
132
+
```json
133
+
{
134
+
"default": {},
135
+
"light theme": {
136
+
"theme": "light"
137
+
},
138
+
"dark theme": {
139
+
"theme": "dark"
140
+
}
141
+
}
142
+
```
143
+
144
+
3 autoscreenshot tests will be generated for each story, each test having its corresponding storybook globals value:
145
+
146
+
-`... Autoscreenshot default`
147
+
-`... Autoscreenshot light theme`
148
+
-`... Autoscreenshot dark theme`
149
+
116
150
## Advanced usage
117
151
118
152
If you have `ts-node` in your project, you can write your Testplane tests right inside of storybook story files:
0 commit comments