@@ -19,6 +19,7 @@
20import logging
20import logging
22+import ubuntuuitoolkit
22from autopilot import logging as autopilot_logging
23from autopilot import logging as autopilot_logging
23from autopilot import input
24from autopilot import input
@@ -169,3 +170,20 @@ class QQuickView(emulators.UnityEmulatorBase):
169class IndicatorPage(emulators.UnityEmulatorBase):
170class IndicatorPage(emulators.UnityEmulatorBase):
171 """Autopilot helper for the IndicatorPage component."""
172 """Autopilot helper for the IndicatorPage component."""
175+class QQuickFlickable(ubuntuuitoolkit.QQuickFlickable):
177+ def swipe_to_x_end(self):
179+ containers = self._get_containers()
180+ while not self.atXEnd:
181+ self.swipe_to_show_x_end(containers)
183+ def swipe_to_show_x_end(self, containers):
184+ start_y = stop_y = self.globalRect.y + (self.globalRect.height // 2)
185+ start_x = self.globalRect.x + self.globalRect.width - 5
186+ stop_x = self.globalRect.x + 5
187+ self._slow_drag(start_x, stop_x, start_y, stop_y)
188+ self.dragging.wait_for(False)
189+ self.moving.wait_for(False)