CSF actions not passed in from storyshots #12694
Unanswered
javidjamae
asked this question in
Help
Replies: 2 comments
-
This might be a storyshots bug. I don't remember where we got to with updating storyshots to handle args. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm resolving this by passing // MyComponent.js
//...
MyComponent.defaultProps = {
onSubmit: () => null
}
//... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm defining story-level argTypes that define actions like this:
This all works fine within the Storybook UI, but onSubmit is undefined when my Storyshots tests are run.
I console.log onSubmit right at the top of the story and see that onSubmit is undefined when I run the test, but defined in the browser console when I pull open the UI.
Here is my storyshots config:
Also worth mentioning (perhaps), I have a global decorator defined in my
.storybook/preview.js
file.Is there something I have to configure to get Storyshots to pick up the argTypes that I define for each story?
Beta Was this translation helpful? Give feedback.
All reactions