autotests: Make testTranslucency less flaky

There's a race condition between the window becoming ready for painting
and testing the translucency animation.
This commit is contained in:
Vlad Zahorodnii 2024-07-08 15:39:49 +03:00
parent 51d01a6616
commit d2df8ea9aa

View file

@ -130,6 +130,9 @@ void TranslucencyTest::testMoveAfterDesktopChange()
QCOMPARE(window->window(), windowId); QCOMPARE(window->window(), windowId);
QVERIFY(window->isDecorated()); QVERIFY(window->isDecorated());
QMetaObject::invokeMethod(window, "setReadyForPainting");
QVERIFY(window->readyForPainting());
QCOMPARE(windowAddedSpy.count(), 1); QCOMPARE(windowAddedSpy.count(), 1);
QVERIFY(!m_translucencyEffect->isActive()); QVERIFY(!m_translucencyEffect->isActive());
// let's send the window to desktop 2 // let's send the window to desktop 2