@@ -18,7 +18,7 @@
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
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()
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
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))