diff options
Diffstat (limited to 'tests/auto/controls/data/tst_swipedelegate.qml')
-rw-r--r-- | tests/auto/controls/data/tst_swipedelegate.qml | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/auto/controls/data/tst_swipedelegate.qml b/tests/auto/controls/data/tst_swipedelegate.qml index fa2d218f..067fed1e 100644 --- a/tests/auto/controls/data/tst_swipedelegate.qml +++ b/tests/auto/controls/data/tst_swipedelegate.qml @@ -1054,17 +1054,17 @@ TestCase { text: "SwipeDelegate" width: 150 - onClicked: close() - swipe.right: Item { width: parent.width height: parent.height + + SwipeDelegate.onClicked: swipe.close() } } } function test_close() { - var control = swipeDelegateComponent.createObject(testCase); + var control = closeSwipeDelegateComponent.createObject(testCase); verify(control); swipe(control, 0.0, -1.0); @@ -1073,6 +1073,16 @@ TestCase { compare(control.swipe.rightItem.x, 0); tryCompare(control.swipe.rightItem, "x", control.background.x + control.background.width); + mousePress(control); + verify(control.swipe.rightItem.SwipeDelegate.pressed); + + mouseRelease(control); + verify(!control.swipe.rightItem.SwipeDelegate.pressed); + tryCompare(control.swipe, "position", 0); + + // Swiping after closing should work as normal. + swipe(control, 0.0, -1.0); + control.destroy(); } |