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 22bdbd5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 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
6 changes: 1 addition & 5 deletions fancypages/test/testcases.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,11 @@ class SplinterTestCase(LiveServerTestCase):
is_staff = False
is_logged_in = True

def get_local_browser(self):
return Browser(SPLINTER_WEBDRIVER)

def setUp(self):
super(SplinterTestCase, self).setUp()
self.user = None
self.base_url = URL(self.live_server_url)

self.browser = self.get_local_browser()
self.browser = Browser(SPLINTER_WEBDRIVER)

if self.is_anonymous and not self.is_staff:
return
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 22bdbd5

Please sign in to comment.