Merge lp:~bregma/unity/fix-overlay-tests-multimonitor into lp:unity

Proposed by Stephen M. Webb
Status: Merged
Approved by: Christopher Townsend
Approved revision: no longer in the source branch.
Merged at revision: 3653
Proposed branch: lp:~bregma/unity/fix-overlay-tests-multimonitor
Merge into: lp:unity
Diff against target: 33 lines (+14/-2)
1 file modified
tests/autopilot/unity/tests/test_panel.py (+14/-2)
To merge this branch: bzr merge lp:~bregma/unity/fix-overlay-tests-multimonitor
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Christopher Townsend Approve
Review via email: mp+206002@code.launchpad.net

Commit message

add multi-mointor support to a couple of tests where it got misssed

Description of the change

Added multi-mointor support to a couple of tests where it got misssed.

To post a comment you must log in.
Revision history for this message
Christopher Townsend (townsend) wrote :

LGTM

review: Approve
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_panel.py'
2--- tests/autopilot/unity/tests/test_panel.py 2014-02-11 20:09:02 +0000
3+++ tests/autopilot/unity/tests/test_panel.py 2014-02-12 16:41:06 +0000
4@@ -297,7 +297,13 @@
5 self.unity.dash.ensure_visible()
6 self.addCleanup(self.unity.dash.ensure_hidden)
7
8- self.assertThat(self.unity.dash.view.overlay_window_buttons_shown, Eventually(Equals(True)))
9+ for monitor in range(0, self.display.get_num_screens()):
10+ panel = self.unity.panels.get_panel_for_monitor(monitor)
11+
12+ if self.unity.dash.monitor == monitor:
13+ self.assertThat(self.unity.dash.view.overlay_window_buttons_shown[monitor], Equals(True))
14+ else:
15+ self.assertThat(self.unity.dash.view.overlay_window_buttons_shown[monitor], Equals(False))
16
17 def test_window_buttons_work_in_dash_after_launcher_resize(self):
18 """When the launcher icons are resized, the window
19@@ -320,7 +326,13 @@
20 self.unity.hud.ensure_visible()
21 self.addCleanup(self.unity.hud.ensure_hidden)
22
23- self.assertThat(self.unity.hud.view.overlay_window_buttons_shown, Eventually(Equals(True)))
24+ for monitor in range(0, self.display.get_num_screens()):
25+ panel = self.unity.panels.get_panel_for_monitor(monitor)
26+
27+ if self.unity.hud.monitor == monitor:
28+ self.assertThat(self.unity.hud.view.overlay_window_buttons_shown[monitor], Equals(True))
29+ else:
30+ self.assertThat(self.unity.hud.view.overlay_window_buttons_shown[monitor], Equals(False))
31
32 def test_window_buttons_update_visual_state(self):
33 """Window button must update its state in response to mouse events."""