Skip to content

Commit

Permalink
Tests: Modify viewport size for parity between dev and CI env
Browse files Browse the repository at this point in the history
In CI we are getting MoveTargetOutOfBoundsException, but not locally.
We have had errors in the past due to different viewport sizes in CI
and locally, so setting this to a standard size for the pages layout
tests (where the exception is occurring).

(cherry picked from commit ed3bb91)
  • Loading branch information
redshiftzero committed Sep 28, 2018
1 parent f7ec6a7 commit 2bda0e0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions securedrop/tests/functional/functional_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,12 @@ def start_journalist_server(app):
else:
# We will use a normal firefox esr for the pages-layout tests
self.driver = self._create_webdriver2(self.new_profile) # noqa # pylint: disable=no-member

# Set window size and position explicitly to avoid potential bugs due
# to discrepancies between environments.
self.driver.set_window_position(0, 0)
self.driver.set_window_size(1024, 768)

self._javascript_toggle()

# Polls the DOM to wait for elements. To read more about why
Expand Down

0 comments on commit 2bda0e0

Please sign in to comment.