aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-09-06 13:31:44 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-09-06 13:31:45 +0200
commit3703d57161dc4ad7df000403bfcc43ac78eb6617 (patch)
tree4ab8ca921336f38ca539b699c6f4c0d7dc3de949 /tests/auto
parent94fdd09199b3373bc6d6e9d9c873cd16d54184a5 (diff)
parent567a5cf69ef39ba5e9d0558ee7d6caec4d69bf71 (diff)
Merge remote-tracking branch 'origin/5.13' into 5.14
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qquickdrawer/tst_qquickdrawer.cpp6
-rw-r--r--tests/auto/qquickpopup/tst_qquickpopup.cpp2
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/qquickdrawer/tst_qquickdrawer.cpp b/tests/auto/qquickdrawer/tst_qquickdrawer.cpp
index 816f9b67..4cf0dabe 100644
--- a/tests/auto/qquickdrawer/tst_qquickdrawer.cpp
+++ b/tests/auto/qquickdrawer/tst_qquickdrawer.cpp
@@ -350,7 +350,8 @@ void tst_QQuickDrawer::position()
QVERIFY(drawer);
drawer->setEdge(edge);
- QTest::mousePress(window, Qt::LeftButton, Qt::NoModifier, press);
+ // Give it some time (50 ms) before the press to avoid flakiness on OpenSUSE: QTBUG-77946
+ QTest::mousePress(window, Qt::LeftButton, Qt::NoModifier, press, 50);
QTest::mouseMove(window, from);
QTest::mouseMove(window, to);
QCOMPARE(drawer->position(), position);
@@ -403,7 +404,8 @@ void tst_QQuickDrawer::dragMargin()
int leftX = qMax<int>(0, dragMargin);
int leftDistance = startDragDistance + drawer->width() * 0.45;
QVERIFY(leftDistance > QGuiApplication::styleHints()->startDragDistance());
- QTest::mousePress(window, Qt::LeftButton, Qt::NoModifier, QPoint(leftX, drawer->height() / 2));
+ // Give it some time (50 ms) before the press to avoid flakiness on OpenSUSE: QTBUG-77946
+ QTest::mousePress(window, Qt::LeftButton, Qt::NoModifier, QPoint(leftX, drawer->height() / 2), 50);
QTest::mouseMove(window, QPoint(leftX + startDragDistance, drawer->height() / 2));
QTest::mouseMove(window, QPoint(leftX + leftDistance, drawer->height() / 2));
QCOMPARE(drawer->position(), dragFromLeft);
diff --git a/tests/auto/qquickpopup/tst_qquickpopup.cpp b/tests/auto/qquickpopup/tst_qquickpopup.cpp
index c2f876b8..636b2b21 100644
--- a/tests/auto/qquickpopup/tst_qquickpopup.cpp
+++ b/tests/auto/qquickpopup/tst_qquickpopup.cpp
@@ -494,7 +494,7 @@ void tst_QQuickPopup::closePolicy()
QTRY_VERIFY(popup->isOpened());
// press outside popup and its parent
- QTest::mousePress(window, Qt::LeftButton, Qt::NoModifier, QPoint(1, 1));
+ QTest::mousePress(window, Qt::LeftButton, Qt::NoModifier, QPoint(1, 1), 50);
if (closePolicy.testFlag(QQuickPopup::CloseOnPressOutside) || closePolicy.testFlag(QQuickPopup::CloseOnPressOutsideParent))
QTRY_VERIFY(!popup->isVisible());
else