aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2021-07-07 09:43:48 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2021-07-12 11:25:38 +0200
commitc4dd746df5935064ae3fa5222d0f768ce1062726 (patch)
treefd6444f7a0cf43d5a6f26558a9745d95e357a2f7
parent7a895c1f45986ed2c114684cb7de72203e50d454 (diff)
Stabiliize tst_qquickpopup::hover() on macOS
The popup seems to have a size of 1,1 for a short time with -style macOS, so just wait for it to expand before doing any hover testing. Change-Id: I87787d53c2fcaf0efe0625b2f132b5d8acfd19d1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 3cdf29334f6dba7c6d50be2524c8c67810c61391) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--tests/auto/qquickpopup/tst_qquickpopup.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/qquickpopup/tst_qquickpopup.cpp b/tests/auto/qquickpopup/tst_qquickpopup.cpp
index a0dc1d8867..8ab651a3e0 100644
--- a/tests/auto/qquickpopup/tst_qquickpopup.cpp
+++ b/tests/auto/qquickpopup/tst_qquickpopup.cpp
@@ -760,6 +760,7 @@ void tst_QQuickPopup::hover()
QVERIFY(openedSpy.isValid());
popup->open();
QVERIFY(openedSpy.count() == 1 || openedSpy.wait());
+ QTRY_VERIFY(popup->width() > 10); // somehow this can take a short time with macOS style
// hover the parent button outside the popup
QTest::mouseMove(window, QPoint(window->width() - 1, window->height() - 1));