Bug 1270820 - Improve failure messages for Wait().until() calls in Firefox UI testcase classes. r?maja_zf draft
authorHenrik Skupin <mail@hskupin.info>
Fri, 06 May 2016 17:31:22 +0200
changeset 364395 80e7df164b94640ca5217eeeb381c3043999553f
parent 364329 35232e0db8b87969fcff58faac20e6b915a4f827
child 520264 490f3061ab4b40768331ac0dbe08044c4f3ed5ca
push id17436
push userbmo:hskupin@gmail.com
push dateFri, 06 May 2016 15:32:20 +0000
reviewersmaja_zf
bugs1270820
milestone49.0a1
Bug 1270820 - Improve failure messages for Wait().until() calls in Firefox UI testcase classes. r?maja_zf MozReview-Commit-ID: IML3RZy3kXD
testing/firefox-ui/harness/firefox_ui_harness/testcases.py
--- a/testing/firefox-ui/harness/firefox_ui_harness/testcases.py
+++ b/testing/firefox-ui/harness/firefox_ui_harness/testcases.py
@@ -262,27 +262,29 @@ class UpdateTestCase(FirefoxTestCase):
             download_via_update_wizard(window)
             return
 
         if window.deck.selected_panel == window.deck.download_and_install:
             window.deck.download_and_install.button.click()
 
             # Wait for the download to start
             Wait(self.marionette).until(lambda _: (
-                window.deck.selected_panel != window.deck.download_and_install))
+                window.deck.selected_panel != window.deck.download_and_install),
+                message='Download of the update has been started.')
 
         # If there are incompatible addons, handle the update via the old software update dialog
         if window.deck.selected_panel == window.deck.apply_billboard:
             # Clicking the update button will open the old update wizard dialog
             dialog = self.browser.open_window(
                 callback=lambda _: window.deck.update_button.click(),
                 expected_window_class=UpdateWizardDialog
             )
             Wait(self.marionette).until(
-                lambda _: dialog.wizard.selected_panel == dialog.wizard.updates_found_basic)
+                lambda _: dialog.wizard.selected_panel == dialog.wizard.updates_found_basic,
+                message='An update has been found.')
 
             download_via_update_wizard(dialog)
             dialog.close()
 
             return
 
         if wait_for_finish:
             start_time = datetime.now()