-
Notifications
You must be signed in to change notification settings - Fork 0
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
test: stories for dialogs #372
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Playwright test resultsDetails Open report ↗︎ Skipped testsNo persona › tests/auth.test.ts › authenticate through Clerk UI |
1871c00
to
a922693
Compare
9fbc3e6
to
57fd799
Compare
57fd799
to
7150757
Compare
@@ -35,7 +35,7 @@ const dialogTitlesAndIcons: Record< | |||
iconName: "warning", | |||
}, | |||
"demo-interstitial": { | |||
title: "Lesson limit reached", | |||
title: "Demo lesson limits", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a copy change, as the previous title was inccorect a lot of the time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikeritson-oak it might be worth checking this
@@ -0,0 +1,295 @@ | |||
/* eslint-disable */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is autogenerated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Quality Gate passedIssues Measures |
🎉 This PR is included in version 1.16.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Adds stories for each of our dialogs. Each dialog has a component, but we interact with them through the DialogContents component. I figured it made sense to test through that interface
Mocking providers
Some of the dialogs need some mocked data from posthog, the demo status, or the demo API call. For the time being I've mocked each of these at the highest point possible, to help with coverage. eg: Mock the tRPC call from the DemoProvider, rather than mocking the DemoProvider itself. These patterns might change in the future as we learn more about storybook and have more tests in place
MSW (Mock Service Worker)
This is the recommended way to mock network requests in storybook. It seems to work really nicely out of the box
Snapshots
You can see the story changes in chromatic