diff options
| -rw-r--r-- | manual-tests/Hud.txt | 18 | ||||
| -rw-r--r-- | tests/autopilot/unity/tests/test_hud.py | 25 |
2 files changed, 25 insertions, 18 deletions
diff --git a/manual-tests/Hud.txt b/manual-tests/Hud.txt index ed056f8fa..d3d4ac445 100644 --- a/manual-tests/Hud.txt +++ b/manual-tests/Hud.txt @@ -1,21 +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. - 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 0fbbf57cf..14a151418 100644 --- a/tests/autopilot/unity/tests/test_hud.py +++ b/tests/autopilot/unity/tests/test_hud.py @@ -335,6 +335,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}), |
