You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: