-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
feat: setup Storybook Interaction Testing #12444
feat: setup Storybook Interaction Testing #12444
Conversation
Important Auto Review SkippedDraft detected. Please check the settings in the CodeRabbit UI or the To trigger a single review, invoke the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Hey @TylerAPfledderer, checking this out... The layer-2 quiz seems to work great, but the others are not yet... Were we looking to add those here as well or in a separate task? FeedbackWidget modal passing on my end 👍 |
To clarify, how you are checking the other quizzes? Are you just replacing the name of the key in the story? I was only considering just one of the quiz banks to be able to verify that the object shape is valid. If one works, then they should all work. 🤔 I didn't want to run all of them because that would mean creating a story per quiz, and that would bloat the amount of snapshots created. I would add one to verify when some questions are answered incorrectly, though! These interaction tests should be about how the user is navigating the quizzes and what they should be seeing, nothing more. If you are seeing an inconsistency, then I wonder if my implementation of the testing is wrong. |
@TylerAPfledderer Did you want to include a test case for a wrong answer in this PR, or keep that separate? |
I probably should add it here. I would simply call on the layer-2 question bank again and randomly select two questions to have an incorrect answer |
Nice! @TylerAPfledderer Seeing this on Chromatic, it seems that it takes the snapshot once the interactive test is finished, right? Its fine for me, just wondering how it would be to take a snapshot for the initial state. I guess we would need to have a separate story for that. If that is correct, we could have 1 snapshot for the initial state, 1 for success and 1 for the error state. |
Outstanding tasks:
|
8f522c5
to
cd46b7f
Compare
Sticking back into draft for a brief time. Still pesky issues with the tooltip snapshot. Will put to "Ready for review" when either the issue is resolved, or that test is scrapped and to be addressed in a future PR. Currently working with a developer from Chromatic to help figure out the issue. |
5b9cd7f
to
c521253
Compare
Ready to go here, but seeing unexpected build errors unrelated to the PR |
@wackerow @TylerAPfledderer, what kind of approval can I do here? What should I look for? |
For a PR like this, I don't think we need your explicit approval. No component affected should have their design altered. |
Sets up testing for storybook and applies testing for
FeedbackWidget
andQuizWidget
@storybook/test
FeedbackWidget
, which creates a snapshot capture for the modal.QuizWidget
, which runs a quiz with all correct answers.