diff options
| author | Brandon Schaefer <brandontschaefer@gmail.com> | 2012-08-01 16:29:49 -0700 |
|---|---|---|
| committer | Brandon Schaefer <brandontschaefer@gmail.com> | 2012-08-01 16:29:49 -0700 |
| commit | a36aeb9efb9a6cea276bd97c524a2a723e0f33d6 (patch) | |
| tree | b8b1c03a1455834369f3273301428836be0242fa /tests | |
| parent | b70fb51d7f6d1d334945ce5f016051e09084f124 (diff) | |
* Fixes right clicking ql
(bzr r2529.11.1)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/autopilot/unity/tests/test_quicklist.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/autopilot/unity/tests/test_quicklist.py b/tests/autopilot/unity/tests/test_quicklist.py index 03d9747a2..bcd3ae328 100644 --- a/tests/autopilot/unity/tests/test_quicklist.py +++ b/tests/autopilot/unity/tests/test_quicklist.py @@ -155,6 +155,44 @@ class QuicklistActionTests(UnityTestCase): self.addCleanup(self.dash.ensure_hidden) self.assertThat(self.dash.visible, Eventually(Equals(True))) + def test_right_click_opens_quicklist_if_already_open(self): + """A right click to another icon in the launcher must + close the current open quicklist and open the other + icons quicklist. + lp:890991 + """ + + calc_win = self.start_app_window("Calculator") + mahj_win = self.start_app_window("Mahjongg") + + calc_icon = self.launcher.model.get_icon( + desktop_id=calc_win.application.desktop_file) + mahj_icon = self.launcher.model.get_icon( + desktop_id=mahj_win.application.desktop_file) + + calc_ql = self.open_quicklist_for_icon(calc_icon) + self.assertThat(calc_ql.active, Eventually(Equals(True))) + + mahj_ql = self.open_quicklist_for_icon(mahj_icon) + self.assertThat(mahj_ql.active, Eventually(Equals(True))) + self.assertThat(calc_ql.active, Eventually(Equals(False))) + + def test_right_clicking_same_icon_doesnt_reopen_ql(self): + """A right click to the same icon in the launcher must + not re-open the quicklist if already open. It must hide. + """ + + calc_win = self.start_app_window("Calculator") + + calc_icon = self.launcher.model.get_icon( + desktop_id=calc_win.application.desktop_file) + + calc_ql = self.open_quicklist_for_icon(calc_icon) + self.assertThat(calc_ql.active, Eventually(Equals(True))) + + calc_ql = self.open_quicklist_for_icon(calc_icon) + self.assertThat(calc_ql.active, Eventually(Equals(False))) + class QuicklistKeyNavigationTests(UnityTestCase): """Tests for the quicklist key navigation.""" |
