diff options
| author | Brandon Schaefer <brandontschaefer@gmail.com> | 2013-09-12 03:12:04 +0000 |
|---|---|---|
| committer | Tarmac <> | 2013-09-12 03:12:04 +0000 |
| commit | 152ce83034bfcae03ee44e565956aefc155e4317 (patch) | |
| tree | c5274a36f93ada1fed81831ee3c78ea87f4941c0 /tests | |
| parent | ecb37a96405c96c15ff8552a9724275bea696c88 (diff) | |
| parent | da21bc141a7294aa6360eb5a071a72b5b44c5d7d (diff) | |
When the shortcut is open, and we receive a ButtonPress or KeyPress hide it. As this causes problems else where, and it really should close if the user attempts to do anything (even while holding super!). Fixes: https://bugs.launchpad.net/bugs/932718.
Approved by PS Jenkins bot, Marco Trevisan (TreviƱo). (bzr r3500)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/autopilot/unity/tests/test_shortcut_hint.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/autopilot/unity/tests/test_shortcut_hint.py b/tests/autopilot/unity/tests/test_shortcut_hint.py index 89610e850..0320516a7 100644 --- a/tests/autopilot/unity/tests/test_shortcut_hint.py +++ b/tests/autopilot/unity/tests/test_shortcut_hint.py @@ -125,11 +125,11 @@ class ShortcutHintInteractionsTests(BaseShortcutHintTests): self.addCleanup(self.keyboard.press_and_release, "Escape") self.keybinding("launcher/switcher/next") self.keybinding("launcher/switcher/next") - + sleep(switcher_timeout * 2) self.assertThat(self.unity.shortcut_hint.visible, Equals(False)) - + self.keybinding("launcher/switcher/prev") def test_launcher_switcher_prev_doesnt_show_shortcut_hint(self): @@ -172,3 +172,14 @@ class ShortcutHintInteractionsTests(BaseShortcutHintTests): self.assertThat(launcher.shortcuts_shown, Eventually(Equals(True))) self.assertThat(self.unity.shortcut_hint.visible, Eventually(Equals(True))) + + def test_shortcut_hint_closes_after_key_event(self): + """ The shortcut hint must close when a key event comes through.""" + + self.unity.shortcut_hint.show() + self.assertThat(self.unity.shortcut_hint.visible, Eventually(Equals(True))) + + self.addCleanup(self.unity.shortcut_hint.ensure_hidden) + + self.keyboard.press_and_release("Ctrl") + self.assertThat(self.unity.shortcut_hint.visible, Eventually(Equals(False))) |
