diff options
| author | Brandon Schaefer <brandontschaefer@gmail.com> | 2012-08-09 15:22:56 -0400 |
|---|---|---|
| committer | Tarmac <> | 2012-08-09 15:22:56 -0400 |
| commit | b0ecb1e6fde3ec34548848f7516d096bbbbf02aa (patch) | |
| tree | 16ff4288307557d1de500a9431878f54f94a65e7 | |
| parent | 9809a10875db0307c480a2bccc988d794249b33c (diff) | |
| parent | a14dcef79c882576ca4d069d9c4939ee99d75309 (diff) | |
Calculator and Mahjongg can only have 1 instances now; this breaks AP tests. Character map is now used when you need more then 1 instance.. Fixes: . Approved by Ćukasz Zemczak.
(bzr r2544)
| -rw-r--r-- | tests/autopilot/unity/tests/launcher/test_icon_behavior.py | 58 | ||||
| -rw-r--r-- | tests/autopilot/unity/tests/test_panel.py | 4 | ||||
| -rw-r--r-- | tests/autopilot/unity/tests/test_quicklist.py | 36 | ||||
| -rw-r--r-- | tests/autopilot/unity/tests/test_switcher.py | 36 |
4 files changed, 67 insertions, 67 deletions
diff --git a/tests/autopilot/unity/tests/launcher/test_icon_behavior.py b/tests/autopilot/unity/tests/launcher/test_icon_behavior.py index bd6eab38c..798283d21 100644 --- a/tests/autopilot/unity/tests/launcher/test_icon_behavior.py +++ b/tests/autopilot/unity/tests/launcher/test_icon_behavior.py @@ -66,50 +66,50 @@ class LauncherIconsTests(LauncherTestCase): of that application. """ - mah_win1 = self.start_app_window("Mahjongg") + char_win1 = self.start_app_window("Character Map") calc_win = self.start_app_window("Calculator") - mah_win2 = self.start_app_window("Mahjongg") + char_win2 = self.start_app_window("Character Map") - self.assertVisibleWindowStack([mah_win2, calc_win, mah_win1]) + self.assertVisibleWindowStack([char_win2, calc_win, char_win1]) - mahj_icon = self.launcher.model.get_icon( - desktop_id=mah_win2.application.desktop_file) + char_icon = self.launcher.model.get_icon( + desktop_id=char_win2.application.desktop_file) calc_icon = self.launcher.model.get_icon( desktop_id=calc_win.application.desktop_file) self.launcher_instance.click_launcher_icon(calc_icon) self.assertProperty(calc_win, is_focused=True) - self.assertVisibleWindowStack([calc_win, mah_win2, mah_win1]) + self.assertVisibleWindowStack([calc_win, char_win2, char_win1]) - self.launcher_instance.click_launcher_icon(mahj_icon) - self.assertProperty(mah_win2, is_focused=True) - self.assertVisibleWindowStack([mah_win2, calc_win, mah_win1]) + self.launcher_instance.click_launcher_icon(char_icon) + self.assertProperty(char_win2, is_focused=True) + self.assertVisibleWindowStack([char_win2, calc_win, char_win1]) self.keybinding("window/minimize") - self.assertThat(lambda: mah_win2.is_hidden, Eventually(Equals(True))) + self.assertThat(lambda: char_win2.is_hidden, Eventually(Equals(True))) self.assertProperty(calc_win, is_focused=True) - self.assertVisibleWindowStack([calc_win, mah_win1]) + self.assertVisibleWindowStack([calc_win, char_win1]) - self.launcher_instance.click_launcher_icon(mahj_icon) - self.assertProperty(mah_win1, is_focused=True) - self.assertThat(lambda: mah_win2.is_hidden, Eventually(Equals(True))) - self.assertVisibleWindowStack([mah_win1, calc_win]) + self.launcher_instance.click_launcher_icon(char_icon) + self.assertProperty(char_win1, is_focused=True) + self.assertThat(lambda: char_win2.is_hidden, Eventually(Equals(True))) + self.assertVisibleWindowStack([char_win1, calc_win]) def test_clicking_icon_twice_initiates_spread(self): """This tests shows that when you click on a launcher icon twice, when an application window is focused, the spread is initiated. """ - calc_win1 = self.start_app_window("Calculator") - calc_win2 = self.start_app_window("Calculator") - calc_app = calc_win1.application + char_win1 = self.start_app_window("Character Map") + char_win2 = self.start_app_window("Character Map") + char_app = char_win1.application - self.assertVisibleWindowStack([calc_win2, calc_win1]) - self.assertProperty(calc_win2, is_focused=True) + self.assertVisibleWindowStack([char_win2, char_win1]) + self.assertProperty(char_win2, is_focused=True) - calc_icon = self.launcher.model.get_icon(desktop_id=calc_app.desktop_file) + char_icon = self.launcher.model.get_icon(desktop_id=char_app.desktop_file) self.addCleanup(self.keybinding, "spread/cancel") - self.launcher_instance.click_launcher_icon(calc_icon) + self.launcher_instance.click_launcher_icon(char_icon) self.assertThat(self.window_manager.scale_active, Eventually(Equals(True))) self.assertThat(self.window_manager.scale_active_for_group, Eventually(Equals(True))) @@ -118,15 +118,15 @@ class LauncherIconsTests(LauncherTestCase): """If scale is initiated through the laucher pressing super must close scale and open the dash. """ - calc_win1 = self.start_app_window("Calculator") - calc_win2 = self.start_app_window("Calculator") - calc_app = calc_win1.application + char_win1 = self.start_app_window("Character Map") + char_win2 = self.start_app_window("Character Map") + char_app = char_win1.application - self.assertVisibleWindowStack([calc_win2, calc_win1]) - self.assertProperty(calc_win2, is_focused=True) + self.assertVisibleWindowStack([char_win2, char_win1]) + self.assertProperty(char_win2, is_focused=True) - calc_icon = self.launcher.model.get_icon(desktop_id=calc_app.desktop_file) - self.launcher_instance.click_launcher_icon(calc_icon) + char_icon = self.launcher.model.get_icon(desktop_id=char_app.desktop_file) + self.launcher_instance.click_launcher_icon(char_icon) self.assertThat(self.window_manager.scale_active, Eventually(Equals(True))) self.dash.ensure_visible() diff --git a/tests/autopilot/unity/tests/test_panel.py b/tests/autopilot/unity/tests/test_panel.py index d17e52f5c..74a9504a0 100644 --- a/tests/autopilot/unity/tests/test_panel.py +++ b/tests/autopilot/unity/tests/test_panel.py @@ -807,10 +807,10 @@ class PanelMenuTests(PanelTestsBase): def test_menus_dont_show_if_a_new_application_window_is_opened(self): """This tests the menu discovery feature on new window for a know application.""" - self.open_new_application_window("Calculator") + self.open_new_application_window("Character Map") self.sleep_menu_settle_period() - self.start_app("Calculator") + self.start_app("Character Map") sleep(self.panel.menus.fadein_duration / 1000.0) # Not using Eventually here since this is time-critical. Need to work # out a better way to do this. diff --git a/tests/autopilot/unity/tests/test_quicklist.py b/tests/autopilot/unity/tests/test_quicklist.py index 03d9747a2..37b354fa2 100644 --- a/tests/autopilot/unity/tests/test_quicklist.py +++ b/tests/autopilot/unity/tests/test_quicklist.py @@ -72,14 +72,14 @@ class QuicklistActionTests(UnityTestCase): Then we activate the Calculator quicklist item. Then we actiavte the Mahjongg launcher icon. """ - mah_win1 = self.start_app_window("Mahjongg") + char_win1 = self.start_app_window("Character Map") calc_win = self.start_app_window("Calculator") - mah_win2 = self.start_app_window("Mahjongg") + char_win2 = self.start_app_window("Character Map") - self.assertVisibleWindowStack([mah_win2, calc_win, mah_win1]) + self.assertVisibleWindowStack([char_win2, calc_win, char_win1]) - mahj_icon = self.launcher.model.get_icon( - desktop_id=mah_win1.application.desktop_file) + char_icon = self.launcher.model.get_icon( + desktop_id=char_win1.application.desktop_file) calc_icon = self.launcher.model.get_icon( desktop_id=calc_win.application.desktop_file) @@ -87,29 +87,29 @@ class QuicklistActionTests(UnityTestCase): calc_ql.get_quicklist_application_item(calc_win.application.name).mouse_click() self.assertProperty(calc_win, is_focused=True) - self.assertVisibleWindowStack([calc_win, mah_win2, mah_win1]) + self.assertVisibleWindowStack([calc_win, char_win2, char_win1]) - mahj_ql = self.open_quicklist_for_icon(mahj_icon) - mahj_ql.get_quicklist_application_item(mah_win1.application.name).mouse_click() + char_ql = self.open_quicklist_for_icon(char_icon) + char_ql.get_quicklist_application_item(char_win1.application.name).mouse_click() - self.assertProperty(mah_win2, is_focused=True) - self.assertVisibleWindowStack([mah_win2, calc_win, mah_win1]) + self.assertProperty(char_win2, is_focused=True) + self.assertVisibleWindowStack([char_win2, calc_win, char_win1]) def test_quicklist_application_item_initiate_spread(self): """This tests shows that when you activate a quicklist application item when an application window is focused, the spread is initiated. """ - calc_win1 = self.start_app_window("Calculator") - calc_win2 = self.start_app_window("Calculator") - calc_app = calc_win1.application + char_win1 = self.start_app_window("Character Map") + char_win2 = self.start_app_window("Character Map") + char_app = char_win1.application - self.assertVisibleWindowStack([calc_win2, calc_win1]) - self.assertProperty(calc_win2, is_focused=True) + self.assertVisibleWindowStack([char_win2, char_win1]) + self.assertProperty(char_win2, is_focused=True) - calc_icon = self.launcher.model.get_icon(desktop_id=calc_app.desktop_file) + char_icon = self.launcher.model.get_icon(desktop_id=char_app.desktop_file) - calc_ql = self.open_quicklist_for_icon(calc_icon) - app_item = calc_ql.get_quicklist_application_item(calc_app.name) + char_ql = self.open_quicklist_for_icon(char_icon) + app_item = char_ql.get_quicklist_application_item(char_app.name) self.addCleanup(self.keybinding, "spread/cancel") app_item.mouse_click() diff --git a/tests/autopilot/unity/tests/test_switcher.py b/tests/autopilot/unity/tests/test_switcher.py index 4b33b4ff4..8e7704e91 100644 --- a/tests/autopilot/unity/tests/test_switcher.py +++ b/tests/autopilot/unity/tests/test_switcher.py @@ -46,9 +46,9 @@ class SwitcherTestCase(UnityTestCase): """Start some applications, returning their windows. If no applications are specified, the following will be started: - * Character Map - * Calculator * Calculator + * Character Map + * Character Map Windows are always started in the order that they are specified (which means the last specified application will *probably* be at the top of the @@ -57,7 +57,7 @@ class SwitcherTestCase(UnityTestCase): """ if len(args) == 0: - args = ('Character Map', 'Calculator', 'Calculator') + args = ('Calculator', 'Character Map', 'Character Map') windows = [] for app in args: windows.append(self.start_app_window(app)) @@ -231,20 +231,20 @@ class SwitcherWindowsManagementTests(SwitcherTestCase): Then we close the currently focused window. """ - mah_win1, calc_win, mah_win2 = self.start_applications("Mahjongg", "Calculator", "Mahjongg") - self.assertVisibleWindowStack([mah_win2, calc_win, mah_win1]) + char_win1, calc_win, char_win2 = self.start_applications("Character Map", "Calculator", "Character Map") + self.assertVisibleWindowStack([char_win2, calc_win, char_win1]) self.keybinding("switcher/reveal_normal") self.assertProperty(calc_win, is_focused=True) - self.assertVisibleWindowStack([calc_win, mah_win2, mah_win1]) + self.assertVisibleWindowStack([calc_win, char_win2, char_win1]) self.keybinding("switcher/reveal_normal") - self.assertProperty(mah_win2, is_focused=True) - self.assertVisibleWindowStack([mah_win2, calc_win, mah_win1]) + self.assertProperty(char_win2, is_focused=True) + self.assertVisibleWindowStack([char_win2, calc_win, char_win1]) self.keybinding("window/close") self.assertProperty(calc_win, is_focused=True) - self.assertVisibleWindowStack([calc_win, mah_win1]) + self.assertVisibleWindowStack([calc_win, char_win1]) class SwitcherDetailsTests(SwitcherTestCase): @@ -338,17 +338,17 @@ class SwitcherDetailsModeTests(SwitcherTestCase): """The active selection in detail mode must be the last focused window. If it was the currently active application type. """ - calc_win1, calc_win2 = self.start_applications("Calculator", "Calculator") - self.assertVisibleWindowStack([calc_win2, calc_win1]) + char_win1, char_win2 = self.start_applications("Character Map", "Character Map") + self.assertVisibleWindowStack([char_win2, char_win1]) self.switcher.initiate() - while self.switcher.current_icon.tooltip_text != calc_win2.application.name: + while self.switcher.current_icon.tooltip_text != char_win2.application.name: self.switcher.next_icon() self.keyboard.press_and_release(self.initiate_keycode) sleep(0.5) self.switcher.select() - self.assertProperty(calc_win1, is_focused=True) + self.assertProperty(char_win1, is_focused=True) class SwitcherWorkspaceTests(SwitcherTestCase): @@ -402,18 +402,18 @@ class SwitcherWorkspaceTests(SwitcherTestCase): self.set_unity_option("alt_tab_timeout", False) self.workspace.switch_to(1) - self.start_app("Mahjongg") + self.start_app("Character Map") self.workspace.switch_to(3) - mah_win2 = self.start_app_window("Mahjongg") + char_win2 = self.start_app_window("Character Map") self.keybinding("window/minimize") - self.assertProperty(mah_win2, is_hidden=True) + self.assertProperty(char_win2, is_hidden=True) self.start_app("Calculator") self.switcher.initiate() - while self.switcher.current_icon.tooltip_text != mah_win2.application.name: + while self.switcher.current_icon.tooltip_text != char_win2.application.name: self.switcher.next_icon() self.switcher.select() - self.assertProperty(mah_win2, is_hidden=False) + self.assertProperty(char_win2, is_hidden=False) |
