on xenial help sign in
Use timeStep as delay time
commit3ad24fa8969ae1eb5d0fcb2f7d929a09afa8298a authorAlbert Astals Cid <albert.astals@canonical.com> dateMon 21 Nov 2016, 12:25 (10 years ago) parent3893655
1 file changed+4−4
tests/utils/modules/Unity/Test/UnityTestCase.qml+4−4
tests/utils/modules/Unity/Test/UnityTestCase.qml+4−4
@@ -163,9 +163,9 @@ TestCase {
163163 if (i === iterations - 1) {
164164 // Avoid any rounding errors by making the last move be at precisely
165165 // the point specified
166− mouseMove(item, toX, toY, iterations / speed)
166+ mouseMove(item, toX, toY, timeStep)
167167 } else {
168− mouseMove(item, x + (i + 1) * diffX, y + (i + 1) * diffY, iterations / speed)
168+ mouseMove(item, x + (i + 1) * diffX, y + (i + 1) * diffY, timeStep)
169169 }
170170 }
171171 if (releaseMouse) {
@@ -346,12 +346,12 @@ TestCase {
346346 if (i === iterations - 1) {
347347 // Avoid any rounding errors by making the last move be at precisely
348348 // the point specified
349− wait(iterations / speed)
349+ wait(timeStep)
350350 var event = touchEvent(item)
351351 event.move(0 /* touchId */, rootTo.x, rootTo.y)
352352 event.commit()
353353 } else {
354− wait(iterations / speed)
354+ wait(timeStep)
355355 var event = touchEvent(item)
356356 event.move(0 /* touchId */, rootFrom.x + (i + 1) * diffX, rootFrom.y + (i + 1) * diffY)
357357 event.commit()