summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-01-24 11:23:48 +0100
committerUlf Hermann <ulf.hermann@qt.io>2019-01-24 10:31:39 +0000
commitea463aa2cf8986664aeb9c1f9246aa32c4abbfff (patch)
tree214e7e49f5d82dbb3079ad8635cae64205a9298c
parent71c3abeda241b3a80781dfb610b09bca3fd52ace (diff)
downloadqtquickcontrols-ea463aa2cf8986664aeb9c1f9246aa32c4abbfff.tar.gz
ScrollView Tests: Allow for delayed update when loading new data
The ScrollView can render multiple times before the content is complete. Change-Id: I32513a96e51c4d91e53daa6204821a95d9cb1d52 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
-rw-r--r--tests/auto/controls/data/tst_scrollview.qml8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/controls/data/tst_scrollview.qml b/tests/auto/controls/data/tst_scrollview.qml
index d3bfac4b..95aa6e98 100644
--- a/tests/auto/controls/data/tst_scrollview.qml
+++ b/tests/auto/controls/data/tst_scrollview.qml
@@ -197,8 +197,12 @@ TestCase {
mouseRelease(scrollView, scrollView.width - 2, 8 + 16)
waitForRendering(scrollView)
- verify(Math.round(scrollView.flickableItem.contentHeight) > 60 * 20)
- verify(Math.round(scrollView.flickableItem.contentY) < -(60 * 20))
+ tryVerify(
+ function() { return Math.round(scrollView.flickableItem.contentHeight) > 60 * 20 },
+ 50, "contentHeight did not adjust to new data.")
+ tryVerify(
+ function() { return Math.round(scrollView.flickableItem.contentY) < -(60 * 20) },
+ 50, "contentY did not adjust to new data.")
scrollView.destroy()
}