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
1=== modified file 'tests/autopilot/unity/emulators/launcher.py'
2--- tests/autopilot/unity/emulators/launcher.py 2013-09-17 15:01:28 +0000
3+++ tests/autopilot/unity/emulators/launcher.py 2013-09-18 18:43:39 +0000
4@@ -377,7 +377,7 @@
5 if target_y < icon.center_y:
6 target_y += icon_height / 2
7 if pos == IconDragType.BEFORE:
8- target_y -= icon_height
9+ target_y -= icon_height + (icon_height / 2)
10
11 self.move_mouse_to_icon(icon)
12 self._mouse.press()