on xenial help sign in
Fixed ApplicationLifecycleTests.test_greeter_hides_on_app_open
commit66869868a285c3489757ac33b880cf3e8de78dfc authorNick Dedekind <nick.dedekind@canonical.com> dateFri 8 May 2015, 11:49 (11 years ago) parentf7ef33d
1 file changed+13−3
tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py+13−3
tests/autopilot/unity8/application_lifecycle/tests/test_application_lifecycle.py+13−3
@@ -21,6 +21,7 @@
2121
2222import logging
2323import os
24+import threading
2425
2526from autopilot.platform import model
2627
@@ -90,10 +91,19 @@ class ApplicationLifecycleTests(tests.ApplicationLifeCycleTestCase):
9091 """Greeter should hide when an app is opened"""
9192 process_helpers.lock_unity()
9293
93− application_name = self.launch_fake_app()
94+ # FIXME - this is because the device greeter uses a password.
95+ # Need to be able to selectively enable mocks so that we can use the fake greeter.
96+ def unlock_thread_worker(greeter):
97+ greeter.wait_swiped_away()
98+ process_helpers.unlock_unity()
99+ greeter.created.wait_for(False)
100+
94101 greeter = self.main_window.get_greeter()
95− greeter.wait_swiped_away()
96− process_helpers.unlock_unity()
102+ unlock_thread = threading.Thread(target=unlock_thread_worker, args=(greeter,))
103+ unlock_thread.start()
104+ application_name = self.launch_fake_app()
105+ unlock_thread.join(10)
106+
97107 self.assert_current_focused_application(application_name)
98108
99109 def test_greeter_hides_on_app_focus(self):