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

Snapshot testing via Storybook #188

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

KaiSpencer
Copy link
Contributor

Storybook has a new test runner built in, that comprises of Jest and Playwright, allowing a variety of testing techniques such as: visual tests, snapshot tests, a11y tests - Docs

This is a proof of concept to see how we could use the built in storybook testing to automatically have snapshot tests without having to define a test case per component. See config in .storybook/test-runner.ts

This also experiments with the visual image testing, where a similar screenshot is taken (rendered under the hood with playwright and jest)

Copy link
Member

@Tomdango Tomdango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks super overall - just a couple of comments 👍

.github/workflows/storybook-tests.yml Show resolved Hide resolved
.storybook/test-runner.ts Show resolved Hide resolved
Copy link

sonarcloud bot commented Jan 19, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@KaiSpencer KaiSpencer marked this pull request as ready for review January 19, 2024 16:22
@KaiSpencer KaiSpencer changed the title POC: Snapshot testing via Storybook Snapshot testing via Storybook Jan 19, 2024
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