~phablet-team/webbrowser-app/staging

« back to all changes in this revision

Viewing changes to tests/autopilot/webbrowser_app/tests/test_new_tab_view.py

  • Committer: Olivier Tilloy
  • Date: 2016-10-11 16:17:11 UTC
  • mfrom: (1556.2.1 staging)
  • Revision ID: olivier.tilloy@canonical.com-20161011161711-as8y2hz2q90beic1
Fix drag’n’drop of bookmarks within the new tab view.

Show diffs side-by-side

added added

removed removed

Lines of Context:
440
440
        folder = folders[0]
441
441
        folder_cx = folder.globalRect.x + folder.width / 2
442
442
        folder_cy = folder.globalRect.y + folder.height / 2
443
 
        # Work around https://launchpad.net/bugs/1499437 by dragging downwards
444
 
        # a little bit first, then to the target folder.
445
 
        self.pointing_device.move_to_object(grip)
446
 
        pos = self.pointing_device.position()
447
 
        self.pointing_device.press()
448
 
        self.pointing_device.move(pos[0], pos[1] + 20)
449
 
        self.pointing_device.move(folder_cx, folder_cy)
450
 
        self.pointing_device.release()
 
443
        self.pointing_device.drag(rect.x, rect.y, folder_cx, folder_cy)
451
444
        self.assertThat(grip.globalRect, Eventually(Equals(rect)))
452
445
 
453
446
        # Test that dragging an item to another folder removes it from this one