Skip to content

Commit

Permalink
Attempted fix for flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
bradenmacdonald committed Feb 10, 2016
1 parent 37b79f9 commit df2fc66
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/integration/test_sizing.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from collections import namedtuple
import os.path
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait

from xblockutils.resources import ResourceLoader

Expand Down Expand Up @@ -109,6 +110,8 @@ def test_square_image_desktop(self):

def _size_for_mobile(self):
self.browser.set_window_size(375, 627) # iPhone 6 viewport size
wait = WebDriverWait(self.browser, 2)
wait.until(lambda browser: browser.get_window_size()["width"] == 375)

def test_wide_image_mobile(self):
""" Test the upper, larger, wide image in a mobile-sized window """
Expand Down

0 comments on commit df2fc66

Please sign in to comment.