🤖 tests: fix Pixel phone-viewport story failing on main - #3929
Conversation
…wport play passes
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f2eda69300
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…eakpoint literal from comment
|
@codex review Addressed both findings: |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Fixes the Pixel commit status failing on
mainsince #3923: the newProjectCreateModalPhoneViewport story's play function timed out withUnable to find a label with the text of: Add project.Background
#3923 added a Pixel phone-viewport story that opens the Add Project modal by clicking the sidebar's "Add project" button. The app auto-collapses the left sidebar when
window.innerWidth <= 768, and the collapsed sidebar does not render that button. Only Pixel executes the play at the pinned 390px viewport (the Storybook test-runner ignores viewport globals and runs at desktop width), so PR CI stayed green while every Pixel build onmainsince cc633c9 reported "1 test failed" (build 1772).Implementation
Adds an
expandLeftSidebar()helper tostories/helpers/uiState.ts(mirroring the existingcollapseLeftSidebar) and calls it in the sharedsetupProjectCreateStory(), following the same pattern ScratchPage stories already use for mobile-viewport plays. Expanded is the desktop default, so the two desktop stories are unaffected.Validation
make static-checkpasses.Note:
tests/ui/storybook/budget.test.tsfails on cleanmainalready (budget drifted; CI never runs that file, it is jest-ignored and outside the CI unit-testfind srcglob). This change adds no stories or matrix variants, so it does not move those counts.Generated with
xum• Model:anthropic:claude-fable-5• Thinking:xhigh