test(site): fix failing Storybook play functions - #27874
Merged
Merged
Conversation
jakehwll
commented
Aug 5, 2026
Comment on lines
+18
to
+22
| // The admin settings dropdown is hidden below the `md` breakpoint, where the | ||
| // navbar collapses into `MobileMenu`, so stories that open the dropdown can | ||
| // only be snapshotted at desktop width. `MobileMenu.stories.tsx` covers the | ||
| // collapsed menu. | ||
| const desktopOnly = { pixel: { matrix: { viewports: ["desktop"] } } }; |
Contributor
Author
There was a problem hiding this comment.
This is a pixel specific issue... will look into this deeper soon but I'd rather green CI first.
Chromatic’s “tablet” mode used Storybook’s ipad viewport at 768px. At 768px, Tailwind md: (min-width: 768px) applies, so Admin settings is visible and the play click works.
Pixel’s tablet is 744px. That’s under md, so the button is hidden and the play function blows up.
jakehwll
commented
Aug 5, 2026
Contributor
Author
There was a problem hiding this comment.
Swapped to using Git here because there was a flake with Terminal (xterm.js). Theoretically the same test.
DanielleMaywood
approved these changes
Aug 5, 2026
Co-authored-by: Danielle Maywood <[email protected]>
jakehwll
commented
Aug 5, 2026
jakehwll
commented
Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes several Storybook play function failures that show up in Pixel (and some that fail under
vitest --project=storybook).Component / behavior
pattern, which does not prevent typing.Pixel viewport mismatches
Pixel ignores Storybook viewport params. Shared helpers
pixelWithDesktop/pixelWithPhonelive intestHelpers/pixel.ts.md(768px), so Admin settings is hidden and the play click fails.MobileMenualready covers the collapsed navbar.sm:hiddenkeeps "More options" out of the a11y tree even whenmatchMediais mocked as mobile.Story assertion fixes
onSubmitargument; the assertion now allows that.dimensionserror and fails the run even when tab assertions pass.sr-onlyspan and the count; assertion matches combinedtextContent.Notification method for ${template}; match with a regex.Pixel logs play failures but still exits 0, so these can stay green in CI while failing in the Pixel report.