aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2020-10-07 20:36:20 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2020-10-14 22:16:19 +0200
commitcd7481371ba5f9b328e9619fba98701dbe74530c (patch)
tree35f674fdaf96cc4f80237eac1281f0372a9a6020 /tests
parentf28e254d67ee319f39b88cb1b4a18915cfc5dc7a (diff)
Speed up tst_qquickflickable
Speed up animations that the test spends too much time waiting to complete. Change-Id: I7941660f3c3a89798c5cdd0eee8018a44fb89a0d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quick/qquickflickable/data/flickable03.qml3
-rw-r--r--tests/auto/quick/qquickflickable/data/nestedPressDelay.qml20
-rw-r--r--tests/auto/quick/qquickflickable/data/nestedStopAtBounds.qml19
-rw-r--r--tests/auto/quick/qquickflickable/data/overshoot.qml9
-rw-r--r--tests/auto/quick/qquickflickable/tst_qquickflickable.cpp3
5 files changed, 51 insertions, 3 deletions
diff --git a/tests/auto/quick/qquickflickable/data/flickable03.qml b/tests/auto/quick/qquickflickable/data/flickable03.qml
index 1549034576..5825bbe637 100644
--- a/tests/auto/quick/qquickflickable/data/flickable03.qml
+++ b/tests/auto/quick/qquickflickable/data/flickable03.qml
@@ -18,6 +18,9 @@ Flickable {
draggingInContentY = draggingInContentY && draggingVertically
}
+ // speed up test runs
+ flickDeceleration: 5000
+
Column {
id: column
Repeater {
diff --git a/tests/auto/quick/qquickflickable/data/nestedPressDelay.qml b/tests/auto/quick/qquickflickable/data/nestedPressDelay.qml
index 3cc0987141..2d1201d58b 100644
--- a/tests/auto/quick/qquickflickable/data/nestedPressDelay.qml
+++ b/tests/auto/quick/qquickflickable/data/nestedPressDelay.qml
@@ -9,6 +9,16 @@ Flickable {
contentHeight: 320
flickableDirection: Flickable.HorizontalFlick
pressDelay: 10000
+
+ // faster rebound to speed up test runs
+ rebound: Transition {
+ NumberAnimation {
+ properties: "x,y"
+ duration: 30
+ easing.type: Easing.OutBounce
+ }
+ }
+
MouseArea {
objectName: "filteringMouseArea"
x: 20
@@ -28,6 +38,16 @@ Flickable {
contentWidth: 1480
contentHeight: 400
pressDelay: 50
+
+ // faster rebound to speed up test runs
+ rebound: Transition {
+ NumberAnimation {
+ properties: "x,y"
+ duration: 30
+ easing.type: Easing.OutBounce
+ }
+ }
+
Rectangle {
y: 100
x: 80
diff --git a/tests/auto/quick/qquickflickable/data/nestedStopAtBounds.qml b/tests/auto/quick/qquickflickable/data/nestedStopAtBounds.qml
index 902920babc..f2d25b292f 100644
--- a/tests/auto/quick/qquickflickable/data/nestedStopAtBounds.qml
+++ b/tests/auto/quick/qquickflickable/data/nestedStopAtBounds.qml
@@ -11,6 +11,15 @@ Flickable {
contentHeight: 500
flickableDirection: inner.flickableDirection
+ // faster rebound to speed up test runs
+ rebound: Transition {
+ NumberAnimation {
+ properties: "x,y"
+ duration: 30
+ easing.type: Easing.OutBounce
+ }
+ }
+
Rectangle {
x: 100
y: 100
@@ -29,6 +38,16 @@ Flickable {
contentWidth: 400
contentHeight: 400
boundsBehavior: Flickable.StopAtBounds
+
+ // faster rebound to speed up test runs
+ rebound: Transition {
+ NumberAnimation {
+ properties: "x,y"
+ duration: 30
+ easing.type: Easing.OutBounce
+ }
+ }
+
Rectangle {
anchors.fill: parent
anchors.margins: 100
diff --git a/tests/auto/quick/qquickflickable/data/overshoot.qml b/tests/auto/quick/qquickflickable/data/overshoot.qml
index 4235156479..f08460a413 100644
--- a/tests/auto/quick/qquickflickable/data/overshoot.qml
+++ b/tests/auto/quick/qquickflickable/data/overshoot.qml
@@ -32,6 +32,15 @@ Flickable {
width: 200; height: 200
contentWidth: rect.width; contentHeight: rect.height
+ // faster rebound to speed up test runs
+ rebound: Transition {
+ NumberAnimation {
+ properties: "x,y"
+ duration: 30
+ easing.type: Easing.OutBounce
+ }
+ }
+
property real minContentY: 0
property real maxContentY: 0
onContentYChanged: {
diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
index 94f2451c97..9aed54b487 100644
--- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
+++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
@@ -1798,7 +1798,6 @@ void tst_qquickflickable::nestedStopAtBounds()
// drag away from the aligned boundary. Inner flickable dragged.
moveAndPress(&view, position);
- QTest::qWait(10);
axis += invert ? -threshold * 2 : threshold * 2;
QTest::mouseMove(&view, position);
axis += invert ? -threshold : threshold;
@@ -1822,7 +1821,6 @@ void tst_qquickflickable::nestedStopAtBounds()
// Drag inner with equal size and contentSize
moveAndPress(&view, position);
- QTest::qWait(10);
axis += invert ? -threshold * 2 : threshold * 2;
QTest::mouseMove(&view, position);
axis += invert ? -threshold : threshold;
@@ -1846,7 +1844,6 @@ void tst_qquickflickable::nestedStopAtBounds()
// Drag inner with size greater than contentSize
moveAndPress(&view, position);
- QTest::qWait(10);
axis += invert ? -threshold * 2 : threshold * 2;
QTest::mouseMove(&view, position);
axis += invert ? -threshold : threshold;