Merge lp:~om26er/unity/autopilot_test_lp_1045752 into lp:unity

Proposed by Omer Akram
Status: Merged
Approved by: Neil J. Patel
Approved revision: no longer in the source branch.
Merged at revision: 2700
Proposed branch: lp:~om26er/unity/autopilot_test_lp_1045752
Merge into: lp:unity
Diff against target: 32 lines (+22/-0)
1 file modified
tests/autopilot/unity/tests/test_dash.py (+22/-0)
To merge this branch: bzr merge lp:~om26er/unity/autopilot_test_lp_1045752
Reviewer Review Type Date Requested Status
Neil J. Patel (community) Approve
Review via email: mp+124708@code.launchpad.net

Commit message

write AP test for bug 1045752

Description of the change

write AP test for bug 1045752

To post a comment you must log in.
Revision history for this message
Neil J. Patel (njpatel) :
review: Approve

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_dash.py'
2--- tests/autopilot/unity/tests/test_dash.py 2012-09-13 10:56:42 +0000
3+++ tests/autopilot/unity/tests/test_dash.py 2012-09-17 15:04:26 +0000
4@@ -846,6 +846,28 @@
5
6 self.assertThat(self.dash.preview_displaying, Eventually(Equals(False)))
7
8+ def test_left_click_on_preview_image_cancel_preview(self):
9+ """Left click on preview image must cancel the preview."""
10+ cover_art = self.preview_container.current_preview.cover_art
11+
12+ tx = cover_art.x + (cover_art.width / 2)
13+ ty = cover_art.y + (cover_art.height / 2)
14+ self.mouse.move(tx, ty)
15+ self.mouse.click(button=1)
16+
17+ self.assertThat(self.dash.preview_displaying, Eventually(Equals(False)))
18+
19+ def test_right_click_on_preview_image_cancel_preview(self):
20+ """Right click on preview image must cancel preview."""
21+ cover_art = self.preview_container.current_preview.cover_art
22+
23+ tx = cover_art.x + (cover_art.width / 2)
24+ ty = cover_art.y + (cover_art.height / 2)
25+ self.mouse.move(tx, ty)
26+ self.mouse.click(button=3)
27+
28+ self.assertThat(self.dash.preview_displaying, Eventually(Equals(False)))
29+
30
31 class DashDBusIfaceTests(DashTestCase):
32 """Test the Unity dash DBus interface."""