From b28e87700a9eb0b5971a13278c57efbb344826fc Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Thu, 3 Sep 2020 22:54:36 +0200 Subject: tst_qquickmenu: fix flaky test The included test fails every now and then for Imagine, Fusion and Mac style. By using QTRY_VERIFY to wait a bit before we check if the menu is highlighted, it seems to pass each time. Change-Id: Ib8b207e1b5f81b3086595bb8ad7dc6881272def1 Reviewed-by: Mitch Curtis --- tests/auto/qquickmenu/tst_qquickmenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/auto/qquickmenu/tst_qquickmenu.cpp b/tests/auto/qquickmenu/tst_qquickmenu.cpp index d1b50357..b974a8e2 100644 --- a/tests/auto/qquickmenu/tst_qquickmenu.cpp +++ b/tests/auto/qquickmenu/tst_qquickmenu.cpp @@ -1194,7 +1194,7 @@ void tst_QQuickMenu::subMenuDisabledMouse() // as e.g. Material style menus have transitions and don't close immediately. QTRY_COMPARE(mainMenu->isVisible(), cascade); QVERIFY(subMenu->isVisible()); - QVERIFY(menuItem1->isHighlighted()); + QTRY_VERIFY(menuItem1->isHighlighted()); // Now the sub-menu is open. The current behavior is that the first menu item // in the new menu is highlighted; make sure that we choose the next item if // the first is disabled. -- cgit v1.2.3