[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.
This commit is contained in:
Elvis Angelaccio 2019-04-07 22:18:14 +02:00
parent ff40714773
commit 30a335cbcf

View file

@ -247,7 +247,7 @@ void DolphinMainWindowTest::testNewFileMenuEnabled()
QVERIFY(newFileMenu); QVERIFY(newFileMenu);
QFETCH(bool, expectedEnabled); QFETCH(bool, expectedEnabled);
QCOMPARE(newFileMenu->isEnabled(), expectedEnabled); QTRY_COMPARE(newFileMenu->isEnabled(), expectedEnabled);
} }
QTEST_MAIN(DolphinMainWindowTest) QTEST_MAIN(DolphinMainWindowTest)