diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-08-23 13:35:00 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-26 10:21:56 +0200 |
commit | 6ba7d88df623df5bce85bfdae853fc49006e76f2 (patch) | |
tree | 64de42db0f026a55b684ea787999a2e8c95762d6 /tests/auto/quick/qquickpathview | |
parent | cf3537e99c75d3bb92b9d4ed6f4d437e316dcf01 (diff) |
Stabilize tests using utilities from QQuickViewTestUtil.
Change QQuickViewTestUtil::createView() to center the window on
the screen to avoid taskbar areas. Add routine to move the mouse
away and use that in tests using QQuickViewTestUtil::flick()
and other mouse interaction since the mouse cursor can interfere
with it. Affected tests: qquickgridview, qquickpathview,
qquickflickable, qquicklistview, qquickrepeater and qquickpositioners.
Task-number: QTBUG-33017
Change-Id: I540c0efb54a231dcb44c8fd5ad9573a2d4d4b9df
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Diffstat (limited to 'tests/auto/quick/qquickpathview')
-rw-r--r-- | tests/auto/quick/qquickpathview/tst_qquickpathview.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp index e4ad7b9c40..5ca081aa92 100644 --- a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp +++ b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp @@ -1444,6 +1444,7 @@ void tst_QQuickPathView::undefinedPath() void tst_QQuickPathView::mouseDrag() { QScopedPointer<QQuickView> window(createView()); + QQuickViewTestUtil::moveMouseAway(window.data()); window->setSource(testFileUrl("dragpath.qml")); window->show(); window->requestActivate(); @@ -1736,6 +1737,7 @@ static inline bool hasFraction(qreal o) void tst_QQuickPathView::cancelDrag() { QScopedPointer<QQuickView> window(createView()); + QQuickViewTestUtil::moveMouseAway(window.data()); window->setSource(testFileUrl("dragpath.qml")); window->show(); window->requestActivate(); @@ -1782,6 +1784,7 @@ void tst_QQuickPathView::maximumFlickVelocity() { QScopedPointer<QQuickView> window(createView()); window->setSource(testFileUrl("dragpath.qml")); + QQuickViewTestUtil::moveMouseAway(window.data()); window->show(); window->requestActivate(); QVERIFY(QTest::qWaitForWindowActive(window.data())); @@ -1827,6 +1830,7 @@ void tst_QQuickPathView::snapToItem() QFETCH(bool, enforceRange); QScopedPointer<QQuickView> window(createView()); + QQuickViewTestUtil::moveMouseAway(window.data()); window->setSource(testFileUrl("panels.qml")); QQuickPathView *pathview = window->rootObject()->findChild<QQuickPathView*>("view"); QVERIFY(pathview != 0); @@ -1865,6 +1869,7 @@ void tst_QQuickPathView::snapOneItem() QFETCH(bool, enforceRange); QScopedPointer<QQuickView> window(createView()); + QQuickViewTestUtil::moveMouseAway(window.data()); window->setSource(testFileUrl("panels.qml")); window->show(); window->requestActivate(); |