From 8466a17f7d8fd7d707d68dee6bce364819fe633c Mon Sep 17 00:00:00 2001 From: Raphael Odini Date: Tue, 28 Nov 2023 12:24:25 +0100 Subject: [PATCH] Fix firefox headless option --- lemarche/www/auth/tests.py | 5 ++--- poetry.lock | 2 +- pyproject.toml | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lemarche/www/auth/tests.py b/lemarche/www/auth/tests.py index eb3e93cec..d4d8d52bd 100644 --- a/lemarche/www/auth/tests.py +++ b/lemarche/www/auth/tests.py @@ -93,9 +93,8 @@ def setUpClass(cls): super().setUpClass() # selenium browser # TODO: make it test-wide options = Options() - options.headless = True + options.add_argument("-headless") cls.driver = webdriver.Firefox(options=options) - # cls.driver = webdriver.Chrome(executable_path='/usr/bin/chromedriver') cls.driver.implicitly_wait(1) # other init cls.user_count = User.objects.count() @@ -255,7 +254,7 @@ class LoginFormTest(StaticLiveServerTestCase): def setUpClass(cls): super().setUpClass() options = Options() - options.headless = True + options.add_argument("-headless") cls.driver = webdriver.Firefox(options=options) cls.driver.implicitly_wait(1) diff --git a/poetry.lock b/poetry.lock index 67a28b034..21be929c8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -3277,4 +3277,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "^3.10.4" -content-hash = "817971028806be7cf617e7a9391b88282206c66188ed570d04e16b82eede0a77" +content-hash = "08fad0a3122566b7dbceb4ef500cd2ce9cf739a78862c05525e905959188f4af" diff --git a/pyproject.toml b/pyproject.toml index 06cac4256..14fb0a0ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ poethepoet = "0.12.2" pre-commit = "2.20.0" pyproject-flake8 = "6.1.0" pytest-django = "4.5.2" -selenium = "^4.10.0" +selenium = "4.15.2" tblib = "^2.0.0" [tool.poetry.scripts]