Test: Run interaction tests in Vitest Browser Mode - #80995
Draft
ciampo wants to merge 4 commits into
Draft
Conversation
1 task
|
Size Change: 0 B Total Size: 7.76 MB |
ciampo
force-pushed
the
codex/vitest-consolidated-04-test-migration
branch
from
July 30, 2026 23:47
58ecf75 to
59f56a3
Compare
ciampo
force-pushed
the
codex/vitest-consolidated-05-browser-mode
branch
from
July 30, 2026 23:48
d779272 to
86413d3
Compare
|
Flaky tests detected in 3eec742. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/30600327887
|
ciampo
force-pushed
the
codex/vitest-consolidated-04-test-migration
branch
from
July 31, 2026 00:38
59f56a3 to
8a81022
Compare
ciampo
force-pushed
the
codex/vitest-consolidated-05-browser-mode
branch
from
July 31, 2026 00:38
86413d3 to
1551ea0
Compare
ciampo
force-pushed
the
codex/vitest-consolidated-04-test-migration
branch
from
July 31, 2026 01:12
8a81022 to
6093aa4
Compare
ciampo
force-pushed
the
codex/vitest-consolidated-05-browser-mode
branch
2 times, most recently
from
July 31, 2026 01:20
9529651 to
d5e3139
Compare
1 task
ciampo
force-pushed
the
codex/vitest-consolidated-05-browser-mode
branch
from
July 31, 2026 02:57
4e3dd77 to
3eec742
Compare
ciampo
force-pushed
the
codex/vitest-consolidated-04-test-migration
branch
from
July 31, 2026 02:57
56286a1 to
212550f
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What?
Follow-up to #80855.
TL;DR: Move the interaction suites that benefit from a real browser into the Chromium-backed Vitest Browser project, run them with real CSS and native keyboard/pointer behavior, and replace safe remaining Ariakit test helpers with Vitest or Testing Library user events.
This moves nine baseline test files into Browser Mode. Together with the pilot, the browser project now owns 10 files and 190 tests.
Why?
jsdom and
@ariakit/testemulate browser behavior. That is useful for most unit tests, but it can hide browser-specific focus, keyboard, pointer, portal, layout, and CSS behavior. These suites exercise those behaviors directly and are better evidence when run in Chromium.How?
vitest/browseruser events and Browser locators for native interactions and retryable assertions where applicable.@ariakit/testrendering and interaction helpers in related jsdom suites with Testing Library equivalents.Native-browser follow-ups intentionally left out of this PR
The remaining Ariakit-assisted suites need product-behavior investigation rather than mechanical event replacement:
Testing Instructions
npm run test:unit:routing.npm run test:unit:conventions.npm run test:unit:vitest -- --project browser --run.npm run test:unit:vitest -- --project vitest --run packages/block-editor/src/components/colors-gradients/test/control.jsx packages/block-editor/src/components/global-styles/test/color-panel.jsx packages/block-editor/src/components/global-styles/test/typography-panel-core.jsx packages/block-editor/src/components/global-styles/test/typography-panel.jsx packages/components/src/font-size-picker/test/font-size-picker-select.tsx packages/components/src/font-size-picker/test/font-size-picker-toggle-group.tsx packages/components/src/font-size-picker/test/index.tsx packages/components/src/palette-edit/test/index.tsxnpm run lint:pkg-json,npm run lint:lockfile, andnpm run lint:tsconfig.The CI partitions that exposed the late resolver requests pass locally after the fixture isolation: shard 2 passes 21,266 tests (3 skipped) and shard 4 passes 4,210 tests (5 skipped), with no unhandled errors.
Testing Instructions for Keyboard
There is no production UI change. The Browser project directly exercises the affected Tab, Arrow, Enter, Escape, and focus behavior in Chromium.
Screenshots or screencast
Not applicable; this changes test infrastructure only. Failure screenshots and Playwright traces are retained as CI artifacts.
Use of AI Tools
This PR was authored with Codex. The generated changes were reviewed against the existing test intent and verified with the routing validators, linting, affected jsdom tests, and the complete Browser project.