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

[Storybook] Add ability to take snapshots during Storybook play interactions #168

Merged
merged 6 commits into from
Nov 27, 2024

Conversation

omacranger
Copy link
Member

@omacranger omacranger commented Nov 27, 2024

Description

This PR adds the ability to take snapshots during Storybook play interactions, instead of just at the end. This also reintroduces Storybook 6 support by tweaking dependency requirements.

For example, you could now open a dropdown, focus an input field, type text to generate form errors all while taking snapshots at each step of the way to catch all visual edge cases without creating individual stories for each.

This requires a new preVisit hook which has to be added to the Storybook test runner configuration. If attempting to use the takeVisualSnapshot without it, it will throw an error and mention this new addition.

Types of Changes

  • New feature (non-breaking change which adds functionality)
  • Configuration change

@omacranger omacranger merged commit 2036ba4 into main Nov 27, 2024
2 checks passed
@omacranger omacranger deleted the feat/storybook-interaction-snapshots branch November 27, 2024 18:30
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

Successfully merging this pull request may close these issues.

2 participants