Skip to content

test(textfield): cover drag selection - #249

Merged
kolkov merged 1 commit into
mainfrom
fix/225-drag-select-test
Nov 8, 2026
Merged

kolkov merged 1 commit into
mainfrom
fix/225-drag-select-test

Conversation

@kolkov

@kolkov kolkov commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Adds the missing widget-level test for text selection by dragging, the last part of #225 without one. Double-click word selection and triple-click select-all were already covered (TestMouse_DoubleClickSelectsWord, TestMouse_TripleClickSelectsAll); the drag path went through the gesture recognizer with no test at this level.

The test presses at the first rune, makes a move past the drag slop (which starts the drag), drags past the last rune, and asserts the selection is the whole text both during the drag and after the release. If the drag callbacks did nothing, the selection would stay collapsed at 0 and the assertions would fail.

The feature itself shipped in v0.1.54; this only locks it in. Test-only change, no CHANGELOG entry.

The gesture path already extended a selection while dragging (ADR-049),
but nothing tested it at the widget level: only the double and triple
click paths had tests. The test presses at the first rune, drags past
the last one and asserts the whole text is selected during the drag and
after the release. Related: #225.
@codecov

codecov Bot commented Nov 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kolkov
kolkov merged commit f7225c6 into main Nov 8, 2026
12 checks passed
@kolkov
kolkov deleted the fix/225-drag-select-test branch November 8, 2026 13:48
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