~vanvugt/unity/fix-1037408

« back to all changes in this revision

Viewing changes to tests/autopilot/unity/emulators/launcher.py

  • Committer: Tarmac
  • Author(s): Brandon Schaefer
  • Date: 2012-08-17 04:14:20 UTC
  • mfrom: (2540.8.11 launcher-autohide-fix)
  • Revision ID: tarmac-20120817041420-ohtbvamd5ghc84ho
The launcher will only autohide when the mouse leaves the launcher now.. Fixes: https://bugs.launchpad.net/bugs/745707. Approved by Thomi Richards.

Show diffs side-by-side

added added

removed removed

Lines of Context:
305
305
        self._perform_switcher_binding("launcher/switcher/down")
306
306
        self._get_controller().key_nav_selection.wait_for(NotEquals(old_selection))
307
307
 
308
 
    def click_launcher_icon(self, icon, button=1):
 
308
    def click_launcher_icon(self, icon, button=1, move_mouse_after=True):
309
309
        """Move the mouse over the launcher icon, and click it.
310
310
        `icon` must be an instance of SimpleLauncherIcon or it's descendants.
 
311
        `move_mouse_after` moves the mouse outside the launcher if true.
311
312
        """
312
313
        if not isinstance(icon, SimpleLauncherIcon):
313
314
            raise TypeError("icon must be a LauncherIcon, not %s" % type(icon))
324
325
                break
325
326
            self._mouse.move(target_x, target_y )
326
327
            sleep(1)
327
 
        self._mouse.click(button)
328
 
        self.move_mouse_to_right_of_launcher()
 
328
        self._mouse.click(button, press_duration)
 
329
        if (move_mouse_after):
 
330
          self.move_mouse_to_right_of_launcher()
329
331
 
330
332
    def drag_icon_to_position(self, icon, pos, drag_type=IconDragType.INSIDE):
331
333
        """Place the supplied icon above the icon in the position pos.