test: fix failing storybook stories - #27674
Merged
Merged
Conversation
Use @coder/pixel-storybook's isPixel() for snapshot-determinism gating in place of chromatic/isChromatic. Bump pixel-storybook to the canary that exports isPixel and drop the now-unused chromatic dependency.
pixel-storybook waits for fonts before snapshotting, so the Chromatic-era font-loading workaround in the Storybook preview is redundant.
…ispixel # Conflicts: # site/package.json # site/pnpm-lock.yaml
…lilac/ischromatic-to-ispixel
pixel-storybook 0.3 moves isPixel to "@coder/pixel-storybook/storyapi".
…lilac/ischromatic-to-ispixel
Six stories failed their play functions in the pixel snapshot run: - The four NavbarView admin stories click the admin settings dropdown, which is hidden below the `md` breakpoint. Pixel's tablet viewport is 744px wide, so those stories now snapshot desktop only. - CreateOAuth2AppPageView's Default story asserted the submit button was disabled before formik's validate-on-mount pass had reported the empty required fields. The assertion now retries. - WorkspaceSettingsPageView's update policy story asserted onSubmit was called with a single argument, but formik also passes its helper bag.
An error occurred while trying to automatically change base from
lilac/ischromatic-to-ispixel
to
lilac/pixel-storybook-0.3
July 30, 2026 17:47
…ry-play-functions # Conflicts: # site/pnpm-lock.yaml # site/src/modules/dashboard/Navbar/NavbarView.stories.tsx # site/src/pages/WorkspaceSettingsPage/WorkspaceSettingsPageView.stories.tsx
- IconField's OpenPicker story looked for an emoji-mart category label with a testing-library text query. emoji-mart renders into a shadow root, so the label was never reachable; the assertion now reads the host element's shadow DOM, scoped to the popover so it cannot match the hidden picker the field keeps mounted to warm the lazy chunk. - OAuth2AppsSettingsPage's settings stories looked for the Enable button immediately after switching tabs, before the settings section had replaced its loader. Both now retry.
The remote tip afcbf88 ("idk") predates #27874, which landed the navbar viewport pinning and the CreateOAuth2AppPageView wait on main, so those files keep main's versions. The pixel-storybook canary bump, the `initialGlobals: { matrix: {} }` preview export, and the debug `console.log` in ForOrgAdmin are left out of this merge; afcbf88 still carries them in history if we want to pick the experiment back up.
aslilac
marked this pull request as ready for review
August 10, 2026 22:36
DanielleMaywood
approved these changes
Aug 10, 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.
The three fixes this branch opened with landed on main in #27874, so after merging main what is left here is the two stories still failing their play functions in the pixel snapshot run.
IconField/OpenPickerlooked for an emoji-mart category label with a testing-library text query. emoji-mart renders into a shadow root, so the label was never reachable and this story failed on every run. The assertion now reads through the host element, scoped to the popover so it cannot match the hidden picker the field keeps mounted to warm the lazy chunk.OAuth2AppsSettingsPage's settings stories looked for the Enable button immediately after switching tabs, before the settings section swapped out its loader. Both retry now. This one failed in 1 of the last 4 main runs.Reading the shadow root means a
querySelector, which FE10 discourages. testing-library queries cannot cross a shadow boundary andwithin()on a shadow root needs a cast, so there is no query-based alternative for a picker that renders as a web component.