From cf6966260b0ba9b7f670167286b8831336dbc910 Mon Sep 17 00:00:00 2001 From: soncuteanca Date: Thu, 25 Sep 2025 18:15:54 +0300 Subject: [PATCH 1/5] Add refactored tests 330155 and 330156 --- modules/browser_object_tabbar.py | 5 ++- modules/data/navigation.components.json | 6 --- modules/page_object_prefs.py | 29 +++++++++++++- .../test_allow_audio_video_functionality.py | 40 ++++--------------- .../test_block_audio_video_functionality.py | 22 ++-------- .../test_users_actions_saved_on_reload.py | 4 +- 6 files changed, 45 insertions(+), 61 deletions(-) diff --git a/modules/browser_object_tabbar.py b/modules/browser_object_tabbar.py index c8ad3fa0e..c2735a7aa 100644 --- a/modules/browser_object_tabbar.py +++ b/modules/browser_object_tabbar.py @@ -136,10 +136,13 @@ def get_tab_title(self, tab_element: WebElement) -> str: tab_label = tab_element.find_element(*self.get_selector("tab-title")) return tab_label.text + @BasePage.context_chrome def expect_tab_sound_status( self, identifier: Union[str, int], status: MediaStatus ) -> BasePage: - """Check to see if the tab has an expected MediaStatus""" + """ + Check to see if the tab has an expected MediaStatus + """ tab = self.get_tab(identifier) self.wait.until(lambda _: tab.get_attribute(status) is not None) return self diff --git a/modules/data/navigation.components.json b/modules/data/navigation.components.json index a46b111bd..33108ce28 100644 --- a/modules/data/navigation.components.json +++ b/modules/data/navigation.components.json @@ -501,12 +501,6 @@ "groups": [] }, - "autoplay-permission": { - "selectorData": "blocked-permissions-container", - "strategy": "id", - "groups": [] - }, - "permissions-location-icon": { "selectorData": "permissions-granted-icon", "strategy": "id", diff --git a/modules/page_object_prefs.py b/modules/page_object_prefs.py index 465d76b04..009b7c45a 100644 --- a/modules/page_object_prefs.py +++ b/modules/page_object_prefs.py @@ -1,7 +1,7 @@ import datetime import re from time import sleep -from typing import List +from typing import List, Literal from selenium.webdriver import Firefox from selenium.webdriver.common.by import By @@ -561,6 +561,33 @@ def get_manage_data_site_element(self, site: str) -> WebElement: element = self.get_element("manage-cookies-site", labels=[site]) return element + def set_autoplay_setting( + self, + settings: Literal[ + "allow-audio-video", + "block-audio-video", + "allow-audio-only", + ], + ) -> "AboutPrefs": + """ + Open the Autoplay settings panel and choose a policy for all sites. + Arguments: + policy : Literal["allow-audio-video", "block-audio-video", "allow-audio-only"] + - "allow-audio-video": Allow both audio and video autoplay + - "block-audio-video": Block both audio and video autoplay + - "allow-audio-only": Allow audio but block video autoplay + """ + self.open() + self.click_on("autoplay-settings-button") + + self.driver.switch_to.frame(self.get_iframe()) + + self.click_on("autoplay-settings") + self.click_on(settings) + self.click_on("spacer") + self.click_on("autoplay-save-changes") + return self + # Utility Functions def import_bookmarks(self, browser_name: str, platform) -> BasePage: """ diff --git a/tests/audio_video/test_allow_audio_video_functionality.py b/tests/audio_video/test_allow_audio_video_functionality.py index a6b87755f..d46816e0f 100644 --- a/tests/audio_video/test_allow_audio_video_functionality.py +++ b/tests/audio_video/test_allow_audio_video_functionality.py @@ -1,6 +1,5 @@ import sys from os import environ -from time import sleep import pytest from selenium.webdriver import Firefox @@ -8,7 +7,6 @@ from modules.browser_object_tabbar import TabBar from modules.page_object_generics import GenericPage from modules.page_object_prefs import AboutPrefs -from modules.util import BrowserActions @pytest.fixture() @@ -22,45 +20,21 @@ def test_case(): TEST_URL = "https://www.mlb.com/video/rockies-black-agree-on-extension" -@pytest.mark.skipif(WIN_GHA, reason="Test unstable in Windows Github Actions") +# @pytest.mark.skipif(WIN_GHA, reason="Test unstable in Windows Github Actions") @pytest.mark.audio @pytest.mark.noxvfb def test_allow_audio_video_functionality(driver: Firefox): """ - C330155 : 'Allow Audio and Video' functionality + C330155: 'Allow Audio and Video' functionality """ # Instantiate objects about_prefs = AboutPrefs(driver, category="privacy") - ba = BrowserActions(driver) tabs = TabBar(driver) + page = GenericPage(driver, url=TEST_URL) # Open privacy and click on the "Settings" button from Autoplay - about_prefs.open() - about_prefs.get_element("autoplay-settings-button").click() + about_prefs.set_autoplay_setting("allow-audio-video") - # Get the web element for the iframe - iframe = about_prefs.get_iframe() - ba.switch_to_iframe_context(iframe) - - # Click on the autoplay settings for all websites - about_prefs.get_element("autoplay-settings").click() - - # Choose allow audio and video and save changes - about_prefs.click_on("allow-audio-video") - about_prefs.get_element("spacer").click() - about_prefs.get_element("autoplay-save-changes").click() - - # Open test website and check the site is loaded and the featured video starts playing with sound - GenericPage(driver, url=TEST_URL).open() - max_retries = 3 - for attempt in range(max_retries): - try: - with driver.context(driver.CONTEXT_CHROME): - tabs.expect_tab_sound_status(1, tabs.MEDIA_STATUS.PLAYING) - break # Success! - except AssertionError: - sleep(2) - else: - pytest.fail( - f"Tab sound status did not reach PLAYING after {max_retries} retries." - ) + # Open the website and check if the video starts playing with sound + page.open() + tabs.expect_tab_sound_status(1, tabs.MEDIA_STATUS.PLAYING) diff --git a/tests/audio_video/test_block_audio_video_functionality.py b/tests/audio_video/test_block_audio_video_functionality.py index 13e7f87e6..a8ec03581 100644 --- a/tests/audio_video/test_block_audio_video_functionality.py +++ b/tests/audio_video/test_block_audio_video_functionality.py @@ -4,7 +4,6 @@ from modules.browser_object_navigation import Navigation from modules.page_object_generics import GenericPage from modules.page_object_prefs import AboutPrefs -from modules.util import BrowserActions @pytest.fixture() @@ -21,26 +20,13 @@ def test_block_audio_video_functionality(driver: Firefox): """ # Instantiate objects about_prefs = AboutPrefs(driver, category="privacy") - ba = BrowserActions(driver) nav = Navigation(driver) + page = GenericPage(driver, url=TEST_URL) # Open privacy and click on the "Settings" button from Autoplay - about_prefs.open() - about_prefs.get_element("autoplay-settings-button").click() - - # Get the web element for the iframe - iframe = about_prefs.get_iframe() - ba.switch_to_iframe_context(iframe) - - # Click on the autoplay settings for all websites - about_prefs.get_element("autoplay-settings").click() - - # Choose block audio and video and save changes - about_prefs.click_on("block-audio-video") - about_prefs.get_element("spacer").click() - about_prefs.get_element("autoplay-save-changes").click() + about_prefs.set_autoplay_setting("block-audio-video") # Open test website and check the site is loaded and the featured video is not playing - GenericPage(driver, url=TEST_URL).open() - nav.click_on("autoplay-permission") + page.open() + nav.click_on("autoplay-icon-blocked") nav.element_visible("permission-popup-audio-video-blocked") diff --git a/tests/audio_video/test_users_actions_saved_on_reload.py b/tests/audio_video/test_users_actions_saved_on_reload.py index 4b399b737..bbcca583b 100644 --- a/tests/audio_video/test_users_actions_saved_on_reload.py +++ b/tests/audio_video/test_users_actions_saved_on_reload.py @@ -36,7 +36,7 @@ def test_users_actions_saved_on_reload(driver: Firefox): GenericPage(driver, url=TEST_URL).open() # Open the Site information panel and check "Allow Audio and Video" - nav.click_on("autoplay-permission") + nav.click_on("autoplay-icon-blocked") nav.click_on("permission-popup-audio-blocked") nav.click_and_hide_menu("allow-audio-video-menuitem") @@ -61,7 +61,7 @@ def test_users_actions_saved_on_reload(driver: Firefox): GenericPage(driver, url=TEST_URL).open() # Open the Site information panel and check "Block Audio and Video" - nav.click_on("autoplay-permission") + nav.click_on("autoplay-icon-blocked") nav.click_on("permission-popup-audio-video-allowed") nav.click_and_hide_menu("block-audio-video-menuitem") From 391d453f795641d71f1b4651b07ddc9a3f9e53aa Mon Sep 17 00:00:00 2001 From: soncuteanca Date: Fri, 26 Sep 2025 19:18:03 +0300 Subject: [PATCH 2/5] Update methods --- modules/browser_object_navigation.py | 8 ++++++ modules/page_object_prefs.py | 17 ++++++++----- .../test_allow_audio_video_functionality.py | 2 +- .../test_users_actions_saved_on_reload.py | 25 ++++++------------- 4 files changed, 28 insertions(+), 24 deletions(-) diff --git a/modules/browser_object_navigation.py b/modules/browser_object_navigation.py index ad0c64467..e4e360331 100644 --- a/modules/browser_object_navigation.py +++ b/modules/browser_object_navigation.py @@ -658,3 +658,11 @@ def expect_bookmarks_toolbar_visibility(self, expected: bool) -> None: self.expect_element_attribute_contains( self.bookmarks_toolbar, "collapsed", expected_value ) + + def open_audio_video_permission(self) -> BasePage: + """Open the Site information panel and select "Allow Audio and Video" """ + self.click_on("autoplay-icon-blocked") + self.element_clickable("permission-popup-audio-blocked") + self.click_on("permission-popup-audio-blocked") + self.click_and_hide_menu("allow-audio-video-menuitem") + return self diff --git a/modules/page_object_prefs.py b/modules/page_object_prefs.py index 009b7c45a..ff72d3af4 100644 --- a/modules/page_object_prefs.py +++ b/modules/page_object_prefs.py @@ -561,6 +561,16 @@ def get_manage_data_site_element(self, site: str) -> WebElement: element = self.get_element("manage-cookies-site", labels=[site]) return element + def open_autopaly_modal(self) -> BasePage: + """ + Opens the Autoplay settings modal dialog from the about:preferences#privacy page. + """ + self.open() + self.click_on("autoplay-settings-button") + self.driver.switch_to.frame(self.get_iframe()) + self.click_on("autoplay-settings") + return self + def set_autoplay_setting( self, settings: Literal[ @@ -577,12 +587,7 @@ def set_autoplay_setting( - "block-audio-video": Block both audio and video autoplay - "allow-audio-only": Allow audio but block video autoplay """ - self.open() - self.click_on("autoplay-settings-button") - - self.driver.switch_to.frame(self.get_iframe()) - - self.click_on("autoplay-settings") + self.open_autopaly_modal() self.click_on(settings) self.click_on("spacer") self.click_on("autoplay-save-changes") diff --git a/tests/audio_video/test_allow_audio_video_functionality.py b/tests/audio_video/test_allow_audio_video_functionality.py index d46816e0f..b54606c55 100644 --- a/tests/audio_video/test_allow_audio_video_functionality.py +++ b/tests/audio_video/test_allow_audio_video_functionality.py @@ -20,7 +20,7 @@ def test_case(): TEST_URL = "https://www.mlb.com/video/rockies-black-agree-on-extension" -# @pytest.mark.skipif(WIN_GHA, reason="Test unstable in Windows Github Actions") +@pytest.mark.skipif(WIN_GHA, reason="Test unstable in Windows Github Actions") @pytest.mark.audio @pytest.mark.noxvfb def test_allow_audio_video_functionality(driver: Firefox): diff --git a/tests/audio_video/test_users_actions_saved_on_reload.py b/tests/audio_video/test_users_actions_saved_on_reload.py index bbcca583b..8188049a9 100644 --- a/tests/audio_video/test_users_actions_saved_on_reload.py +++ b/tests/audio_video/test_users_actions_saved_on_reload.py @@ -4,7 +4,6 @@ from modules.browser_object_navigation import Navigation from modules.page_object_generics import GenericPage from modules.page_object_prefs import AboutPrefs -from modules.util import BrowserActions @pytest.fixture() @@ -30,15 +29,13 @@ def test_users_actions_saved_on_reload(driver: Firefox): # Instantiate objects nav = Navigation(driver) about_prefs = AboutPrefs(driver, category="privacy") - ba = BrowserActions(driver) + page = GenericPage(driver, url=TEST_URL) # Open Test page - GenericPage(driver, url=TEST_URL).open() + page.open() - # Open the Site information panel and check "Allow Audio and Video" - nav.click_on("autoplay-icon-blocked") - nav.click_on("permission-popup-audio-blocked") - nav.click_and_hide_menu("allow-audio-video-menuitem") + # Open the Audio-Video Permission panel and check "Allow Audio and Video" + nav.open_audio_video_permission() # Refresh test page and check the site information panel shows "Allow Audio and Video" driver.get(driver.current_url) @@ -48,17 +45,11 @@ def test_users_actions_saved_on_reload(driver: Firefox): nav.element_not_visible("autoplay-icon-blocked") # Check the website is added to the exceptions list in about:preferences#privacy - about_prefs.open() - about_prefs.get_element("autoplay-settings-button").click() - - # Get the web element for the iframe - iframe = about_prefs.get_iframe() - ba.switch_to_iframe_context(iframe) - + about_prefs.open_autopaly_modal() about_prefs.element_visible("mlb-allow-audio-video-settings") - # Open Test page - GenericPage(driver, url=TEST_URL).open() + # # Open Test page + page.open() # Open the Site information panel and check "Block Audio and Video" nav.click_on("autoplay-icon-blocked") @@ -71,7 +62,7 @@ def test_users_actions_saved_on_reload(driver: Firefox): nav.element_visible("autoplay-icon-blocked") # Revisit test page and check Site information panel shows "Block Audio and Video" - GenericPage(driver, url=TEST_URL).open() + page.open() nav.element_visible("permission-popup-audio-video-blocked") # Check the Crossed off Play icon is displayed From e767119971ff21ee5369755ce04355890712ffa7 Mon Sep 17 00:00:00 2001 From: soncuteanca Date: Fri, 26 Sep 2025 21:00:32 +0300 Subject: [PATCH 3/5] Avoid duplication --- modules/browser_object_navigation.py | 41 ++++++++++++++++--- modules/page_object_prefs.py | 22 ++++------ .../test_allow_audio_video_functionality.py | 2 +- .../test_block_audio_video_functionality.py | 4 +- .../test_users_actions_saved_on_reload.py | 32 ++++++--------- 5 files changed, 58 insertions(+), 43 deletions(-) diff --git a/modules/browser_object_navigation.py b/modules/browser_object_navigation.py index e4e360331..d4e3d9326 100644 --- a/modules/browser_object_navigation.py +++ b/modules/browser_object_navigation.py @@ -1,4 +1,5 @@ import logging +from typing import Literal from selenium.common.exceptions import TimeoutException from selenium.webdriver import ActionChains, Firefox @@ -659,10 +660,40 @@ def expect_bookmarks_toolbar_visibility(self, expected: bool) -> None: self.bookmarks_toolbar, "collapsed", expected_value ) - def open_audio_video_permission(self) -> BasePage: - """Open the Site information panel and select "Allow Audio and Video" """ + # + def set_site_autoplay_permission(self, settings: Literal["allow-audio-video", "block-audio-video", "allow-audio-only"]) -> BasePage: + """ + Open the Site audio-video permission panel and set a specific autoplay setting. + + Arguments: + settings: "allow-audio-video" → Allow Audio and Video, "block-audio-video" → Block Audio and Video, + "allow-audio-only" → Allow Audio but block Video + """ self.click_on("autoplay-icon-blocked") - self.element_clickable("permission-popup-audio-blocked") - self.click_on("permission-popup-audio-blocked") - self.click_and_hide_menu("allow-audio-video-menuitem") + + if settings == "allow-audio-video": + self.element_clickable("permission-popup-audio-blocked") + self.click_on("permission-popup-audio-blocked") + self.click_and_hide_menu("allow-audio-video-menuitem") + + elif settings == "block-audio-video": + self.element_clickable("permission-popup-audio-video-allowed") + self.click_and_hide_menu("block-audio-video-menuitem") + + elif settings == "allow-audio-only": + self.element_clickable("permission-popup-audio-video-allowed") + self.click_and_hide_menu("allow-audio-only-menuitem") return self + + def verify_autoplay_state(self, expected: Literal["allow", "block"]) -> None: + """ Verify the current state of the autoplay permission panel and icon. + Arguments: + expected: "allow" → Allow Audio and Video, "block" → Block Audio and Video + """ + if expected == "allow": + self.element_visible("permission-popup-audio-video-allowed") + self.element_not_visible("autoplay-icon-blocked") + else: + self.element_visible("permission-popup-audio-video-blocked") + self.element_visible("autoplay-icon-blocked") + diff --git a/modules/page_object_prefs.py b/modules/page_object_prefs.py index ff72d3af4..2737c849b 100644 --- a/modules/page_object_prefs.py +++ b/modules/page_object_prefs.py @@ -561,7 +561,7 @@ def get_manage_data_site_element(self, site: str) -> WebElement: element = self.get_element("manage-cookies-site", labels=[site]) return element - def open_autopaly_modal(self) -> BasePage: + def open_autoplay_modal(self) -> BasePage: """ Opens the Autoplay settings modal dialog from the about:preferences#privacy page. """ @@ -571,23 +571,15 @@ def open_autopaly_modal(self) -> BasePage: self.click_on("autoplay-settings") return self - def set_autoplay_setting( - self, - settings: Literal[ - "allow-audio-video", - "block-audio-video", - "allow-audio-only", - ], - ) -> "AboutPrefs": + def set_autoplay_setting_in_preferences( + self, settings: Literal["allow-audio-video", "block-audio-video", "allow-audio-only"]) -> BasePage: """ - Open the Autoplay settings panel and choose a policy for all sites. + Open the Autoplay settings panel and choose a setting for all sites. Arguments: - policy : Literal["allow-audio-video", "block-audio-video", "allow-audio-only"] - - "allow-audio-video": Allow both audio and video autoplay - - "block-audio-video": Block both audio and video autoplay - - "allow-audio-only": Allow audio but block video autoplay + settings: "allow-audio-video" → Allow Audio and Video, "block-audio-video" → Block Audio and Video, + "allow-audio-only" → Allow Audio but block Video """ - self.open_autopaly_modal() + self.open_autoplay_modal() self.click_on(settings) self.click_on("spacer") self.click_on("autoplay-save-changes") diff --git a/tests/audio_video/test_allow_audio_video_functionality.py b/tests/audio_video/test_allow_audio_video_functionality.py index b54606c55..c74c5e032 100644 --- a/tests/audio_video/test_allow_audio_video_functionality.py +++ b/tests/audio_video/test_allow_audio_video_functionality.py @@ -33,7 +33,7 @@ def test_allow_audio_video_functionality(driver: Firefox): page = GenericPage(driver, url=TEST_URL) # Open privacy and click on the "Settings" button from Autoplay - about_prefs.set_autoplay_setting("allow-audio-video") + about_prefs.set_autoplay_setting_in_preferences("allow-audio-video") # Open the website and check if the video starts playing with sound page.open() diff --git a/tests/audio_video/test_block_audio_video_functionality.py b/tests/audio_video/test_block_audio_video_functionality.py index a8ec03581..012af3de7 100644 --- a/tests/audio_video/test_block_audio_video_functionality.py +++ b/tests/audio_video/test_block_audio_video_functionality.py @@ -24,9 +24,9 @@ def test_block_audio_video_functionality(driver: Firefox): page = GenericPage(driver, url=TEST_URL) # Open privacy and click on the "Settings" button from Autoplay - about_prefs.set_autoplay_setting("block-audio-video") + about_prefs.set_autoplay_setting_in_preferences("block-audio-video") # Open test website and check the site is loaded and the featured video is not playing page.open() nav.click_on("autoplay-icon-blocked") - nav.element_visible("permission-popup-audio-video-blocked") + nav.verify_autoplay_state("block") diff --git a/tests/audio_video/test_users_actions_saved_on_reload.py b/tests/audio_video/test_users_actions_saved_on_reload.py index 8188049a9..ffcb6c517 100644 --- a/tests/audio_video/test_users_actions_saved_on_reload.py +++ b/tests/audio_video/test_users_actions_saved_on_reload.py @@ -31,39 +31,31 @@ def test_users_actions_saved_on_reload(driver: Firefox): about_prefs = AboutPrefs(driver, category="privacy") page = GenericPage(driver, url=TEST_URL) - # Open Test page + # Open the test page page.open() # Open the Audio-Video Permission panel and check "Allow Audio and Video" - nav.open_audio_video_permission() + nav.set_site_autoplay_permission("allow-audio-video") - # Refresh test page and check the site information panel shows "Allow Audio and Video" + # Refresh test page and check the Audio-Video Permission panel shows "Allow Audio and Video" and the crossed off + # Play icon is no longer displayed driver.get(driver.current_url) - nav.element_visible("permission-popup-audio-video-allowed") - - # Check the Crossed off Play icon is no longer displayed - nav.element_not_visible("autoplay-icon-blocked") + nav.verify_autoplay_state("allow") # Check the website is added to the exceptions list in about:preferences#privacy - about_prefs.open_autopaly_modal() + about_prefs.open_autoplay_modal() about_prefs.element_visible("mlb-allow-audio-video-settings") - # # Open Test page + # # Open the test page page.open() - # Open the Site information panel and check "Block Audio and Video" - nav.click_on("autoplay-icon-blocked") - nav.click_on("permission-popup-audio-video-allowed") - nav.click_and_hide_menu("block-audio-video-menuitem") + # Open the Audio-Video Permission panel and check "Block Audio and Video" + nav.set_site_autoplay_permission("block-audio-video") - # Refresh test page and check the site information panel shows "Block Audio and Video" + # Refresh test page and check the Audio-Video Permission panel shows "Block Audio and Video" driver.get(driver.current_url) - nav.element_visible("permission-popup-audio-video-blocked") - nav.element_visible("autoplay-icon-blocked") + nav.verify_autoplay_state("block") # Revisit test page and check Site information panel shows "Block Audio and Video" page.open() - nav.element_visible("permission-popup-audio-video-blocked") - - # Check the Crossed off Play icon is displayed - nav.element_visible("autoplay-icon-blocked") + nav.verify_autoplay_state("block") From 4a87167e4f7ee14d8939c09eb141351d594f537c Mon Sep 17 00:00:00 2001 From: soncuteanca Date: Mon, 29 Sep 2025 12:24:45 +0300 Subject: [PATCH 4/5] Disable scrolling test --- modules/browser_object_navigation.py | 16 +++++++++------- modules/page_object_prefs.py | 4 +++- .../test_zoom_text_only.py | 1 + 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/modules/browser_object_navigation.py b/modules/browser_object_navigation.py index d4e3d9326..b64aad288 100644 --- a/modules/browser_object_navigation.py +++ b/modules/browser_object_navigation.py @@ -661,12 +661,15 @@ def expect_bookmarks_toolbar_visibility(self, expected: bool) -> None: ) # - def set_site_autoplay_permission(self, settings: Literal["allow-audio-video", "block-audio-video", "allow-audio-only"]) -> BasePage: + def set_site_autoplay_permission( + self, + settings: Literal["allow-audio-video", "block-audio-video", "allow-audio-only"], + ) -> BasePage: """ Open the Site audio-video permission panel and set a specific autoplay setting. - Arguments: - settings: "allow-audio-video" → Allow Audio and Video, "block-audio-video" → Block Audio and Video, + Arguments: + settings: "allow-audio-video" → Allow Audio and Video, "block-audio-video" → Block Audio and Video, "allow-audio-only" → Allow Audio but block Video """ self.click_on("autoplay-icon-blocked") @@ -686,9 +689,9 @@ def set_site_autoplay_permission(self, settings: Literal["allow-audio-video", "b return self def verify_autoplay_state(self, expected: Literal["allow", "block"]) -> None: - """ Verify the current state of the autoplay permission panel and icon. - Arguments: - expected: "allow" → Allow Audio and Video, "block" → Block Audio and Video + """Verify the current state of the autoplay permission panel and icon. + Arguments: + expected: "allow" → Allow Audio and Video, "block" → Block Audio and Video """ if expected == "allow": self.element_visible("permission-popup-audio-video-allowed") @@ -696,4 +699,3 @@ def verify_autoplay_state(self, expected: Literal["allow", "block"]) -> None: else: self.element_visible("permission-popup-audio-video-blocked") self.element_visible("autoplay-icon-blocked") - diff --git a/modules/page_object_prefs.py b/modules/page_object_prefs.py index 2737c849b..db11765ca 100644 --- a/modules/page_object_prefs.py +++ b/modules/page_object_prefs.py @@ -572,7 +572,9 @@ def open_autoplay_modal(self) -> BasePage: return self def set_autoplay_setting_in_preferences( - self, settings: Literal["allow-audio-video", "block-audio-video", "allow-audio-only"]) -> BasePage: + self, + settings: Literal["allow-audio-video", "block-audio-video", "allow-audio-only"], + ) -> BasePage: """ Open the Autoplay settings panel and choose a setting for all sites. Arguments: diff --git a/tests/scrolling_panning_zooming/test_zoom_text_only.py b/tests/scrolling_panning_zooming/test_zoom_text_only.py index 629cdae22..96d2160bf 100644 --- a/tests/scrolling_panning_zooming/test_zoom_text_only.py +++ b/tests/scrolling_panning_zooming/test_zoom_text_only.py @@ -84,6 +84,7 @@ def reject_consent_page(web_page: GenericPage): pass +@pytest.mark.skip(reason="Tracked in bug 1991139") @pytest.mark.ci @pytest.mark.noxvfb def test_zoom_text_only_from_settings( From 1e7ea84d73a615648b6e96cafa5cd7546410eb86 Mon Sep 17 00:00:00 2001 From: soncuteanca Date: Mon, 29 Sep 2025 13:44:25 +0300 Subject: [PATCH 5/5] Disable unstable cookie test on Windows --- tests/preferences/test_clear_cookie_data.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/preferences/test_clear_cookie_data.py b/tests/preferences/test_clear_cookie_data.py index 540e1cf64..512f2beef 100644 --- a/tests/preferences/test_clear_cookie_data.py +++ b/tests/preferences/test_clear_cookie_data.py @@ -1,3 +1,6 @@ +import sys +from os import environ + import pytest from selenium.webdriver import Firefox @@ -10,6 +13,9 @@ def test_case(): return "143627" +WIN_GHA = environ.get("GITHUB_ACTIONS") == "true" and sys.platform.startswith("win") + + def open_clear_cookies_data_dialog(about_prefs: AboutPrefs, ba: BrowserActions): about_prefs.open() clear_data_popup = about_prefs.press_button_get_popup_dialog_iframe("Clear Data") @@ -17,6 +23,7 @@ def open_clear_cookies_data_dialog(about_prefs: AboutPrefs, ba: BrowserActions): return about_prefs.get_clear_cookie_data_value() +@pytest.mark.skipif(WIN_GHA, reason="Test unstable in Windows GA, tracked in 1990570") def test_clear_cookie_data(driver: Firefox): """ C143627: Cookies and site data can be cleared via the "Clear Data" panel