tst_QQuickPathView::mouseDrag(): Skip on Windows if drag fails to start.
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Thu, 26 Feb 2015 15:20:43 +0000 (16:20 +0100)
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Wed, 11 Mar 2015 21:08:41 +0000 (21:08 +0000)
The test can be thrown off by external mouse move events which
influence the calculation of the drag distances. It is not clear where
they originate from on the CI.

FAIL!  : tst_QQuickPathView::mouseDrag() 'pathview->isMoving()' returned FALSE. ()
tst_qquickpathview.cpp(1506) : failure location

Change-Id: I398304b5597579033df81e1d0d32b2a3ab5516d6
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
tests/auto/quick/qquickpathview/tst_qquickpathview.cpp

index 4f45d0c..7db1552 100644 (file)
@@ -1503,6 +1503,10 @@ void tst_QQuickPathView::mouseDrag()
         QGuiApplication::sendEvent(window.data(), &mv);
     }
     // next move beyond threshold does trigger drag
+#ifdef Q_OS_WIN
+    if (!pathview->isMoving())
+        QSKIP("Skipping due to interference from external mouse move events.");
+#endif // Q_OS_WIN
     QVERIFY(pathview->isMoving());
     QVERIFY(pathview->isDragging());
     QCOMPARE(movingSpy.count(), 1);