summaryrefslogtreecommitdiff
diff options
-rw-r--r--manual-tests/Launcher.txt47
-rw-r--r--tests/autopilot/unity/tests/launcher/test_icon_behavior.py21
-rw-r--r--tests/autopilot/unity/tests/launcher/test_keynav.py37
3 files changed, 58 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..e475aa6b0 100644
--- a/tests/autopilot/unity/tests/launcher/test_keynav.py
+++ b/tests/autopilot/unity/tests/launcher/test_keynav.py
@@ -198,3 +198,40 @@ 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.mouse.move(self.launcher_instance.x + (self.launcher_instance.width + 100),
+ self.launcher_instance.y + self.launcher_instance.height)
+ 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.addCleanup(self.dash.ensure_hidden)
+
+ self.keyboard.press_and_release("Right")
+
+ # Move mouse to the position of 'dash home' quicklist item of BFB.
+ self.mouse.move(self.launcher_instance.x + (self.launcher_instance.width + 50),
+ self.launcher_instance.y + (self.launcher_instance.height / 30))
+ self.mouse.click()
+
+ self.assertThat(self.launcher.key_nav_is_active, Eventually(Equals(False)))
+