diff --git a/tests/tabs/conftest.py b/tests/tabs/conftest.py index bac21958..cd629f6c 100644 --- a/tests/tabs/conftest.py +++ b/tests/tabs/conftest.py @@ -21,4 +21,4 @@ def add_to_prefs_list(): @pytest.fixture() def video_url(): - return "https://www.youtube.com/watch?v=mAia0v3ojzw" + return "https://www.w3schools.com/html/mov_bbb.mp4" diff --git a/tests/tabs/test_mute_tabs.py b/tests/tabs/test_mute_tabs.py index 983268da..5e608335 100644 --- a/tests/tabs/test_mute_tabs.py +++ b/tests/tabs/test_mute_tabs.py @@ -1,8 +1,8 @@ +import sys from os import environ import pytest from selenium.webdriver import Firefox -from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from modules.browser_object import TabBar @@ -11,6 +11,7 @@ COOKIE_CONSENT_SELECTOR = ( "button[aria-label^='Accept all'], button[aria-label^='Accept the use']" ) +WIN_GHA = environ.get("GITHUB_ACTIONS") == "true" and sys.platform.startswith("win") @pytest.fixture() @@ -23,20 +24,13 @@ def add_to_prefs_list(): return [("network.cookie.cookieBehavior", "2")] -GHA = environ.get("GITHUB_ACTIONS") == "true" - - -@pytest.mark.unstable(reason="Bug https://bugzilla.mozilla.org/show_bug.cgi?id=1982379") -@pytest.mark.skipif(GHA, reason="Test unstable in Github Actions") +@pytest.mark.skipif(WIN_GHA, reason="Test unstable on Windows in Github Actions") @pytest.mark.audio def test_mute_unmute_tab(screenshot, driver: Firefox, video_url: str): """C134719, test that tabs can be muted and unmuted""" tabs = TabBar(driver) driver.get(video_url) - tabs.expect(EC.title_contains("Top 10")) - - play_button = driver.find_element(By.CSS_SELECTOR, PLAY_BUTTON_SELECTOR) - play_button.click() + tabs.expect(EC.title_contains("mov_bbb.mp4")) with driver.context(driver.CONTEXT_CHROME): tabs.expect_tab_sound_status(1, tabs.MEDIA_STATUS.PLAYING)