@@ -20,6 +20,7 @@
2020
2121from __future__ import absolute_import
2222
23+from unity8.process_helpers import unlock_unity
2324from unity8.shell import with_lightdm_mock
2425from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
2526
@@ -40,11 +41,11 @@ class TestLockscreen(UnityTestCase):
4041 @with_lightdm_mock("single-pin")
4142 def test_can_unlock_pin_screen(self):
4243 """Must be able to unlock the PIN entry lock screen."""
43− self.launch_unity()
44+ unity_proxy = self.launch_unity()
4445 greeter = self.main_window.get_greeter()
4546
4647 if greeter.narrowMode:
47− greeter.swipe()
48+ unlock_unity(unity_proxy)
4849 lockscreen = self._wait_for_lockscreen()
4950 self._enter_pincode("1234")
5051 self.assertThat(lockscreen.shown, Eventually(Equals(False)))
@@ -55,11 +56,11 @@ class TestLockscreen(UnityTestCase):
5556 @with_lightdm_mock("single-passphrase")
5657 def test_can_unlock_passphrase_screen(self):
5758 """Must be able to unlock the passphrase entry screen."""
58− self.launch_unity()
59+ unity_proxy = self.launch_unity()
5960 greeter = self.main_window.get_greeter()
6061
6162 if greeter.narrowMode:
62− greeter.swipe()
63+ unlock_unity(unity_proxy)
6364 lockscreen = self._wait_for_lockscreen()
6465 self._enter_pin_passphrase("password")
6566 self.assertThat(lockscreen.shown, Eventually(Equals(False)))
@@ -70,11 +71,11 @@ class TestLockscreen(UnityTestCase):
7071 @with_lightdm_mock("single-pin")
7172 def test_pin_screen_wrong_code(self):
7273 """Entering the wrong pin code must not dismiss the lock screen."""
73− self.launch_unity()
74+ unity_proxy = self.launch_unity()
7475 greeter = self.main_window.get_greeter()
7576
7677 if greeter.narrowMode:
77− greeter.swipe()
78+ unlock_unity(unity_proxy)
7879 lockscreen = self._wait_for_lockscreen()
7980 self._enter_pincode("4321")
8081 pinentryField = self.main_window.get_pinentryField()
@@ -89,11 +90,11 @@ class TestLockscreen(UnityTestCase):
8990 @with_lightdm_mock("single-passphrase")
9091 def test_passphrase_screen_wrong_password(self):
9192 """Entering the wrong password must not dismiss the lock screen."""
92− self.launch_unity()
93+ unity_proxy = self.launch_unity()
9394 greeter = self.main_window.get_greeter()
9495
9596 if greeter.narrowMode:
96− greeter.swipe()
97+ unlock_unity(unity_proxy)
9798 lockscreen = self._wait_for_lockscreen()
9899 self._enter_pin_passphrase("foobar")
99100 pinentryField = self.main_window.get_pinentryField()