From a1eaa30b0773d43de8dbb0b761ae590dc0fdcaaf Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Tue, 1 Aug 2017 10:15:08 +0200 Subject: 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 --- tests/auto/controls/data/tst_switch.qml | 8 ++++---- 1 file 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 -- cgit v1.2.3