summaryrefslogtreecommitdiff
diff options
authorAndrea Azzarone <azzaronea@gmail.com>2012-02-06 16:20:23 +0100
committerAndrea Azzarone <azzaronea@gmail.com>2012-02-06 16:20:23 +0100
commit19b6df4f828d6436ba6afc1c9fb607f9bba8fa28 (patch)
treef05e5c942b66901f3ddebb53cbcb9b748b0c2987
parent41bbfc43ff8dfc6ba2e14a6f3e8a5a919a530f0b (diff)
Improves the AP test.
(bzr r1899.2.6)
-rw-r--r--tests/autopilot/autopilot/tests/test_dash.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/autopilot/autopilot/tests/test_dash.py b/tests/autopilot/autopilot/tests/test_dash.py
index 4654d6cfc..35f26b437 100644
--- a/tests/autopilot/autopilot/tests/test_dash.py
+++ b/tests/autopilot/autopilot/tests/test_dash.py
@@ -78,17 +78,31 @@ class DashTests(AutopilotTestCase):
self.dash.ensure_hidden()
self.dash.toggle_reveal()
kb = Keyboard()
+
+ # Make sure that the lens bar can get the focus
i = 0
while self.dash.get_focused_len_icon() == "" and i < 100:
kb.press_and_release("Down")
i = i + 1
self.assertIsNot(self.dash.get_focused_len_icon(), '')
+
+ # Make sure that left - right work well
temp = self.dash.get_focused_len_icon()
kb.press_and_release("Right");
self.assertIsNot(self.dash.get_focused_len_icon(), temp)
kb.press_and_release("Left")
self.assertEqual(self.dash.get_focused_len_icon(), temp)
-
+
+ # Make sure that pressing 'Enter' we can change the lens...
+ kb.press_and_release("Right");
+ temp = self.dash.get_focused_len_icon();
+ kb.press_and_release("Enter");
+ self.assertEqual(self.dash.get_current_lens(), temp)
+
+ # ... the lens bar should lose the key focus
+ self.assertEqual(self.dash.get_focused_len_icon(), "")
+
+