Thanks to visit codestin.com
Credit goes to github.com

Skip to content

test: fix failing storybook stories - #27674

Merged
aslilac merged 16 commits into
mainfrom
lilac/fix-failing-story-play-functions
Aug 10, 2026
Merged

test: fix failing storybook stories#27674
aslilac merged 16 commits into
mainfrom
lilac/fix-failing-story-play-functions

Conversation

@aslilac

@aslilac aslilac commented Jul 30, 2026

Copy link
Copy Markdown
Member

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 / OpenPicker 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 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 and within() on a shadow root needs a cast, so there is no query-based alternative for a picker that renders as a web component.


Generated by Coder Agents on behalf of @aslilac.

aslilac added 9 commits June 29, 2026 19:42
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
pixel-storybook 0.3 moves isPixel to "@coder/pixel-storybook/storyapi".
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
@aslilac
aslilac changed the base branch from lilac/ischromatic-to-ispixel to main July 30, 2026 17:57
…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
aslilac marked this pull request as ready for review August 10, 2026 22:36
@aslilac
aslilac merged commit efd5ce3 into main Aug 10, 2026
26 checks passed
@aslilac
aslilac deleted the lilac/fix-failing-story-play-functions branch August 10, 2026 23:03
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants