Migrate Components Custom Select Tests to Browser Mode - #80985
Closed
ciampo wants to merge 2 commits into
Closed
Conversation
1 task
|
Size Change: 0 B Total Size: 7.76 MB |
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 and #80983.
TL;DR: This moves the two Components custom-select suites from Ariakit's jsdom helpers to canonical Vitest Browser Mode. The necessary change classes are
vitest-browser-reactrendering, per-testuserEvent.setup(), retryable browser locators, sequential real pointer input, Browser Mode snapshot-matcher parity, and direct workspace dependency ownership.Why?
These suites exercise popovers, focus, keyboard selection, typeahead, CSS visibility, and multi-select behavior that benefit from a real browser. Migrating them separately makes the browser-only timing and interaction differences reviewable without coupling them to the larger tabs and composite suites.
How?
vitest-browser-react.userEvent.setup()and retryablepagelocators.vitest-browser-reactdirectly in@wordpress/componentsand updates the lockfile.Eleven Components
@ariakit/testconsumer files remain for bounded follow-up PRs.Testing Instructions
npm run test:unit:vitest -- --project browser packages/components/src/custom-select-control/test/index.tsx packages/components/src/custom-select-control-v2/test/index.tsxnpm run test:unit:vitest -- --project browsernpm run --workspace @wordpress/unit-tests test:unit:routingnpm run --workspace @wordpress/unit-tests test:unit:conventionsnpm run lint:pkg-json -- packages/components/package.jsonnpm run lint:lockfilenpm run test:unit:vitestVerified locally:
Testing Instructions for Keyboard
Not applicable; this changes test infrastructure only.
Screenshots or screencast
Not applicable.
Use of AI Tools
Codex was used to convert the interaction helpers, investigate real-browser visibility and sequencing failures, add retryable assertions and dependency ownership, and run the verification commands. The resulting diff and unchanged snapshot were reviewed directly.