mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-20 13:18:06 +00:00
fix(tests): wait 100ms when main window is focused
This commit is contained in:
parent
ca7c145dee
commit
4342cfe515
1 changed files with 9 additions and 6 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue