Commit 4342cfe5 authored by Ronan Abhamon's avatar Ronan Abhamon

fix(tests): wait 100ms when main window is focused

parent ca7c145d
......@@ -34,14 +34,17 @@
QVERIFY(virtualWindowContent); \
QVERIFY(!strncmp(virtualWindowContent->metaObject()->className(), TYPE, sizeof TYPE - 1)); \
QCOMPARE(virtualWindowContent->objectName(), QStringLiteral(NAME)); \
} while (0)
} while (0);
#define INIT_GUI_TEST() \
QQuickWindow * mainWindow = App::getInstance()->getMainWindow(); \
App::smartShowWindow(mainWindow); \
QQuickItem *contentLoader = mainWindow->findChild<QQuickItem *>("__contentLoader"); \
QVERIFY(contentLoader); \
QTest::mouseClick(mainWindow, Qt::LeftButton, Qt::KeyboardModifiers(), QPoint(110, 100));
do { \
QQuickWindow *mainWindow = App::getInstance()->getMainWindow(); \
App::smartShowWindow(mainWindow); \
QTest::qWait(100); \
QQuickItem *contentLoader = mainWindow->findChild<QQuickItem *>("__contentLoader"); \
QVERIFY(contentLoader); \
QTest::mouseClick(mainWindow, Qt::LeftButton, Qt::KeyboardModifiers(), QPoint(110, 100)); \
} while (0);
namespace TestUtils {
void executeKeySequence (QQuickWindow *window, QKeySequence sequence);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment