From 583af444e373d2d4b06c2fe6016b4fac6f6ac500 Mon Sep 17 00:00:00 2001 From: Drew Weymouth Date: Sat, 21 Oct 2023 12:04:26 -0700 Subject: [PATCH] fix double click test --- widget/entry_internal_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/widget/entry_internal_test.go b/widget/entry_internal_test.go index db56c05fc4..50fc43268d 100644 --- a/widget/entry_internal_test.go +++ b/widget/entry_internal_test.go @@ -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)