Commit 6ac52192 by Clinton Blackburn

Fixed flaky test

The retry fulfillment tests consistently fail on Travis. This change ensures we are waiting for the page to load before continuing the test.

ECOM-7141
parent 06597560
......@@ -76,6 +76,9 @@ class OrderViewBrowserTestBase(LiveServerTestCase):
def retry_fulfillment(self):
""" Click the retry fulfillment button and wait for the AJAX call to finish. """
# Wait for the button to appear, otherwise calling tests may fail on Travis
WebDriverWait(self.selenium, 1.0).until(lambda d: d.find_element_by_css_selector(self.btn_selector))
button = self.selenium.find_element_by_css_selector(self.btn_selector)
self.assertEqual(unicode(self.order.number), button.get_attribute('data-order-number'))
button.click()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment