[tests] setup selenium for travis ci
parent
e220e5cbe3
commit
14f5b2d26f
|
|
@ -44,7 +44,8 @@ matrix:
|
|||
- python: "3.8"
|
||||
env: REQ="Django>=3.0,<3.1"
|
||||
install:
|
||||
- pip install -U pip setuptools coveralls
|
||||
- apt-get install firefox-geckodriver
|
||||
- pip install -U pip setuptools coveralls selenium
|
||||
- pip install $REQ
|
||||
- pip install --editable .
|
||||
script: "coverage run --source more_admin_filters/ tests/manage.py test testapp"
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ from django.contrib.auth.models import User
|
|||
from django.urls import reverse
|
||||
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
|
||||
from selenium.webdriver.firefox.webdriver import WebDriver
|
||||
from selenium.webdriver.firefox.options import Options
|
||||
|
||||
from ..management.commands.createtestdata import create_test_data
|
||||
|
||||
|
|
@ -12,7 +13,10 @@ class LiveFilterTest(StaticLiveServerTestCase):
|
|||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.selenium = WebDriver()
|
||||
|
||||
options = Options()
|
||||
options.headless = True
|
||||
cls.selenium = WebDriver(options=options)
|
||||
cls.selenium.implicitly_wait(10)
|
||||
|
||||
@classmethod
|
||||
|
|
|
|||
Loading…
Reference in New Issue