diff options
| author | Thomi Richards <thomi.richards@canonical.com> | 2012-07-09 14:22:34 +1200 |
|---|---|---|
| committer | Thomi Richards <thomi.richards@canonical.com> | 2012-07-09 14:22:34 +1200 |
| commit | c927703bc3032caff4a5c880623b01b681dec2f0 (patch) | |
| tree | 9f635693f474aaad55e2731ccbdc3d6a3b05bf6e /tests/autopilot | |
| parent | e66f8153e8f86b123a86a5164bbac689908b6f9a (diff) | |
Fixed another test to use start_app_window method.
(bzr r2470.7.9)
Diffstat (limited to 'tests/autopilot')
| -rw-r--r-- | tests/autopilot/unity/tests/launcher/test_icon_behavior.py | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/tests/autopilot/unity/tests/launcher/test_icon_behavior.py b/tests/autopilot/unity/tests/launcher/test_icon_behavior.py index 14f8c5b72..cba07cdc4 100644 --- a/tests/autopilot/unity/tests/launcher/test_icon_behavior.py +++ b/tests/autopilot/unity/tests/launcher/test_icon_behavior.py @@ -100,23 +100,14 @@ class LauncherIconsTests(LauncherTestCase): """This tests shows that when you click on a launcher icon twice, when an application window is focused, the spread is initiated. """ - calc = self.start_app("Calculator") - [calc_win1] = calc.get_windows() - self.assertTrue(calc_win1.is_focused) - - self.start_app("Calculator") - # Sleeping due to the start_app only waiting for the bamf model to be - # updated with the application. Since the app has already started, - # and we are just waiting on a second window, however a defined sleep - # here is likely to be problematic. - # TODO: fix bamf emulator to enable waiting for new windows. - sleep(1) - [calc_win2] = [w for w in calc.get_windows() if w.x_id != calc_win1.x_id] + calc_win1 = self.start_app_window("Calculator") + calc_win2 = self.start_app_window("Calculator") + calc_app = calc_win1.application self.assertVisibleWindowStack([calc_win2, calc_win1]) - self.assertTrue(calc_win2.is_focused) + self.assert_window_focused(calc_win2) - calc_icon = self.launcher.model.get_icon_by_desktop_id(calc.desktop_file) + calc_icon = self.launcher.model.get_icon_by_desktop_id(calc_app.desktop_file) self.addCleanup(self.keybinding, "spread/cancel") self.launcher_instance.click_launcher_icon(calc_icon) |
