diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f17381a..f01a32ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,13 +95,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - - name: Install Chrome - run: sudo apt-get install -y google-chrome-stable - name: Install Selenium run: | - mkdir bin - curl -O https://chromedriver.storage.googleapis.com/`curl -s https://chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip - unzip chromedriver_linux64.zip -d bin + curl -LsSfO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb + sudo dpkg -i google-chrome-stable_current_amd64.deb || sudo apt-get -f install -y - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} diff --git a/tests/conftest.py b/tests/conftest.py index 60bbe399..dd6ca21a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -28,7 +28,7 @@ def random_name(n): @pytest.fixture(scope="session") def driver(): chrome_options = webdriver.ChromeOptions() - chrome_options.headless = True + chrome_options.add_argument("--headless=new") try: b = webdriver.Chrome(options=chrome_options) except WebDriverException as e: diff --git a/tests/test_forms.py b/tests/test_forms.py index a2b87522..081f1ff6 100644 --- a/tests/test_forms.py +++ b/tests/test_forms.py @@ -53,7 +53,8 @@ def test_lang_attr(self): # Regression test for #163 widget = Select2Widget() - assert widget.i18n_name == "en" + with translation.override("en"): + assert widget.i18n_name == "en" with translation.override("de"): assert widget.i18n_name == "de"