Skip to content

Commit

Permalink
Increase wait time when using remote sauce lab
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Vetter committed May 30, 2014
1 parent e9ceb3a commit e9ea6a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions fancypages/test/testcases.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,10 @@ def goto(self, path):
url = self.base_url.path(path)
return self.browser.visit(url.as_string())

def wait_for_editor_reload(self):
time.sleep(3)
def wait_for_editor_reload(self, wait_for=3):
if self.use_remote:
wait_for += 5
time.sleep(wait_for)

def ensure_element(self, element_or_list, index=0):
"""
Expand Down
4 changes: 2 additions & 2 deletions tests/browser/test_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def test_can_be_added_with_new_image_and_link(self):
# select 'Another page' as the link for the image
self.find_and_click_by_css(self.browser, '.glyphicon-share')
self.find_and_click_by_css(
self.browser, 'a[href="/{}/"]'.format(self.second_page.slug))
self.browser, 'a[href*={}]'.format(self.second_page.slug))

self.find_and_click_by_css(self.browser, 'button[type=submit]')
self.wait_for_editor_reload()
Expand All @@ -244,7 +244,7 @@ def test_can_be_added_with_new_image_and_link(self):
self.fail('Image not added to image block')

link_exists = self.browser.is_element_present_by_css(
"div.block-wrapper>a[href='/{}/']".format(self.second_page.slug))
"div.block-wrapper>a[href*={}]".format(self.second_page.slug))
if not link_exists:
self.fail('image block is not wrapped in link to other page')

Expand Down

0 comments on commit e9ea6a4

Please sign in to comment.