summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2019-05-06 17:04:27 +0200
committerJüri Valdmann <juri.valdmann@qt.io>2019-05-07 08:01:09 +0000
commit7d001497ddcda501c55aac35b4c7a60980d9c6b5 (patch)
tree4c020e133d18d4b6f2e0cdaa2f3f8ae1533aaef4
parent0525d640cd11ddced2ec418be182c585204fc45f (diff)
Fix flaky tst_qquickmenu test
The important part of the "cascading" test is checking that the sub-sub menu eventually opens, so move the !visible check to the non-cascading branch of the if statement. Change-Id: I5a09bf0b5d45832f7b75c3e8c397fdb9e6fcc011 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
-rw-r--r--tests/auto/qquickmenu/tst_qquickmenu.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/qquickmenu/tst_qquickmenu.cpp b/tests/auto/qquickmenu/tst_qquickmenu.cpp
index 49fdc066..f22ac972 100644
--- a/tests/auto/qquickmenu/tst_qquickmenu.cpp
+++ b/tests/auto/qquickmenu/tst_qquickmenu.cpp
@@ -1105,8 +1105,9 @@ void tst_QQuickMenu::subMenuMouse()
QCOMPARE(mainMenu->isVisible(), cascade);
QVERIFY(subMenu1->isVisible());
QVERIFY(!subMenu2->isVisible());
- QVERIFY(!subSubMenu1->isVisible());
- if (cascade) {
+ if (!cascade) {
+ QVERIFY(!subSubMenu1->isVisible());
+ } else {
QTRY_VERIFY(subSubMenu1->isVisible());
QTRY_VERIFY(subSubMenu1->isOpened());
}