Skip to content

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
Collaborator

@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 👍

@sonarqubecloud
Copy link

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 requested a review from Tomdango January 19, 2024 16:22
@KaiSpencer KaiSpencer changed the title POC: Snapshot testing via Storybook Snapshot testing via Storybook Jan 19, 2024
@colinrotherham
Copy link
Collaborator

Linking this with #192 (comment)

Can we pick this up as part of #216?

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.

3 participants