1+ import sys
12from os import environ
23
34import pytest
45from selenium .webdriver import Firefox
5- from selenium .webdriver .common .by import By
66from selenium .webdriver .support import expected_conditions as EC
77
88from modules .browser_object import TabBar
1111COOKIE_CONSENT_SELECTOR = (
1212 "button[aria-label^='Accept all'], button[aria-label^='Accept the use']"
1313)
14+ WIN_GHA = environ .get ("GITHUB_ACTIONS" ) == "true" and sys .platform .startswith ("win" )
1415
1516
1617@pytest .fixture ()
@@ -23,20 +24,13 @@ def add_to_prefs_list():
2324 return [("network.cookie.cookieBehavior" , "2" )]
2425
2526
26- GHA = environ .get ("GITHUB_ACTIONS" ) == "true"
27-
28-
29- @pytest .mark .unstable (reason = "Bug https://bugzilla.mozilla.org/show_bug.cgi?id=1982379" )
30- @pytest .mark .skipif (GHA , reason = "Test unstable in Github Actions" )
27+ @pytest .mark .skipif (WIN_GHA , reason = "Test unstable on Windows in Github Actions" )
3128@pytest .mark .audio
3229def test_mute_unmute_tab (screenshot , driver : Firefox , video_url : str ):
3330 """C134719, test that tabs can be muted and unmuted"""
3431 tabs = TabBar (driver )
3532 driver .get (video_url )
36- tabs .expect (EC .title_contains ("Top 10" ))
37-
38- play_button = driver .find_element (By .CSS_SELECTOR , PLAY_BUTTON_SELECTOR )
39- play_button .click ()
33+ tabs .expect (EC .title_contains ("mov_bbb.mp4" ))
4034
4135 with driver .context (driver .CONTEXT_CHROME ):
4236 tabs .expect_tab_sound_status (1 , tabs .MEDIA_STATUS .PLAYING )
0 commit comments