From 4688a73f9bc8aab8f64ae8eee64d19e7bb5f63b7 Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Thu, 8 Sep 2016 16:39:47 +0200 Subject: Fix test_scrollPositionAfterReload quick auto test Wait for scroll position change before reload. Task-number: QTBUG-55855 Change-Id: Ia42af1a4a76b2c507f4a88b39a469e3e37184ef7 Reviewed-by: Adam Kallai Reviewed-by: Allan Sandfeld Jensen --- tests/auto/quick/qmltests/data/tst_scrollPosition.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/auto') diff --git a/tests/auto/quick/qmltests/data/tst_scrollPosition.qml b/tests/auto/quick/qmltests/data/tst_scrollPosition.qml index 08bb0f3b4..55b71189d 100644 --- a/tests/auto/quick/qmltests/data/tst_scrollPosition.qml +++ b/tests/auto/quick/qmltests/data/tst_scrollPosition.qml @@ -69,7 +69,11 @@ TestWebEngineView { tryCompare(webEngineView.scrollPosition, "y", 0); keyPress(Qt.Key_Return); // Focus is on the scroll button. - scrollPositionSpy.wait(); + + // Wait for proper scroll position change otherwise we cannot expect + // the new y position after reload. + tryCompare(webEngineView.scrollPosition, "x", 0); + tryCompare(webEngineView.scrollPosition, "y", 600); webEngineView.reload(); verify(webEngineView.waitForLoadSucceeded()); -- cgit v1.2.3