From d2df8ea9aa4df2b1018725d3f5f9b4a8bcb264d9 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Mon, 8 Jul 2024 15:39:49 +0300 Subject: [PATCH] autotests: Make testTranslucency less flaky There's a race condition between the window becoming ready for painting and testing the translucency animation. --- autotests/integration/effects/translucency_test.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autotests/integration/effects/translucency_test.cpp b/autotests/integration/effects/translucency_test.cpp index 9fc00b086f..b656a8dcf7 100644 --- a/autotests/integration/effects/translucency_test.cpp +++ b/autotests/integration/effects/translucency_test.cpp @@ -130,6 +130,9 @@ void TranslucencyTest::testMoveAfterDesktopChange() QCOMPARE(window->window(), windowId); QVERIFY(window->isDecorated()); + QMetaObject::invokeMethod(window, "setReadyForPainting"); + QVERIFY(window->readyForPainting()); + QCOMPARE(windowAddedSpy.count(), 1); QVERIFY(!m_translucencyEffect->isActive()); // let's send the window to desktop 2