1
+ import sys
1
2
from os import environ
2
3
3
4
import pytest
4
5
from selenium .webdriver import Firefox
5
- from selenium .webdriver .common .by import By
6
6
from selenium .webdriver .support import expected_conditions as EC
7
7
8
8
from modules .browser_object import TabBar
11
11
COOKIE_CONSENT_SELECTOR = (
12
12
"button[aria-label^='Accept all'], button[aria-label^='Accept the use']"
13
13
)
14
+ WIN_GHA = environ .get ("GITHUB_ACTIONS" ) == "true" and sys .platform .startswith ("win" )
14
15
15
16
16
17
@pytest .fixture ()
@@ -23,20 +24,13 @@ def add_to_prefs_list():
23
24
return [("network.cookie.cookieBehavior" , "2" )]
24
25
25
26
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" )
31
28
@pytest .mark .audio
32
29
def test_mute_unmute_tab (screenshot , driver : Firefox , video_url : str ):
33
30
"""C134719, test that tabs can be muted and unmuted"""
34
31
tabs = TabBar (driver )
35
32
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" ))
40
34
41
35
with driver .context (driver .CONTEXT_CHROME ):
42
36
tabs .expect_tab_sound_status (1 , tabs .MEDIA_STATUS .PLAYING )
0 commit comments