Bug 1334996 - Click on Safebrowsing report button has to wait for the final URL. draft
authorui.aseem_yadav <justaseem51@gmail.com>
Fri, 10 Mar 2017 11:22:59 +0530
changeset 496453 2ac4de409b81730471a1ef5c5048bd8a04cc7a5f
parent 493832 35d8b6b62b0a17feefd3fdc115f4d071d7d4d2be
child 548611 c09a362666ed40e3c18c14f7a034fdbf68bc71ff
push id48599
push userbmo:justaseem51@gmail.com
push dateFri, 10 Mar 2017 05:57:57 +0000
bugs1334996
milestone54.0a1
Bug 1334996 - Click on Safebrowsing report button has to wait for the final URL. MozReview-Commit-ID: In6G5b9hdLg
testing/firefox-ui/tests/functional/security/test_safe_browsing_warning_pages.py
--- a/testing/firefox-ui/tests/functional/security/test_safe_browsing_warning_pages.py
+++ b/testing/firefox-ui/tests/functional/security/test_safe_browsing_warning_pages.py
@@ -88,18 +88,18 @@ class TestSafeBrowsingWarningPages(Puppe
         # here to not fail in case of slow connections.
         Wait(self.marionette, timeout=self.marionette.timeout.page_load).until(
             expected.element_stale(button))
 
         # Wait for page load to be completed, so we can verify the URL even if a redirect happens.
         # TODO: Bug 1140470: use replacement for mozmill's waitforPageLoad
 
         Wait(self.marionette, timeout=self.marionette.timeout.page_load).until(
-            lambda mn: True if mn.get_url() == self.browser.get_final_url(url) else False ,
-            message= "The current url did not match with the final url we expected"
+            lambda mn: mn.get_url() == self.browser.get_final_url(url) ,
+            message= "The Expected URL '{}' has not been loaded".format(self.browser.get_final_url(url))
         )
 
     def check_ignore_warning_button(self, unsafe_page):
         button = self.marionette.find_element(By.ID, 'ignoreWarningButton')
         button.click()
 
         Wait(self.marionette, timeout=self.marionette.timeout.page_load).until(
             expected.element_present(By.ID, 'main-feature'))