Allow for extra interaction testing beyond the "play" function #22361
Replies: 3 comments 2 replies
-
Proposal: Separate
|
Beta Was this translation helpful? Give feedback.
-
Plus one, this would drastically increase my usage of interaction tests. As it currently stands, I'm largely sticking with Jest DOM tests because of this exact issue, which sucks because Interaction tests are so much more debuggable. |
Beta Was this translation helpful? Give feedback.
-
We've just started trying to use interaction tests as well. We are quickly finding its not suitable for multiple scenarios and would also love to see how to write many scenarios on one component. Currently trying to solve it with steps (but this is not quite right). It would be great if you could just write multiple At the moment using steps this doesn't quite line up properly and clicking through them to run one by one is problematic since they dont appear to nest correctly under the parent text: |
Beta Was this translation helpful? Give feedback.
-
Interaction testing for Storybook is a game-changer! I've been using it heavily on a large project, and it's an incredible developer workflow.
I'd like to suggest an improvement, to make component testing even more powerful!
The Problem:
It's hard to strike a balance between "Creating Stories" and "Writing Tests".
When creating Stories for a component, each Story represents a certain "state" of the component. For example, a Form component would have stories for "Initial", "Filled", "Validation Errors", and "Submitted".
When writing Unit Tests for a component, I want to achieve "full coverage" of my component, so I like to write MULTIPLE tests for each of these states. For example, I'll test various Validation Errors, various network errors, different auto-complete, and so on.
So the problem is: I want to write more tests, but I don't want them all to show up as their own stories.
Beta Was this translation helpful? Give feedback.
All reactions