Skip to content

Commit b3424c7

Browse files
committed
Baseline tests: wait longer before taking a screen snapshot
The recorded images frequently show traces of a fading-out command prompt window that is opened by the test execution. We evidently have to wait longer for all window-level effects are finished. Pick-to: 6.5 Change-Id: I50db54ff33bf4bb1ef7c480a4aede1d5de1618c3 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
1 parent fed79b8 commit b3424c7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/baseline/shared/qwidgetbaselinetest.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,9 @@ QImage QWidgetBaselineTest::takeSnapshot()
124124
*/
125125
QImage QWidgetBaselineTest::takeScreenSnapshot(const QRect& windowRect)
126126
{
127-
// make sure all effects are done
128-
QTest::qWait(250);
127+
// make sure all effects are done - wait longer here because entire
128+
// windows might be fading in and out.
129+
QTest::qWait(750);
129130
return window->screen()->grabWindow(0, windowRect.x(), windowRect.y(),
130131
windowRect.width(), windowRect.height()).toImage();
131132
}

0 commit comments

Comments
 (0)