diff options
Diffstat (limited to 'tests/auto/controls/data/tst_button.qml')
-rw-r--r-- | tests/auto/controls/data/tst_button.qml | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/auto/controls/data/tst_button.qml b/tests/auto/controls/data/tst_button.qml index 1de43426..16d1bb94 100644 --- a/tests/auto/controls/data/tst_button.qml +++ b/tests/auto/controls/data/tst_button.qml @@ -40,7 +40,7 @@ import QtQuick 2.2 import QtTest 1.0 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 TestCase { id: testCase @@ -213,8 +213,11 @@ TestCase { control.spy.expectedSequence = repeatSequence mousePress(control) compare(control.pressed, true) - tryCompare(clickSpy, "count", repeatCount) - verify(control.spy.success) + tryVerify(function() { return clickSpy.count >= repeatCount }) + if (clickSpy.count > repeatCount) + warn("Expected auto-repeat count " + repeatCount + " exceeded (" + clickSpy.count + ") - busy CI?") + else + verify(control.spy.success) control.spy.expectedSequence = [["pressedChanged", { "pressed": false }], ["downChanged", { "down": false }], @@ -229,8 +232,11 @@ TestCase { control.spy.expectedSequence = repeatSequence keyPress(Qt.Key_Space) compare(control.pressed, true) - tryCompare(clickSpy, "count", repeatCount) - verify(control.spy.success) + tryVerify(function() { return clickSpy.count >= repeatCount }) + if (clickSpy.count > repeatCount) + warn("Expected auto-repeat count " + repeatCount + " exceeded (" + clickSpy.count + ") - busy CI?") + else + verify(control.spy.success) control.spy.expectedSequence = [["pressedChanged", { "pressed": false }], ["downChanged", { "down": false }], |