diff --git a/securedrop/tests/functional/pageslayout/test_journalist_account.py b/securedrop/tests/functional/pageslayout/test_journalist_account.py index 4e18a3449e..c1485d3dc9 100644 --- a/securedrop/tests/functional/pageslayout/test_journalist_account.py +++ b/securedrop/tests/functional/pageslayout/test_journalist_account.py @@ -86,7 +86,7 @@ def explanatory_tooltip_is_correct() -> None: explanatory_tooltip_opacity = explanatory_tooltip.value_of_css_property("opacity") assert explanatory_tooltip_opacity == "1" - if assert_tooltip_text_is: + if assert_tooltip_text_is and not journ_app_nav.accept_languages: assert explanatory_tooltip.text == assert_tooltip_text_is journ_app_nav.nav_helper.wait_for(explanatory_tooltip_is_correct) diff --git a/securedrop/tests/functional/pageslayout/test_journalist_admin.py b/securedrop/tests/functional/pageslayout/test_journalist_admin.py index 9528654a3a..bccabcd1f0 100644 --- a/securedrop/tests/functional/pageslayout/test_journalist_admin.py +++ b/securedrop/tests/functional/pageslayout/test_journalist_admin.py @@ -288,7 +288,8 @@ def test_ossec_alert_button(self, sd_servers, firefox_web_driver): # Then it succeeds def test_alert_sent(): flash_msg = journ_app_nav.driver.find_element(By.CSS_SELECTOR, ".flash") - assert "Test alert sent. Please check your email." in flash_msg.text + if not journ_app_nav.accept_languages: + assert "Test alert sent. Please check your email." in flash_msg.text journ_app_nav.nav_helper.wait_for(test_alert_sent) diff --git a/securedrop/tests/functional/web_drivers.py b/securedrop/tests/functional/web_drivers.py index 39e261c355..50efa84022 100644 --- a/securedrop/tests/functional/web_drivers.py +++ b/securedrop/tests/functional/web_drivers.py @@ -111,7 +111,7 @@ def _create_firefox_driver( # Add this attribute to the returned driver object so that tests using this # fixture can know what locale it's parameterized with. - firefox_driver.locale = accept_languages or "en_US" # type: ignore[attr-defined] + firefox_driver.locale = accept_languages # type: ignore[attr-defined] return firefox_driver