on xenial help sign in
Do not use 5 max iterations hardcoded in flickToYEnd, makes no sense
commitb8d7afdb159200df5e0fd8bf1785afa3e5838046 authorAlbert Astals Cid <albert.astals@canonical.com> dateThu 26 Nov 2015, 17:36 (11 years ago) parentac1db5a
1 file changed+2−1
tests/utils/modules/Unity/Test/UnityTestCase.qml+2−1
tests/utils/modules/Unity/Test/UnityTestCase.qml+2−1
@@ -239,7 +239,8 @@ TestCase {
239239 var x = item.width / 2;
240240 var y = item.height - units.gu(1);
241241 var toY = units.gu(1);
242− while (i < 5 && !item.atYEnd) {
242+ var maxIterations = 5 + item.contentHeight / item.height;
243+ while (i < maxIterations && !item.atYEnd) {
243244 touchFlick(item, x, y, x, toY);
244245 tryCompare(item, "moving", false);
245246 ++i;