-
Notifications
You must be signed in to change notification settings - Fork 92
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
Usage with Storybook (Component Story Format) #55
Comments
The problem is that the API is different, right? I think you will have to do the following, to map the API:
|
Thanks a lot, i was thinking to use this way too. |
Awesome! |
Thanks @timdeschryver! I spent a whole day trying to figure this out! Another tip in case anyone came across this issue
@shilman, sorry to bother you but I was wondering now with v6 (csf), is there a better way to test stories in angular, instead of components. the motive here is to mainly:
|
@lkashef Thanks for the mention. We're currently bridging the gap between storybook and React testing library: storybookjs/storybook#10145 I'm sure some of these utilities (e.g. decorator/parameter/arg composition) can be applied to all frameworks. As for a more natural way to test stories, we're still figuring that out. Suggestions welcome! |
Thanks @shilman, I am glad you folks have that on your radar. Yes for sure, soon I hope I can contribute to this amazing project and community! |
I'm trying to use new Component Story Format of Storybook with Testing library.
The goal is to import a story as an ES6 module without having to redefine its context.
With this component:
I create 2 stories with Component Story Format to display two types of input.
With Testing Library, i would expect to be able to test the type from each story without having to define the type in the test.
I'm aware my issue comes from the way i use render() as i call the component property of the story and at this point no property is defined for this component.
But i can't find a way to render the component and its context just by calling 'defaultInput()' or 'rangeInput()'. Is there a solution?
Link to the project on Github.
The text was updated successfully, but these errors were encountered: