diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a7d26be2..3806ec66 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,6 +20,9 @@ jobs: steps: - uses: actions/checkout@v2 + - uses: browser-actions/setup-chrome@latest + with: + chrome-version: 95.0.4638.17.0 - uses: conda-incubator/setup-miniconda@v2 with: auto-update-conda: true diff --git a/environment.devenv.yml b/environment.devenv.yml index 89985d7b..fb1274aa 100644 --- a/environment.devenv.yml +++ b/environment.devenv.yml @@ -9,7 +9,7 @@ includes: environment: # Tip: Use `--driver ` to change driver for a single run {% if TEST_QMXGRAPH %} - PYTEST_ADDOPTS: --driver Firefox + PYTEST_ADDOPTS: --driver Chrome {% endif %} dependencies: @@ -18,8 +18,7 @@ dependencies: {% if TEST_QMXGRAPH %} - cherrypy - hypothesis =3.11 - - firefox - - geckodriver + - python-chromedriver-binary =95.0.4638.17.0 - pytest-mock - pytest-qt - pytest-rerunfailures diff --git a/tests/conftest.py b/tests/conftest.py index bfe24cf7..4f032cce 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -4,6 +4,9 @@ def pytest_configure(config): + # Adds chromedriver binary to path. + import chromedriver_binary # noqa + # During warm up, clean up the temporary files/objects used by ports # fixture from previous runs. Note these files are shared among ALL slaves # of pytest so they can't reliably be removed by a fixture. @@ -16,9 +19,9 @@ def pytest_configure(config): # Fixtures -------------------------------------------------------------------- @pytest.fixture -def firefox_options(firefox_options): - firefox_options.headless = True - return firefox_options +def chrome_options(chrome_options): + chrome_options.headless = True + return chrome_options @pytest.fixture(autouse=True)