-
Notifications
You must be signed in to change notification settings - Fork 972
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
[RFC]: Add Storybook Interaction Addon to RWFW #6699
Comments
Basic way of adding to command to package.json:
|
Any chance smoke testing can help here? It is already available without adding a dependency.
https://storybook.js.org/docs/react/api/cli-options#start-storybook Also a lower lift might be https://storybook.js.org/addons/@storybook/addon-storyshots if the problem trying to be solved is:
With interaction testing, basically the onus is on the developer to keep the interaction test up to date which is more work than generating snapshots. |
The problem to be solved is stories break obscurely -- from the docs it's not obvious that |
This may be FW overreach and perhaps a recommendation or cookbook doc would solve the problem. |
I think the smoke test CLI option is supposed to make those types of obscure breaks in stories surface immediately ( as in, make the breaks not obscure at all ). Not sure if it does fully catch all cases, which is where an add-on such as storyshots come in. The idea with something like that is you "snapshot" a baseline of your stories in a working state; and anytime there is a breaking changes, the snapshot tests fail and you are notified. That being said, I believe the recommended advice from the @storybookjs folks is to leverage your aforementioned interaction testing addon instead these days. @shilman , @yannbf, any advice for @MichaelrMentele ? cc @jtoar - w/ Storybook 7 around the corner, we might want to revisit which addon's we have an opinion on installing by default. Ancillary to that, we also will most likely want to make sure we allow some sort of escape hatch for users to totally override our opinion and install just what the want. These days, I hesitate to auto install storybook addons in the core framework because we have gotten issues where framework user's don't want what we install; and afaik there is currently no way for them to opt out (see #6854). |
Summary
Add interaction package to storybook default config.
https://storybook.js.org/addons/@storybook/addon-interactions
Motivation
Storybook stories are great but they are always silently getting broken because there is no default way for them to get tested. Out of the box you won't know until you open that story in storybook and notice -- woops, it's borked. Could be props changed. Could be the query changed and the mock doesn't make sense. Could be a lot of things.
Detailed proposal
Two options:
The downside to adding this to the FW is you need Playwright which is a large dependency.
NOT including is creates a frustrating experience (can't trust stories, stories always borked)
Are you interested in working on this?
The text was updated successfully, but these errors were encountered: