Commit b08a8b6
committed
🤖 fix(test-runner): hide theme toggle in stories with play functions to avoid button conflicts
When test-runner executes stories with interaction tests, the manual
StorybookThemeToggle button was appearing alongside component buttons,
causing "Found multiple elements" errors when querying by role.
This adds a check for context.parameters?.play to hide the toggle
button in any story that has an interaction test, preventing button
name collisions (e.g., both ToggleGroup's 'Dark' button and the
toggle's '🌙 Dark' button matching /dark/i).
Fixes: ToggleGroup:Two Options dark/light test failures1 parent e637aa5 commit b08a8b6
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
117 | | - | |
| 119 | + | |
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
| |||
0 commit comments