From: Elvis Angelaccio Date: Sun, 7 Apr 2019 20:18:14 +0000 (+0200) Subject: [DolphinMainWindowTest] Fix testNewFileMenuEnabled X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/30a335cbcf1268bd35e6916c3649ec1b40134858 [DolphinMainWindowTest] Fix testNewFileMenuEnabled The newFileMenu enabled status is updated whenever the KDirLister emits the `completed` signal: use QTRY_COMPARE so that we can wait for it. --- diff --git a/src/tests/dolphinmainwindowtest.cpp b/src/tests/dolphinmainwindowtest.cpp index 9cc6b84e8..c98ababa6 100644 --- a/src/tests/dolphinmainwindowtest.cpp +++ b/src/tests/dolphinmainwindowtest.cpp @@ -247,7 +247,7 @@ void DolphinMainWindowTest::testNewFileMenuEnabled() QVERIFY(newFileMenu); QFETCH(bool, expectedEnabled); - QCOMPARE(newFileMenu->isEnabled(), expectedEnabled); + QTRY_COMPARE(newFileMenu->isEnabled(), expectedEnabled); } QTEST_MAIN(DolphinMainWindowTest)