Repository navigation
test: the split handle's key test focuses the handle by a press on its grip, not from script - #33
Merged
Merged
Conversation
…s grip, not from script Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
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 and why
The Firefox half of
split-handle.test.tsxfailed on CI in #29 and again on #32, both on the Firefox build Playwright 1.64 ships. In #31 the test gained a wait for the focus; on #32 that wait ran out the whole minute, so it is not timing: a scriptedfocus()on the handle, the first thing the test does, is dropped by that Firefox when the test's frame has not had the pointer yet, and the arrow key that follows goes nowhere. The page is not affected; a reader's handle has had a press or a tab before any key.The fix. The test presses the handle's grip, the round span on the thumb, which is what takes the pointer, and waits for the slider to have the focus. The press is a drag of no distance and reports the value as it stands, so the mock is cleared after it and the assertions count from the keys. The slider role itself is Base UI's range input under the grip, which a click cannot reach.
Passed three times in a row in Firefox locally and once in Chromium; before the change it passed locally too, which is what made it look like timing.
The tests
pnpm exec vitest run src/pages/compress/ui/split-handle.test.tsx🤖 Generated with Claude Code