diff options
| author | Omer Akram <om26er@ubuntu.com> | 2012-09-10 02:49:44 -0400 |
|---|---|---|
| committer | Tarmac <> | 2012-09-10 02:49:44 -0400 |
| commit | d0d706a9bf8d05e4821ad72aed8888b0aeefe61b (patch) | |
| tree | 53be585c6988862ea422cbab75c7a0d2eb62581d | |
| parent | e2fe2d5937afd0fd2ee4c6837ed1fb4574f3137b (diff) | |
| parent | 48b1b7aa26c617837484e46db9f6448364632d8c (diff) | |
manual-test to AP; automate different scenarios to check successful launcher keynav. Fixes: . Approved by Christopher Lee.
(bzr r2674)
| -rw-r--r-- | manual-tests/Launcher.txt | 47 | ||||
| -rw-r--r-- | tests/autopilot/unity/tests/launcher/test_icon_behavior.py | 21 | ||||
| -rw-r--r-- | tests/autopilot/unity/tests/launcher/test_keynav.py | 36 |
3 files changed, 57 insertions, 47 deletions
diff --git a/manual-tests/Launcher.txt b/manual-tests/Launcher.txt index fff9f0e9f..0b1206518 100644 --- a/manual-tests/Launcher.txt +++ b/manual-tests/Launcher.txt @@ -63,23 +63,6 @@ Expected Result: Verify each icon gets highlighted from top to bottom. -Test Alt+F1 KeyNavMode Mouse Works -------------------------------- -This test shows that the mouse still works normally while keynav mode is active. - -Setup: - -Actions: -#. Press Alt+F1 to enter keynav mode -#. Using the mouse perform a normal action (such as dragging a window) - -Expected Result: - The keynav mode exits, along with the mouse performing the normal action - the user expects. Such as highlighting text, moving a window, clicking out - of keynav mode, or clicking on a launcher icon. All these actions should - also exit the keynav mode. - - Test Alt+F1 KeyNavMode Shortcuts ----------------------------- This test shows that all the shortcuts work and also exits from keynav mode. @@ -102,21 +85,6 @@ Expected Result: closing the keynav mode. -Test Alt+F1 NavMode Quicklist Click Exit ----------------------------------------- -This Test shows that clicking on a quicklist option quits keynav mode. - -Setup: - -Actions: -#. Press Alt+F1 to enter keynav mode -#. Press Right arrow -#. Click on any option - -Expected Result: - No matter what option you click will exit keynav mode. - - Drag Icons to Trash ------------------- @@ -299,21 +267,6 @@ Expected Result: compiz process should be much lower than 50. -Test Quicklist while on Expo ------------------------------ -This test shows how the launcher quicklists work when the expo plugin is activated. - -Setup: -#. Start with a clear screen -#. Press Super+S or select the workspace switcher on the launcher - -Actions: -#. When the workspace switcher is running, right-click over a launcher icon - -Expected Result: - The expo should terminate, and the quicklist should be shown once the - workspace switcher has been closed. - Test highlight BFB ------------------- This test shows that the BFB launcher icon highlights during key navigation. diff --git a/tests/autopilot/unity/tests/launcher/test_icon_behavior.py b/tests/autopilot/unity/tests/launcher/test_icon_behavior.py index 798283d21..f24a73c71 100644 --- a/tests/autopilot/unity/tests/launcher/test_icon_behavior.py +++ b/tests/autopilot/unity/tests/launcher/test_icon_behavior.py @@ -150,6 +150,27 @@ class LauncherIconsTests(LauncherTestCase): self.assertThat(calc_icon, NotEquals(None)) self.assertThat(calc_icon.visible, Eventually(Equals(True))) + def test_right_click_on_icon_ends_expo(self): + """Right click on a launcher icon in expo mode must end the expo + and show the quicklist. + + """ + self.keybinding("expo/start") + self.addCleanup(self.keybinding, "expo/cancel") + + bfb = self.launcher.model.get_bfb_icon() + self.mouse.move(bfb.center_x, bfb.center_y) + self.mouse.click(button=3) + + self.assertThat(self.launcher_instance.quicklist_open, Eventually(Equals(True))) + + monitor = self.screen_geo.get_primary_monitor() + self.panel = self.panels.get_panel_for_monitor(monitor) + + # When workspace switcher is opened the panel title is "Ubuntu Desktop" so we check + # to make sure that workspace switcher end. + self.assertThat(self.panels.get_active_panel().title, Eventually(NotEquals("Ubuntu Desktop"))) + class LauncherDragIconsBehavior(LauncherTestCase): """Tests dragging icons around the Launcher.""" diff --git a/tests/autopilot/unity/tests/launcher/test_keynav.py b/tests/autopilot/unity/tests/launcher/test_keynav.py index cf4a79f4e..474463a30 100644 --- a/tests/autopilot/unity/tests/launcher/test_keynav.py +++ b/tests/autopilot/unity/tests/launcher/test_keynav.py @@ -198,3 +198,39 @@ class LauncherKeyNavTests(LauncherTestCase): self.assertThat(self.hud.visible, Equals(False)) self.assertThat(self.launcher.key_nav_is_active, Equals(True)) + + def test_launcher_keynav_cancel_on_click_outside(self): + """A single click outside of launcher must cancel keynav.""" + self.start_keynav_with_cleanup_cancel() + + self.launcher_instance.move_mouse_to_right_of_launcher() + self.mouse.click() + + self.assertThat(self.launcher.key_nav_is_active, Eventually(Equals(False))) + + def test_launcher_keynav_cancel_on_click_icon(self): + """A single click on a launcher icon must cancel keynav.""" + calc_win = self.start_app_window('Calculator', locale = 'C') + calc_app = calc_win.application + calc_icon = self.launcher.model.get_icon(desktop_id=calc_app.desktop_file) + + self.start_keynav_with_cleanup_cancel() + + self.launcher_instance.click_launcher_icon(calc_icon) + + self.assertThat(self.launcher.key_nav_is_active, Eventually(Equals(False))) + + def test_launcher_keynav_cancel_on_quicklist_activate(self): + """A single click on a quicklist item must cancel keynav.""" + self.start_keynav_with_cleanup_cancel() + self.launcher_instance.key_nav_enter_quicklist() + + bfb_icon = self.launcher.model.get_bfb_icon() + bfb_ql = bfb_icon.get_quicklist() + + bfb_ql.click_item(bfb_ql.selected_item) + self.addCleanup(self.dash.ensure_hidden) + + self.assertThat(self.dash.visible, Eventually(Equals(True))) + self.assertThat(self.launcher.key_nav_is_active, Eventually(Equals(False))) + |
