Merge lp:~azzar1/unity/lp-1191039 into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Andrea Azzarone
Approved revision: no longer in the source branch.
Merged at revision: 3372
Proposed branch: lp:~azzar1/unity/lp-1191039
Merge into: lp:unity
Diff against target: 15 lines (+3/-1)
1 file modified
tests/autopilot/unity/tests/test_switcher.py (+3/-1)
To merge this branch: bzr merge lp:~azzar1/unity/lp-1191039
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Marco Trevisan (Treviño) Approve
Review via email: mp+169463@code.launchpad.net

Commit message

Fix failing AP test.

Description of the change

== Problem ==
unity.tests.test_switcher.SwitcherTests.test_switcher_move_prev(show_desktop_icon_true) fails

== Fix ==
Wrap-around the index.

== Test ==
N/A.

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
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/tests/test_switcher.py'
2--- tests/autopilot/unity/tests/test_switcher.py 2013-05-01 17:52:15 +0000
3+++ tests/autopilot/unity/tests/test_switcher.py 2013-06-14 15:40:33 +0000
4@@ -138,8 +138,10 @@
5
6 start = self.unity.switcher.selection_index
7 self.unity.switcher.previous_icon()
8+ # Allow for wrap-around to last icon in switcher
9+ prev_index = (start - 1) % len(self.unity.switcher.icons)
10
11- self.assertThat(self.unity.switcher.selection_index, Eventually(Equals(start - 1)))
12+ self.assertThat(self.unity.switcher.selection_index, Eventually(Equals(prev_index)))
13
14 def test_switcher_scroll_next(self):
15 """Test that scrolling the mouse wheel down moves to the next icon"""