Merge lp:~townsend/unity/fix-failing-ap-drag-test into lp:unity

Proposed by Christopher Townsend
Status: Merged
Approved by: Brandon Schaefer
Approved revision: no longer in the source branch.
Merged at revision: 3518
Proposed branch: lp:~townsend/unity/fix-failing-ap-drag-test
Merge into: lp:unity
Diff against target: 12 lines (+1/-1)
1 file modified
tests/autopilot/unity/emulators/launcher.py (+1/-1)
To merge this branch: bzr merge lp:~townsend/unity/fix-failing-ap-drag-test
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Brandon Schaefer (community) Approve
Review via email: mp+186422@code.launchpad.net

Commit message

When dragging and dropping an icon before another icon, the calculation to position the drop was off by half an icon which would cause some AP tests to fail.

Description of the change

= Issue =
A couple of AP tests that test dragging icons were failing due to the icon not being correctly placed in the Launcher.

= Fix =
The calculation to find the correct place to drop the icon was off by half the height of the icon.

To post a comment you must log in.
Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

LGTM

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/autopilot/unity/emulators/launcher.py'
--- tests/autopilot/unity/emulators/launcher.py 2013-09-17 15:01:28 +0000
+++ tests/autopilot/unity/emulators/launcher.py 2013-09-18 18:43:39 +0000
@@ -377,7 +377,7 @@
377 if target_y < icon.center_y:377 if target_y < icon.center_y:
378 target_y += icon_height / 2378 target_y += icon_height / 2
379 if pos == IconDragType.BEFORE:379 if pos == IconDragType.BEFORE:
380 target_y -= icon_height380 target_y -= icon_height + (icon_height / 2)
381381
382 self.move_mouse_to_icon(icon)382 self.move_mouse_to_icon(icon)
383 self._mouse.press()383 self._mouse.press()