-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: composeStories from @storybook/react does not work with interactions that use the step function #21562
Comments
cc @yannbf |
This is probably related to |
Hey there @fabianherrera15 ! Did you try this with Storybook 7? This shouldn't be a problem. The step function is defined internally when Storybook prepares the story, so you shouldn't have to pass it. I tested this is two different projects and had no issues with it. |
Hi @yannbf. Thank you for following up on this issue. I just tried with storybook/react 7.0.5 but unfortunately, I'm still getting the |
No worries! I was setting up a minimal repro and I found the cause for the bug. It only happens if you don't use |
Son of a gun!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.1.0-alpha.14 containing PR #22308 that references this issue. Upgrade today to the
|
Zoinks!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.10 containing PR #22308 that references this issue. Upgrade today to the
|
I confirm the new version fixes the issue. Thank you all! 🎆 |
Thank you so much for reporting, if it wasn't for you this problem would still be there! |
Describe the bug
According to the docs: "the play function does not run automatically for you, but rather comes in the returned component, and you can execute it as you please." This is true but the play function can't be run on stories that grouped interactions using the step function. I haven't found a way to pass the expected
step
function to theplay
function of a Story that is used in a test file.In a story file:
In a test file:
The test fails with the following error:
[TypeError: step is not a function]
To Reproduce
No response
System
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: