Skip to content

Commit 5ecc9cf

Browse files
authored
Use selenium deb package in CI (#358)
1 parent a9d91e2 commit 5ecc9cf

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,10 @@ jobs:
9595
runs-on: ubuntu-latest
9696
steps:
9797
- uses: actions/checkout@v6
98-
- name: Install Chrome
99-
run: sudo apt-get install -y google-chrome-stable
10098
- name: Install Selenium
10199
run: |
102-
mkdir bin
103-
curl -O https://chromedriver.storage.googleapis.com/`curl -s https://chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip
104-
unzip chromedriver_linux64.zip -d bin
100+
curl -LsSfO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
101+
sudo dpkg -i google-chrome-stable_current_amd64.deb || sudo apt-get -f install -y
105102
- uses: actions/setup-python@v6
106103
with:
107104
python-version: ${{ matrix.python-version }}

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def random_name(n):
2828
@pytest.fixture(scope="session")
2929
def driver():
3030
chrome_options = webdriver.ChromeOptions()
31-
chrome_options.headless = True
31+
chrome_options.add_argument("--headless=new")
3232
try:
3333
b = webdriver.Chrome(options=chrome_options)
3434
except WebDriverException as e:

tests/test_forms.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ def test_lang_attr(self):
5353

5454
# Regression test for #163
5555
widget = Select2Widget()
56-
assert widget.i18n_name == "en"
56+
with translation.override("en"):
57+
assert widget.i18n_name == "en"
5758
with translation.override("de"):
5859
assert widget.i18n_name == "de"
5960

0 commit comments

Comments
 (0)