on xenial help sign in
Some autopilot fixes
commiteab45d33ca71f7990007866522afb18d8c6c34ff authorMichael Terry <michael.terry@canonical.com> dateWed 12 Mar 2014, 13:01 (13 years ago) parentdcfa947
7 files changed+7−13
tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py−1 tests/autopilot/unity8/application_lifecycle/tests/test_url_dispatcher.py−1 tests/autopilot/unity8/indicators/tests/test_indicators.py−2 tests/autopilot/unity8/shell/tests/__init__.py+1−1 tests/autopilot/unity8/shell/tests/test_emulators.py−1 tests/autopilot/unity8/shell/tests/test_greeter.py+6−6 tests/autopilot/unity8/shell/tests/test_lock_screen.py−1
tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py−1
@@ -21,7 +21,6 @@
2121
2222from __future__ import absolute_import
2323
24−from unity8.process_helpers import unlock_unity
2524from unity8.shell import disable_qml_mocking
2625from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
2726
tests/autopilot/unity8/application_lifecycle/tests/test_url_dispatcher.py−1
@@ -63,7 +63,6 @@ Icon=Not important
6363 self._qml_mock_enabled = False
6464 self._data_dirs_mock_enabled = False
6565 unity_proxy = self.launch_unity()
66− process_helpers.unlock_unity(unity_proxy)
6766
6867 def create_test_application(self):
6968 # FIXME most of this code is duplicated in the toolkit. We should
tests/autopilot/unity8/indicators/tests/test_indicators.py−2
@@ -22,7 +22,6 @@ from __future__ import absolute_import
2222from autopilot import platform
2323from testtools import skipIf
2424
25−from unity8.process_helpers import unlock_unity
2625from unity8.shell.tests import UnityTestCase
2726
2827
@@ -45,6 +44,5 @@ class IndicatorTestCase(UnityTestCase):
4544
4645 def test_indicator_exists(self):
4746 unity_proxy = self.launch_unity()
48− unlock_unity(unity_proxy)
4947 indicator = self.main_window.get_indicator(self.indicator_name)
5048 self.assertIsNotNone(indicator)
tests/autopilot/unity8/shell/tests/__init__.py+1−1
@@ -395,7 +395,7 @@ class UnityTestCase(AutopilotTestCase):
395395 self.assertThat(home_scope.isCurrent, Eventually(Equals(True)))
396396
397397 def assertGreeterReady(self):
398− greeter = self.main_window().get_greeter()
398+ greeter = self.main_window.get_greeter()
399399 self.assertThat(greeter.created, Eventually(Equals(True)))
400400
401401 def get_dash(self):
tests/autopilot/unity8/shell/tests/test_emulators.py−1
@@ -46,7 +46,6 @@ class DashBaseTestCase(tests.UnityTestCase):
4646 def setUp(self):
4747 super(DashBaseTestCase, self).setUp()
4848 unity_proxy = self.launch_unity()
49− process_helpers.unlock_unity(unity_proxy)
5049 self.dash = self.main_window.get_dash()
5150
5251
tests/autopilot/unity8/shell/tests/test_greeter.py+6−6
@@ -18,7 +18,7 @@
1818#
1919
2020from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
21−
21+from autopilot.introspection.types import Rectangle
2222from testtools.matchers import Equals
2323
2424class TestGreeter(UnityTestCase):
@@ -28,11 +28,11 @@ class TestGreeter(UnityTestCase):
2828 scenarios = _get_device_emulation_scenarios()
2929
3030 def test_greeter_background(self):
31− """Test that the background of the greeter and the background of the shell are placed correctly
31+ """Test that the background of the greeter is placed correctly
3232
3333 """
34− self.launch_unity()
35− self.main_window.get_greeter()
34+ self.launch_greeter()
3635 greeter_background = self.main_window.get_greeter_background()
37− shell_background = self.main_window.get_shell_background()
38− self.assertThat(greeter_background.globalRect, Equals(shell_background.globalRect))
36+ winRect = Rectangle(self.main_window.x, self.main_window.y,
37+ self.main_window.width, self.main_window.height)
38+ self.assertThat(greeter_background.globalRect, Equals(winRect))
tests/autopilot/unity8/shell/tests/test_lock_screen.py−1
@@ -20,7 +20,6 @@
2020
2121from __future__ import absolute_import
2222
23−from unity8.process_helpers import unlock_unity
2423from unity8.shell import with_lightdm_mock
2524from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
2625