on xenial help sign in
Remove the swipe to the left.
a75bf34Leo Arias
tests/autopilot/unity8/shell/emulators/launcher.py+4−11
@@ -35,24 +35,17 @@ class Launcher(emulators.UnityEmulatorBase):
35 def show(self):
35 def show(self):
36 """Show the launcher swiping it to the right."""
36 """Show the launcher swiping it to the right."""
37 if not self.shown:
37 if not self.shown:
38− self._swipe_launcher('right')
38+ self._swipe_to_show_launcher()
39 self.shown.wait_for(True)
39 self.shown.wait_for(True)
40 else:
40 else:
41 logger.debug('The launcher is already opened.')
41 logger.debug('The launcher is already opened.')
42
42
43− def _swipe_launcher(self, direction):
43+ def _swipe_to_show_launcher(self):
44 view = self.get_root_instance().select_single('QQuickView')
44 view = self.get_root_instance().select_single('QQuickView')
45 start_y = stop_y = view.y + view.height // 2
45 start_y = stop_y = view.y + view.height // 2
46
46
47− left = view.x + 1
47+ start_x = view.x + 1
48− right = left + self.panelWidth - 1
48+ stop_x = start_x + self.panelWidth - 1
49−
50− if direction == 'right':
51− start_x = left
52− stop_x = right
53− elif direction == 'left':
54− start_x = right
55− stop_x = left
56
49
57 self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
50 self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
58
51