on xenial help sign in
Wait for activeFocus before typing in autopilot tests. Fixes: https://bugs.launchpad.net/bugs/1212580.

Approved by PS Jenkins bot, Michael Zanetti.

commit3b27ffa36834d6615a86b955b066fcc9c6be162a authorMichał Sawicz <michal.sawicz@canonical.com> dateThu 15 Aug 2013, 08:54 (13 years ago) parent8c1f691c473d2c
1 file changed+2
tests/autopilot/unity8/shell/tests/test_lock_screen.py+2
tests/autopilot/unity8/shell/tests/test_lock_screen.py+2
@@ -145,6 +145,7 @@ class TestLockscreen(UnityTestCase):
145145
146146 pinentryField = self.main_window.get_pinentryField()
147147 self.touch.tap_object(pinentryField)
148+ self.assertThat(pinentryField.activeFocus, Eventually(Equals(True)))
148149 self.keyboard.type(passphrase)
149150 logger.debug("Typed passphrase: %s", pinentryField.text)
150151 self.keyboard.type("\n")
@@ -162,6 +163,7 @@ class TestLockscreen(UnityTestCase):
162163
163164 prompt = self.main_window.get_greeter().get_prompt()
164165 self.touch.tap_object(prompt)
166+ self.assertThat(prompt.activeFocus, Eventually(Equals(True)))
165167 self.keyboard.type(passphrase)
166168 logger.debug("Typed passphrase: %s", prompt.text)
167169 self.keyboard.type("\n")