From 8dca992d09ea27c0e0479d0fba1757ae5815cfb4 Mon Sep 17 00:00:00 2001 From: Thomi Richards Date: Fri, 6 Jul 2012 08:53:21 +1200 Subject: test_panel_menu_accelerators_work test uses Eventually matcher. (bzr r2470.5.49) --- tests/autopilot/unity/tests/test_panel.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') 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") -- cgit v1.2.3