From f8f936b204fdfa61e2b372b59ffa2c4e94056c94 Mon Sep 17 00:00:00 2001 From: Tracy Date: Tue, 14 Oct 2025 11:34:29 -0500 Subject: [PATCH 1/2] Skip new failing tests --- modules/browser_object_tracker_panel.py | 2 +- .../test_download_pdf_from_context_menu.py | 5 +++++ tests/preferences/test_clear_cookie_data.py | 14 +++++++++---- tests/preferences/test_manage_cookie_data.py | 2 ++ ..._party_content_blocked_private_browsing.py | 20 +++++++++++-------- 5 files changed, 30 insertions(+), 13 deletions(-) diff --git a/modules/browser_object_tracker_panel.py b/modules/browser_object_tracker_panel.py index a02762d64..839703a16 100644 --- a/modules/browser_object_tracker_panel.py +++ b/modules/browser_object_tracker_panel.py @@ -76,7 +76,7 @@ def wait_for_blocked_tracking_icon( self, nav: Navigation, page: BasePage ) -> BasePage: """ - Waits for the shield icon to indicate that cookies/trackers are being blocked by continuously refresing the page + Waits for the shield icon to indicate that cookies/trackers are being blocked by continuously refreshing the page Remember to open the passed in page beforehand, this waits for the page to load. diff --git a/tests/downloads/test_download_pdf_from_context_menu.py b/tests/downloads/test_download_pdf_from_context_menu.py index 49536e66e..eb07a5c42 100644 --- a/tests/downloads/test_download_pdf_from_context_menu.py +++ b/tests/downloads/test_download_pdf_from_context_menu.py @@ -1,3 +1,4 @@ +from platform import system from time import sleep import pytest @@ -24,6 +25,10 @@ def delete_files_regex_string(): PDF_TELEMETRY_DATA = ["downloads", "added", "fileExtension", "pdf"] +@pytest.mark.skipif( + system().lower().startswith("darwin") or system().lower().startswith("linux"), + reason="bug 1994061", +) @pytest.mark.headed def test_download_pdf_from_context_menu( driver: Firefox, diff --git a/tests/preferences/test_clear_cookie_data.py b/tests/preferences/test_clear_cookie_data.py index 8ca8120f6..e0ed97862 100644 --- a/tests/preferences/test_clear_cookie_data.py +++ b/tests/preferences/test_clear_cookie_data.py @@ -1,3 +1,5 @@ +from platform import system + import pytest from selenium.webdriver import Firefox from selenium.webdriver.support.ui import WebDriverWait @@ -24,7 +26,7 @@ def _dialog_options_present(about_prefs: AboutPrefs) -> bool: return False -def open_clear_cookies_data_dialog( +def _open_clear_cookies_data_dialog( about_prefs: AboutPrefs, ba: BrowserActions, wait: WebDriverWait ): """ @@ -53,6 +55,10 @@ def open_clear_cookies_data_dialog( # @pytest.mark.skipif(WIN_GHA, reason="Test unstable in Windows GA, tracked in 1990570") +@pytest.mark.skipif( + system().lower().startswith("darwin") or system().lower().startswith("linux"), + reason="bug 1994055", +) def test_clear_cookie_data(driver: Firefox): """ C143627: Cookies and site data can be cleared via the "Clear Data" panel @@ -65,7 +71,7 @@ def test_clear_cookie_data(driver: Firefox): driver.get(WEBSITE_ADDRESS) # Open dialog and read current value (must be > 0) - cookie_value = open_clear_cookies_data_dialog(about_prefs, ba, wait) + cookie_value = _open_clear_cookies_data_dialog(about_prefs, ba, wait) assert cookie_value > 0, f"Expected cookie/site data > 0, got {cookie_value}" # Clear cookies and site data: open dialog again, wait for iframe, click clear @@ -77,7 +83,7 @@ def test_clear_cookie_data(driver: Firefox): ba.switch_to_content_context() # Wait until the dialog reports 0 (reopen/poll via helper) - wait.until(lambda _: open_clear_cookies_data_dialog(about_prefs, ba, wait) == 0) + wait.until(lambda _: _open_clear_cookies_data_dialog(about_prefs, ba, wait) == 0) - final_value = open_clear_cookies_data_dialog(about_prefs, ba, wait) + final_value = _open_clear_cookies_data_dialog(about_prefs, ba, wait) assert final_value == 0, f"Expected 0 after clearing, got {final_value}" diff --git a/tests/preferences/test_manage_cookie_data.py b/tests/preferences/test_manage_cookie_data.py index 3cf377248..1bf119d47 100644 --- a/tests/preferences/test_manage_cookie_data.py +++ b/tests/preferences/test_manage_cookie_data.py @@ -1,3 +1,4 @@ +from platform import system from time import sleep import pytest @@ -16,6 +17,7 @@ def test_case(): COOKIE_SITE = "google.com" +@pytest.mark.skipif(system().lower().startswith("darwin"), reason="bug 1994056") @pytest.mark.headed @pytest.mark.noxvfb def test_manage_cookie_data(driver: Firefox): diff --git a/tests/security_and_privacy/test_third_party_content_blocked_private_browsing.py b/tests/security_and_privacy/test_third_party_content_blocked_private_browsing.py index e68161cfb..dfc4bfb93 100644 --- a/tests/security_and_privacy/test_third_party_content_blocked_private_browsing.py +++ b/tests/security_and_privacy/test_third_party_content_blocked_private_browsing.py @@ -1,3 +1,5 @@ +from platform import system + import pytest from selenium.webdriver import Firefox @@ -10,14 +12,12 @@ def test_case(): return "446323" -ALLOWED_TRACKING_URLS = set( - [ - "https://content-track-digest256.dummytracker.org", - "https://ads-track-digest256.dummytracker.org", - "https://social-track-digest256.dummytracker.org", - "https://analytics-track-digest256.dummytracker.org", - ] -) +ALLOWED_TRACKING_URLS = { + "https://content-track-digest256.dummytracker.org", + "https://ads-track-digest256.dummytracker.org", + "https://social-track-digest256.dummytracker.org", + "https://analytics-track-digest256.dummytracker.org", +} BLOCKED_TRACKER_URL = "https://content-track-digest256.dummytracker.org" FIRST_TRACKER_WEBSITE = "https://senglehardt.com/test/trackingprotection/test_pages/tracking_protection.html" @@ -103,6 +103,10 @@ def test_third_party_content_blocked_private_browsing_allowed_tracking(driver: F assert item.get_attribute("value") in ALLOWED_TRACKING_URLS +@pytest.mark.skipif( + system().lower().startswith("darwin") or system().lower().startswith("linux"), + reason="bug 1994060", +) def test_third_party_content_private_browsing_tracking_statuses(driver: Firefox): """ C446323.3: Ensure that the statuses of some third party content are loaded properly From 3e9766fbc7c61486f18ccf7bee7d2f2af22dd153 Mon Sep 17 00:00:00 2001 From: Tracy Date: Tue, 14 Oct 2025 11:34:29 -0500 Subject: [PATCH 2/2] Skip new failing tests --- modules/browser_object_tracker_panel.py | 2 +- .../test_download_pdf_from_context_menu.py | 5 +++++ tests/preferences/test_clear_cookie_data.py | 14 +++++++++---- tests/preferences/test_manage_cookie_data.py | 5 +++++ ..._party_content_blocked_private_browsing.py | 20 +++++++++++-------- 5 files changed, 33 insertions(+), 13 deletions(-) diff --git a/modules/browser_object_tracker_panel.py b/modules/browser_object_tracker_panel.py index a02762d64..839703a16 100644 --- a/modules/browser_object_tracker_panel.py +++ b/modules/browser_object_tracker_panel.py @@ -76,7 +76,7 @@ def wait_for_blocked_tracking_icon( self, nav: Navigation, page: BasePage ) -> BasePage: """ - Waits for the shield icon to indicate that cookies/trackers are being blocked by continuously refresing the page + Waits for the shield icon to indicate that cookies/trackers are being blocked by continuously refreshing the page Remember to open the passed in page beforehand, this waits for the page to load. diff --git a/tests/downloads/test_download_pdf_from_context_menu.py b/tests/downloads/test_download_pdf_from_context_menu.py index 49536e66e..eb07a5c42 100644 --- a/tests/downloads/test_download_pdf_from_context_menu.py +++ b/tests/downloads/test_download_pdf_from_context_menu.py @@ -1,3 +1,4 @@ +from platform import system from time import sleep import pytest @@ -24,6 +25,10 @@ def delete_files_regex_string(): PDF_TELEMETRY_DATA = ["downloads", "added", "fileExtension", "pdf"] +@pytest.mark.skipif( + system().lower().startswith("darwin") or system().lower().startswith("linux"), + reason="bug 1994061", +) @pytest.mark.headed def test_download_pdf_from_context_menu( driver: Firefox, diff --git a/tests/preferences/test_clear_cookie_data.py b/tests/preferences/test_clear_cookie_data.py index 8ca8120f6..e0ed97862 100644 --- a/tests/preferences/test_clear_cookie_data.py +++ b/tests/preferences/test_clear_cookie_data.py @@ -1,3 +1,5 @@ +from platform import system + import pytest from selenium.webdriver import Firefox from selenium.webdriver.support.ui import WebDriverWait @@ -24,7 +26,7 @@ def _dialog_options_present(about_prefs: AboutPrefs) -> bool: return False -def open_clear_cookies_data_dialog( +def _open_clear_cookies_data_dialog( about_prefs: AboutPrefs, ba: BrowserActions, wait: WebDriverWait ): """ @@ -53,6 +55,10 @@ def open_clear_cookies_data_dialog( # @pytest.mark.skipif(WIN_GHA, reason="Test unstable in Windows GA, tracked in 1990570") +@pytest.mark.skipif( + system().lower().startswith("darwin") or system().lower().startswith("linux"), + reason="bug 1994055", +) def test_clear_cookie_data(driver: Firefox): """ C143627: Cookies and site data can be cleared via the "Clear Data" panel @@ -65,7 +71,7 @@ def test_clear_cookie_data(driver: Firefox): driver.get(WEBSITE_ADDRESS) # Open dialog and read current value (must be > 0) - cookie_value = open_clear_cookies_data_dialog(about_prefs, ba, wait) + cookie_value = _open_clear_cookies_data_dialog(about_prefs, ba, wait) assert cookie_value > 0, f"Expected cookie/site data > 0, got {cookie_value}" # Clear cookies and site data: open dialog again, wait for iframe, click clear @@ -77,7 +83,7 @@ def test_clear_cookie_data(driver: Firefox): ba.switch_to_content_context() # Wait until the dialog reports 0 (reopen/poll via helper) - wait.until(lambda _: open_clear_cookies_data_dialog(about_prefs, ba, wait) == 0) + wait.until(lambda _: _open_clear_cookies_data_dialog(about_prefs, ba, wait) == 0) - final_value = open_clear_cookies_data_dialog(about_prefs, ba, wait) + final_value = _open_clear_cookies_data_dialog(about_prefs, ba, wait) assert final_value == 0, f"Expected 0 after clearing, got {final_value}" diff --git a/tests/preferences/test_manage_cookie_data.py b/tests/preferences/test_manage_cookie_data.py index 3cf377248..5dbc2cadb 100644 --- a/tests/preferences/test_manage_cookie_data.py +++ b/tests/preferences/test_manage_cookie_data.py @@ -1,3 +1,4 @@ +from platform import system from time import sleep import pytest @@ -16,6 +17,10 @@ def test_case(): COOKIE_SITE = "google.com" +@pytest.mark.skipif( + system().lower().startswith("darwin") or system().lower().startswith("linux"), + reason="bug 1994056", +) @pytest.mark.headed @pytest.mark.noxvfb def test_manage_cookie_data(driver: Firefox): diff --git a/tests/security_and_privacy/test_third_party_content_blocked_private_browsing.py b/tests/security_and_privacy/test_third_party_content_blocked_private_browsing.py index e68161cfb..dfc4bfb93 100644 --- a/tests/security_and_privacy/test_third_party_content_blocked_private_browsing.py +++ b/tests/security_and_privacy/test_third_party_content_blocked_private_browsing.py @@ -1,3 +1,5 @@ +from platform import system + import pytest from selenium.webdriver import Firefox @@ -10,14 +12,12 @@ def test_case(): return "446323" -ALLOWED_TRACKING_URLS = set( - [ - "https://content-track-digest256.dummytracker.org", - "https://ads-track-digest256.dummytracker.org", - "https://social-track-digest256.dummytracker.org", - "https://analytics-track-digest256.dummytracker.org", - ] -) +ALLOWED_TRACKING_URLS = { + "https://content-track-digest256.dummytracker.org", + "https://ads-track-digest256.dummytracker.org", + "https://social-track-digest256.dummytracker.org", + "https://analytics-track-digest256.dummytracker.org", +} BLOCKED_TRACKER_URL = "https://content-track-digest256.dummytracker.org" FIRST_TRACKER_WEBSITE = "https://senglehardt.com/test/trackingprotection/test_pages/tracking_protection.html" @@ -103,6 +103,10 @@ def test_third_party_content_blocked_private_browsing_allowed_tracking(driver: F assert item.get_attribute("value") in ALLOWED_TRACKING_URLS +@pytest.mark.skipif( + system().lower().startswith("darwin") or system().lower().startswith("linux"), + reason="bug 1994060", +) def test_third_party_content_private_browsing_tracking_statuses(driver: Firefox): """ C446323.3: Ensure that the statuses of some third party content are loaded properly