on xenial help sign in
Some autopilot fixes
eab45d3Michael Terry
tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py−1
@@ -21,7 +21,6 @@
21
21
22from __future__ import absolute_import
22from __future__ import absolute_import
23
23
24−from unity8.process_helpers import unlock_unity
25from unity8.shell import disable_qml_mocking
24from unity8.shell import disable_qml_mocking
26from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
25from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
27
26
tests/autopilot/unity8/application_lifecycle/tests/test_url_dispatcher.py−1
@@ -63,7 +63,6 @@ Icon=Not important
63 self._qml_mock_enabled = False
63 self._qml_mock_enabled = False
64 self._data_dirs_mock_enabled = False
64 self._data_dirs_mock_enabled = False
65 unity_proxy = self.launch_unity()
65 unity_proxy = self.launch_unity()
66− process_helpers.unlock_unity(unity_proxy)
67
66
68 def create_test_application(self):
67 def create_test_application(self):
69 # FIXME most of this code is duplicated in the toolkit. We should
68 # 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
22from autopilot import platform
22from autopilot import platform
23from testtools import skipIf
23from testtools import skipIf
24
24
25−from unity8.process_helpers import unlock_unity
26from unity8.shell.tests import UnityTestCase
25from unity8.shell.tests import UnityTestCase
27
26
28
27
@@ -45,6 +44,5 @@ class IndicatorTestCase(UnityTestCase):
45
44
46 def test_indicator_exists(self):
45 def test_indicator_exists(self):
47 unity_proxy = self.launch_unity()
46 unity_proxy = self.launch_unity()
48− unlock_unity(unity_proxy)
49 indicator = self.main_window.get_indicator(self.indicator_name)
47 indicator = self.main_window.get_indicator(self.indicator_name)
50 self.assertIsNotNone(indicator)
48 self.assertIsNotNone(indicator)
tests/autopilot/unity8/shell/tests/__init__.py+1−1
@@ -395,7 +395,7 @@ class UnityTestCase(AutopilotTestCase):
395 self.assertThat(home_scope.isCurrent, Eventually(Equals(True)))
395 self.assertThat(home_scope.isCurrent, Eventually(Equals(True)))
396
396
397 def assertGreeterReady(self):
397 def assertGreeterReady(self):
398− greeter = self.main_window().get_greeter()
398+ greeter = self.main_window.get_greeter()
399 self.assertThat(greeter.created, Eventually(Equals(True)))
399 self.assertThat(greeter.created, Eventually(Equals(True)))
400
400
401 def get_dash(self):
401 def get_dash(self):
tests/autopilot/unity8/shell/tests/test_emulators.py−1
@@ -46,7 +46,6 @@ class DashBaseTestCase(tests.UnityTestCase):
46 def setUp(self):
46 def setUp(self):
47 super(DashBaseTestCase, self).setUp()
47 super(DashBaseTestCase, self).setUp()
48 unity_proxy = self.launch_unity()
48 unity_proxy = self.launch_unity()
49− process_helpers.unlock_unity(unity_proxy)
50 self.dash = self.main_window.get_dash()
49 self.dash = self.main_window.get_dash()
51
50
52
51
tests/autopilot/unity8/shell/tests/test_greeter.py+6−6
@@ -18,7 +18,7 @@
18#
18#
19
19
20from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
20from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
21−
21+from autopilot.introspection.types import Rectangle
22from testtools.matchers import Equals
22from testtools.matchers import Equals
23
23
24class TestGreeter(UnityTestCase):
24class TestGreeter(UnityTestCase):
@@ -28,11 +28,11 @@ class TestGreeter(UnityTestCase):
28 scenarios = _get_device_emulation_scenarios()
28 scenarios = _get_device_emulation_scenarios()
29
29
30 def test_greeter_background(self):
30 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
32
32
33 """
33 """
34− self.launch_unity()
34+ self.launch_greeter()
35− self.main_window.get_greeter()
36 greeter_background = self.main_window.get_greeter_background()
35 greeter_background = self.main_window.get_greeter_background()
37− shell_background = self.main_window.get_shell_background()
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(shell_background.globalRect))
38+ self.assertThat(greeter_background.globalRect, Equals(winRect))
tests/autopilot/unity8/shell/tests/test_lock_screen.py−1
@@ -20,7 +20,6 @@
20
20
21from __future__ import absolute_import
21from __future__ import absolute_import
22
22
23−from unity8.process_helpers import unlock_unity
24from unity8.shell import with_lightdm_mock
23from unity8.shell import with_lightdm_mock
25from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
24from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
26
25