Bug 1274943 - Ensure to wait for the update dialog after a forced fallback. r=maja_zf

MozReview-Commit-ID: 7i9SwSbm0p0

--HG--
extra : rebase_source : fa42c296a23bbec9b805d3e75e8f9e76a22b1c82
This commit is contained in:
Henrik Skupin 2016-09-06 11:55:54 +02:00
Родитель a113face7e
Коммит 62af2956f0
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -10,6 +10,7 @@ import mozfile
from marionette import MarionetteTestCase
from marionette_driver import Wait
from marionette_driver.errors import NoSuchWindowException
from firefox_puppeteer.api.prefs import Preferences
from firefox_puppeteer.api.software_update import SoftwareUpdate
@ -318,8 +319,10 @@ class UpdateTestCase(FirefoxTestCase):
self.restart()
def download_and_apply_forced_update(self):
# The update wizard dialog opens automatically after the restart
dialog = self.windows.switch_to(lambda win: type(win) is UpdateWizardDialog)
# The update wizard dialog opens automatically after the restart but with a short delay
dialog = Wait(self.marionette, ignored_exceptions=[NoSuchWindowException]).until(
lambda _: self.windows.switch_to(lambda win: type(win) is UpdateWizardDialog)
)
# In case of a broken complete update the about window has to be used
if self.updates[self.current_update_index]['patch']['is_complete']: