Skip to content

Commit

Permalink
fix double click test
Browse files Browse the repository at this point in the history
  • Loading branch information
dweymouth committed Oct 21, 2023
1 parent b82ae66 commit 583af44
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions widget/entry_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,16 @@ func TestEntry_DoubleTapped(t *testing.T) {
entry.DoubleTapped(ev)
assert.Equal(t, "quick", entry.SelectedText())

entry.doubleTappedAtUnixMillis = 0 // make sure we don't register a triple tap next

// select the whitespace after 'quick'
ev = getClickPosition("The quick", 0)
clickPrimary(entry, ev)
entry.DoubleTapped(ev)
assert.Equal(t, " ", entry.SelectedText())

entry.doubleTappedAtUnixMillis = 0

// select all whitespace after 'jumped'
ev = getClickPosition("jumped ", 1)
clickPrimary(entry, ev)
Expand Down

0 comments on commit 583af44

Please sign in to comment.