Skip to content
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

Use internal Storybook renderer logic for portable stories in 8.3 (as a default), as it will solve hard to debug race conditions and allows us to run the vitest test runner for all renderers [kasper] #28685

Closed
Tracked by #28388
yannbf opened this issue Jul 23, 2024 · 0 comments
Assignees

Comments

@yannbf
Copy link
Member

yannbf commented Jul 23, 2024

Portable stories was originally more of a way to get the resolved component of a story, and let users render that component themselves, e.g. with RTL (React Testing Library).

In 8.2 we now kind of mimic the whole story run in portable stories, but still leave the rendering up to the user. We can make the rendering part of Storybook also portable, but we just haven’t done that yet.

One big difference between our internal rendering logic and RTL is that our internal logic is async and waits on more stuff before starting the play function. This can give subtle but frustrating differences in how the story will run. Think about that getByRole will resolve in Storybook but fail in portable stories.

Note that this would make portable stories more reliable, ensure that we can play stories of all our renderers, and eliminate the need for the user to configure portable stories with testing library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants