Skip to content

test: the split handle's key test focuses the handle by a press on its grip, not from script - #33

Merged
vlad-salone merged 2 commits into
mainfrom
fix/split-handle-focus
Oct 13, 2026
Merged

vlad-salone merged 2 commits into
mainfrom
fix/split-handle-focus

Conversation

@vlad-salone

Copy link
Copy Markdown
Contributor

What and why

The Firefox half of split-handle.test.tsx failed 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 scripted focus() 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

vlad-salone and others added 2 commits October 13, 2026 14:19
@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Low impact] This test-only change appears safe to merge.

Summary

Updates split-handle.test.tsx to focus the slider by clicking its grip instead of calling focus().

  • The split-handle test focuses the slider with a grip press.

Reviews (1) · Last reviewed commit: "Merge branch 'main' into fix/split-handl..." · Reviewed by Greptile

@vlad-salone
vlad-salone merged commit 2cafa75 into main Oct 13, 2026
2 checks passed
@vlad-salone
vlad-salone deleted the fix/split-handle-focus branch October 13, 2026 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant