diff options
| author | Thomi Richards <thomi.richards@canonical.com> | 2012-07-06 08:53:21 +1200 |
|---|---|---|
| committer | Thomi Richards <thomi.richards@canonical.com> | 2012-07-06 08:53:21 +1200 |
| commit | 8dca992d09ea27c0e0479d0fba1757ae5815cfb4 (patch) | |
| tree | 2ca25d5bc6ba97c34117d5d76d32f93e25f51aa8 /tests | |
| parent | dcdddde1c0462255eaed27e8d396fce5d386abab (diff) | |
test_panel_menu_accelerators_work test uses Eventually matcher.
(bzr r2470.5.49)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/autopilot/unity/tests/test_panel.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/autopilot/unity/tests/test_panel.py b/tests/autopilot/unity/tests/test_panel.py index 296601633..38e55a069 100644 --- a/tests/autopilot/unity/tests/test_panel.py +++ b/tests/autopilot/unity/tests/test_panel.py @@ -953,19 +953,19 @@ class PanelKeyNavigationTests(PanelTestsBase): self.assertThat(open_indicator.entry_id, Eventually(Equals(expected_indicator.entry_id))) self.keybinding("panel/open_first_menu") - sleep(.5) - self.assertThat(self.panel.get_active_indicator(), Equals(None)) + self.assertThat(self.panel.get_active_indicator(), Eventually(Equals(None))) def test_panel_menu_accelerators_work(self): + """Pressing a valid menu accelerator must open the correct menu item.""" self.open_new_application_window("Calculator") sleep(1) self.keyboard.press_and_release("Alt+c") self.addCleanup(self.keyboard.press_and_release, "Escape") - sleep(.5) + self.assertThat(self.panel.get_active_indicator, Eventually(NotEquals(None))) open_indicator = self.panel.get_active_indicator() - self.assertThat(open_indicator, NotEquals(None)) - self.assertThat(open_indicator.label, Equals("_Calculator")) + + self.assertThat(open_indicator.label, Eventually(Equals("_Calculator"))) def test_panel_indicators_key_navigation_next_works(self): self.open_new_application_window("Calculator") |
