summaryrefslogtreecommitdiff
path: root/tests/autopilot
diff options
authorThomi Richards <thomi.richards@canonical.com>2012-07-11 08:44:07 +1200
committerThomi Richards <thomi.richards@canonical.com>2012-07-11 08:44:07 +1200
commitcb2730bbc182eb00a3f181a7a804169b191b8ff3 (patch)
treedd34775af131ef4dbf83fad6948dc77dea25dcb8 /tests/autopilot
parente9d5bf496b9b0430062db47af933e22473c25c8b (diff)
parentdfc194aab1b2ba6cdbd301152f621f9ee7259c74 (diff)
Merged trunk.
(bzr r2480.2.4)
Diffstat (limited to 'tests/autopilot')
-rw-r--r--tests/autopilot/unity/tests/test_dash.py9
-rw-r--r--tests/autopilot/unity/tests/test_hud.py9
-rw-r--r--tests/autopilot/unity/tests/test_switcher.py36
3 files changed, 18 insertions, 36 deletions
diff --git a/tests/autopilot/unity/tests/test_dash.py b/tests/autopilot/unity/tests/test_dash.py
index 4a1581b24..18190cb16 100644
--- a/tests/autopilot/unity/tests/test_dash.py
+++ b/tests/autopilot/unity/tests/test_dash.py
@@ -62,6 +62,15 @@ class DashRevealTests(DashTestCase):
self.keyboard.press_and_release("Alt+F4")
self.assertThat(self.dash.visible, Eventually(Equals(False)))
+ def test_alt_f4_close_dash_with_capslock_on(self):
+ """Dash must close on Alt+F4 even when the capslock is turned on."""
+ self.keyboard.press_and_release("Caps_Lock")
+ self.addCleanup(self.keyboard.press_and_release, "Caps_Lock")
+
+ self.dash.ensure_visible()
+ self.keyboard.press_and_release("Alt+F4")
+ self.assertThat(self.dash.visible, Eventually(Equals(False)))
+
def test_dash_closes_on_spread(self):
"""This test shows that when the spread is initiated, the dash closes."""
self.dash.ensure_visible()
diff --git a/tests/autopilot/unity/tests/test_hud.py b/tests/autopilot/unity/tests/test_hud.py
index 01e9a2451..6a989387b 100644
--- a/tests/autopilot/unity/tests/test_hud.py
+++ b/tests/autopilot/unity/tests/test_hud.py
@@ -254,6 +254,15 @@ class HudBehaviorTests(HudTestsBase):
self.keyboard.press_and_release("Alt+F4")
self.assertThat(self.hud.visible, Eventually(Equals(False)))
+ def test_alt_f4_close_hud_with_capslock_on(self):
+ """Hud must close on Alt+F4 even when the capslock is turned on."""
+ self.keyboard.press_and_release("Caps_Lock")
+ self.addCleanup(self.keyboard.press_and_release, "Caps_Lock")
+
+ self.hud.ensure_visible()
+ self.keyboard.press_and_release("Alt+F4")
+ self.assertThat(self.hud.visible, Eventually(Equals(False)))
+
class HudLauncherInteractionsTests(HudTestsBase):
diff --git a/tests/autopilot/unity/tests/test_switcher.py b/tests/autopilot/unity/tests/test_switcher.py
index 5324050c3..52254ea2d 100644
--- a/tests/autopilot/unity/tests/test_switcher.py
+++ b/tests/autopilot/unity/tests/test_switcher.py
@@ -100,42 +100,6 @@ class SwitcherTests(SwitcherTestCase):
self.switcher.terminate()
- def test_switcher_scroll_next_ignores_fast_events(self):
- """Ensures that smoothing is working correctly for next icon scrolling.
-
- Only the first event in a rapid fire string of events should be acted upon.
- The rest ignored.
-
- """
- self.switcher.initiate()
- self.addCleanup(self.switcher.terminate)
-
- # Quickly repeated events should be ignored (except the first)
- start = self.switcher.selection_index
- self.switcher.next_via_mouse()
- self.switcher.next_via_mouse()
- self.switcher.next_via_mouse()
-
- self.assertThat(self.switcher.selection_index, Equals(start + 1))
-
- def test_switcher_scroll_prev_ignores_fast_events(self):
- """Ensures that smoothing is working correctly for previous icon scrolling.
-
- Only the first event in a rapid fire string of events should be acted upon.
- The rest ignored.
-
- """
- self.switcher.initiate()
- self.addCleanup(self.switcher.terminate)
-
- # Quickly repeatead events should be ignored (except the first)
- start = self.switcher.selection_index
- self.switcher.previous_via_mouse()
- self.switcher.previous_via_mouse()
- self.switcher.previous_via_mouse()
-
- self.assertThat(self.switcher.selection_index, Equals(start - 1))
-
def test_switcher_arrow_key_does_not_init(self):
"""Ensure that Alt+Right does not initiate switcher.