aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2017-08-01 10:15:08 +0200
committerMitch Curtis <mitch.curtis@qt.io>2017-08-02 08:31:58 +0000
commita1eaa30b0773d43de8dbb0b761ae590dc0fdcaaf (patch)
tree0c0191cc1f4cd561b6deffa1c926e7df25c86431 /tests
parent846a908b73ed3392c3f80a5c425c9ccf3c1e6a04 (diff)
tst_switch: fix test_mouse/test_touch failures
Use the correct coordinates for the middle of the switch. Task-number: QTBUG-62241 Change-Id: Ibb3f21d72731d0d1a227a0af98e537cc80536953 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/controls/data/tst_switch.qml8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/controls/data/tst_switch.qml b/tests/auto/controls/data/tst_switch.qml
index 59e29726..079bf820 100644
--- a/tests/auto/controls/data/tst_switch.qml
+++ b/tests/auto/controls/data/tst_switch.qml
@@ -201,12 +201,12 @@ TestCase {
mousePress(control, 0, 0, Qt.LeftButton)
compare(control.pressed, true)
verify(spy.success)
- mouseMove(control, control.width / 4, control.height / 4, 0, Qt.LeftButton)
+ mouseMove(control, control.width / 2, control.height / 2, 0, Qt.LeftButton)
compare(control.pressed, true)
spy.expectedSequence = [["pressedChanged", { "pressed": false, "checked": false }],
"released",
"clicked"]
- mouseRelease(control, control.width / 4, control.height / 4, Qt.LeftButton)
+ mouseRelease(control, control.width / 2, control.height / 2, Qt.LeftButton)
compare(control.checked, false)
compare(control.pressed, false)
tryCompare(control, "position", 0) // QTBUG-57944
@@ -304,12 +304,12 @@ TestCase {
touch.press(0, control, 0, 0).commit()
compare(control.pressed, true)
verify(spy.success)
- touch.move(0, control, control.width / 4, control.height / 4).commit()
+ touch.move(0, control, control.width / 2, control.height / 2).commit()
compare(control.pressed, true)
spy.expectedSequence = [["pressedChanged", { "pressed": false, "checked": false }],
"released",
"clicked"]
- touch.release(0, control, control.width / 4, control.height / 4).commit()
+ touch.release(0, control, control.width / 2, control.height / 2).commit()
compare(control.checked, false)
compare(control.pressed, false)
tryCompare(control, "position", 0) // QTBUG-57944