Skip to content

Commit

Permalink
Set bigger screen size for headless browser
Browse files Browse the repository at this point in the history
  • Loading branch information
roadsideseb committed Aug 21, 2014
1 parent fba88e4 commit c69648c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ env:

before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"

install:
- pip install $PIP_OPTS wheel setuptools -U
Expand Down
4 changes: 3 additions & 1 deletion fancypages/test/testcases.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ class SplinterTestCase(LiveServerTestCase):
is_logged_in = True

def get_local_browser(self):
return Browser(SPLINTER_WEBDRIVER)
browser = Browser(SPLINTER_WEBDRIVER)
browser.driver.set_window_size(1280, 1024)
return browser

def setUp(self):
super(SplinterTestCase, self).setUp()
Expand Down
4 changes: 4 additions & 0 deletions tests/browser/test_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,14 @@ def test_can_be_added_with_new_image_and_link(self):
self.find_and_click_by_css(self.browser, '.edit-button')
self.wait_for_editor_reload()

self.browser.is_element_present_by_css('iframe')

self.find_and_click_by_css(
self.browser, 'a[data-behaviours=load-asset-modal]')
self.wait_for_editor_reload()

self.browser.is_element_present_by_css('iframe')

with self.browser.get_iframe(0) as iframe:
self.wait_for_editor_reload()
self.find_and_click_by_css(
Expand Down

0 comments on commit c69648c

Please sign in to comment.