From 5ccc977754cf156d53a3972ae5e4c38d73690cac Mon Sep 17 00:00:00 2001 From: Wescoeur Date: Tue, 18 Jul 2017 18:18:39 +0200 Subject: [PATCH] feat(tests/self-test): wait exposed window --- src/tests/self-test/SelfTest.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/tests/self-test/SelfTest.cpp b/src/tests/self-test/SelfTest.cpp index f8e23b8c2..4c0a02647 100644 --- a/src/tests/self-test/SelfTest.cpp +++ b/src/tests/self-test/SelfTest.cpp @@ -23,6 +23,7 @@ #include #include +#include "../../app/App.hpp" #include "../../components/core/CoreManager.hpp" #include "../TestUtils.hpp" @@ -36,8 +37,8 @@ void SelfTest::checkAppStartup () { QVERIFY(spyCoreStarted.wait(5000)); - if (spyLoaderReady.count() == 1) - return; + if (spyLoaderReady.count() != 1) + QVERIFY(spyLoaderReady.wait(1000)); - QVERIFY(spyLoaderReady.wait(1000)); + QVERIFY(QTest::qWaitForWindowExposed(App::getInstance()->getMainWindow())); }