@@ -227,12 +227,14 @@ Item {
227 var stepAnimation = findInvisibleChild(carouselList, "stepAnimation");
227 var stepAnimation = findInvisibleChild(carouselList, "stepAnimation");
228 var stepDiff = 0;
228 var stepDiff = 0;
229 stepAnimation.onRunningChanged.connect(function() { if (stepAnimation.running) stepDiff = Math.abs(carouselList.contentX - stepAnimation.to); })
229 stepAnimation.onRunningChanged.connect(function() { if (stepAnimation.running) stepDiff = Math.abs(carouselList.contentX - stepAnimation.to); })
230+ var overshootOnce = false;
231+ while (!overshootOnce) {
230− while (carouselList.realContentX < carouselList.realContentWidth - carouselList.realWidth) {
232+ overshootOnce = carouselList.realContentX > carouselList.realContentWidth - carouselList.realWidth;
231 mouseFlick(carousel, carousel.width - units.gu(1),
233 mouseFlick(carousel, carousel.width - units.gu(1),
232 carousel.height / 2,
234 carousel.height / 2,
233 units.gu(2),
235 units.gu(2),
234 carousel.height / 2);
236 carousel.height / 2);
235− wait(1000);
237+ tryCompare(carouselList, "moving", false);
237 verify(stepDiff < 1);
239 verify(stepDiff < 1);
238 var x = carouselList.getXFromContinuousIndex(carousel.model - 1);
240 var x = carouselList.getXFromContinuousIndex(carousel.model - 1);