summaryrefslogtreecommitdiff
diff options
-rw-r--r--manual-tests/Hud.txt36
-rw-r--r--tests/autopilot/unity/tests/test_hud.py25
2 files changed, 25 insertions, 36 deletions
diff --git a/manual-tests/Hud.txt b/manual-tests/Hud.txt
index ac017e01b..d3d4ac445 100644
--- a/manual-tests/Hud.txt
+++ b/manual-tests/Hud.txt
@@ -1,39 +1,3 @@
-Hud Key-Navigation
------------
-This test ensures the hud key navigation is intact
-
-Setup:
-#. Ensure the messaging indicator is present
-
-Actions:
-#. Tap Alt
-#. Type "Message" to search for items from the messaging indicator
-#. Press down twice
-#. Press return
-
-Expected Result:
- The item selected will activate and the hud with disappear.
- If the hud does not disappear, this test failed.
- If the buttons under the search box do not highlight, this test failed.
-
-
-Hud Dismiss
-----------
-This test ensures that the hud is dismissable
-
-Setup:
-
-Actions:
-#. Tap Alt
-#. Type "test"
-#. Press escape
-#. Click anywhere on the screen that is not the hud interface
-
-Expected Result:
- After pressing escape in step three, the text "test" should be removed from the hud search
- After step four, the hud should dismiss itself and not be present.
-
-
Alt+Enter Crash
---------------
Tests that Alt+Enter does not cause unity to crash (LP: #960957)
diff --git a/tests/autopilot/unity/tests/test_hud.py b/tests/autopilot/unity/tests/test_hud.py
index 58ec70150..f682768b3 100644
--- a/tests/autopilot/unity/tests/test_hud.py
+++ b/tests/autopilot/unity/tests/test_hud.py
@@ -304,6 +304,31 @@ class HudBehaviorTests(HudTestsBase):
self.assertThat(file_contents, Equals('ABCD'))
+ def test_hud_key_navigation(self):
+ """This test ensures the hud key navigation is intact"""
+ # starting on a clean desktop because this way we are sure that our search
+ # string won't match any menu item from a focused application
+ self.window_manager.enter_show_desktop()
+ self.addCleanup(self.window_manager.leave_show_desktop)
+
+ self.hud.ensure_visible()
+
+ self.keyboard.type("settings")
+ self.assertThat(self.hud.search_string, Eventually(Equals("settings")))
+
+ self.keyboard.press_and_release('Down')
+ self.assertThat(self.hud.selected_button, Eventually(Equals(2)))
+ self.keyboard.press_and_release('Down')
+ self.assertThat(self.hud.selected_button, Eventually(Equals(3)))
+ self.keyboard.press_and_release('Enter')
+
+ # We are atleast sure that searching for "settings" on the desktop
+ # will reveal one of the settings panel of gnome control center.
+ self.addCleanup(self.close_all_app, "System Settings")
+
+ self.assertThat(self.hud.visible, Eventually(Equals(False)))
+
+
class HudLauncherInteractionsTests(HudTestsBase):
launcher_modes = [('Launcher autohide', {'launcher_autohide': False}),