Repository navigation
fix(preflight): the browser step passes the selected Chromium specs before --project, which takes every value after it - #13082
Conversation
…efore --project, which takes every value after it
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 67e7d4a |
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because the pull request is a draft; it runs once the pull request is marked ready.
The interaction specs step now hands the selected spec files to Playwright before --project chromium, so a run with a specific Chromium selection runs those specs instead of stopping on a "project not found" error. The new test fails on main and passes here, and Playwright accepts the new order. No blocking findings.
Claims and files checked
Review mode: full; reason: no-earlier-review
Claims:
- The interaction step failed whenever the selection named specific specs, because they came after
--project chromium: verified (the base plan appends them after it, and Playwright exits 1 with a project-not-found error for that order). - Playwright's
--projecttakes every value after it: verified (Playwright 1.61.1 declares the option variadic). - The same spec with the file first passes 3/3: verified in part (the file-first order is accepted and lists a Calendar spec's tests in
chromium; the browser run of the other pull request's spec was not repeated). - The step's command is now
pnpm test:interaction <selected specs> --project chromium: verified (scripts/preflight.mjs:366-373,:549). argsAftergoes after the file-read arguments and before the heavy-step wrapper, so the printed failing command is the one that ran: verified (scripts/preflight.mjs:547-551,:578).- A full selection still runs
pnpm test:interaction --project chromium: verified (the new full-selection test). - CI's accessibility contracts step already puts its filters before
--project: verified (.github/scripts/a11y-pr-contracts.mjs:1450-1474). - On
mainthe new selected-specs test fails and the other 22 pass; with the fix all 23 pass: verified (both runs). - No CI impact and no workflow change: verified (only two script files change).
- The failure was found on another pull request's Calendar spec: verified (that pull request adds the named spec).
- The overlapping draft touches the same two files and merges cleanly: verified (a merge of the two heads has no conflict).
- Changeset entries: none in this pull request.
Files:
scripts/preflight.mjs: clearscripts/preflight.test.mjs: clear
Who this helps
Anyone running
pnpm preflight --browseron a change that selects Chromium interaction specs. Today the interaction step fails before any test runs: preflight puts the selected spec files after--project chromium, and Playwright's--projecttakes every value after it, so it reads the spec path as a project name (Error: Project(s) "packages/core/src/Calendar/__tests__/CalendarMonthButtonPress.interaction.browser.spec.ts" not found. Available projects: "chromium", "webkit"). The same spec, with the file first, passes 3/3. Found on #12363.What changes
scripts/preflight.mjs: the interaction step's command ispnpm test:interaction <selected specs> --project chromium. A command can now carryargsAfter, whichrunChecksappends after the arguments it reads from a file (argsFrom) and before the heavy-step wrapper, so the printed failing command is the one that ran. A full selection still runspnpm test:interaction --project chromium. CI's own a11y contracts step (.github/scripts/a11y-pr-contracts.mjs) already puts its filters before--project.scripts/preflight.test.mjs: a test, "the interaction specs step". It plans the--browserchecks, writes the selection the selector would write, and runs the step throughrunCheckswith a fake command runner:{"full": false, "specs": ["a.spec.ts", "b.spec.ts"]}the command ispnpm test:interaction a.spec.ts b.spec.ts --project chromium;pnpm test:interaction --project chromium.Tests (red first)
On main, the selected-specs case fails (Received
pnpm test:interaction --project chromium a.spec.ts b.spec.ts) and the other 22 pass; with the fix, 23/23 pass.CI impact
CI impact: none (preflight is a local tool; no workflow change).
Overlap checked: #13019 (ours, draft; it adds a
lab synccheck to the same two files at other lines; separate solution, merges cleanly)Owning session: noopbot (a61f66c2), under CI & Release (ca77f950). Land path: the drain's serial merge loop, on green, CodeBunny approval and Specs' exact-head
/approve-spec.