tst_NarrowView: Use Qt's DoubleClick, not tapping (#339)
Manually tapping twice in JavaScript was subject to some limitations in
QML. In particular, only one tap event could happen per frame. It
is possible for frames in the NarrowView test to take longer than the
double-click interval, causing this sequence of taps to be
misrecognized.
By using Qt's own mouseDoubleClickSequence, we avoid this limitation and
the test succeeds no matter how slow the host is.
commit8ec377743415cdf6a7d0e4bfde65b27eeec38f54
authorDalton Durst <dalton@ubports.com>
dateThu 5 Nov 2020, 09:57 (6 years ago)
parenta4f840a
tests/qmltests/Greeter/tst_NarrowView.qml+1−3
@@ -444,9 +444,7 @@ Item {
444444 var dataCircle = findChild(view, "dataCircle");
445445 verify(dataCircle);
446446
447− tap(dataCircle);
448− wait(1);
449− tap(dataCircle);
447+ mouseDoubleClickSequence(dataCircle);
450448
451449 tryCompare(infographicDataChangedSpy, "count", 1);
452450 }