diff --git a/.travis.yml b/.travis.yml index fee80558..8327ccec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,24 +1,13 @@ -sudo: true -dist: trusty - language: python python: "3.6" cache: pip addons: - apt: - sources: - - google-chrome - packages: - - google-chrome-stable - -before_install: - - "export DISPLAY=:99.0" - - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16" + chrome: beta install: - - wget http://chromedriver.storage.googleapis.com/2.29/chromedriver_linux64.zip + - wget http://chromedriver.storage.googleapis.com/2.32/chromedriver_linux64.zip - unzip chromedriver_linux64.zip - export PATH=$PATH:$(pwd) - chmod +x chromedriver diff --git a/RIGS/test_functional.py b/RIGS/test_functional.py index 4e86ff64..6aa48b15 100644 --- a/RIGS/test_functional.py +++ b/RIGS/test_functional.py @@ -26,9 +26,13 @@ from django.conf import settings import sys + def create_browser(): - driver = webdriver.Chrome() - driver.maximize_window() + options = webdriver.ChromeOptions() + options.add_argument("--window-size=1920,1080") + if os.environ.get('CI', False): + options.add_argument("--headless") + driver = webdriver.Chrome(chrome_options=options) return driver class UserRegistrationTest(LiveServerTestCase):