Skip to content

Commit 7edff79

Browse files
committed
fix(firefox_web_driver): configure Firefox's locale at fixture time
Otherwise the fixture isn't set up to request the language expected by the tests that use it.
1 parent 4db4bd7 commit 7edff79

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

securedrop/tests/functional/conftest.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,18 @@
1717
from source_user import SourceUser
1818
from tests.factories import SecureDropConfigFactory
1919
from tests.functional.db_session import get_database_session
20+
from tests.functional.pageslayout.utils import list_locales
2021
from tests.functional.web_drivers import WebDriverTypeEnum, get_web_driver
2122
from tests.utils.i18n import get_test_locales
2223

2324

2425
# Function-scoped so that tests can be run in parallel if needed
2526
@pytest.fixture
2627
def firefox_web_driver() -> WebDriver: # type: ignore
27-
with get_web_driver(web_driver_type=WebDriverTypeEnum.FIREFOX) as web_driver:
28+
with get_web_driver(
29+
web_driver_type=WebDriverTypeEnum.FIREFOX,
30+
accept_languages=",".join(list_locales()).replace("_", "-"),
31+
) as web_driver:
2832
yield web_driver
2933

3034

0 commit comments

Comments
 (0)