Skip to content

Commit 6a1ebe6

Browse files
committed
Skipif WIN_GHA
1 parent 89bf6e7 commit 6a1ebe6

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

tests/tabs/test_mute_tabs.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import logging
2-
from time import sleep
1+
import sys
2+
from os import environ
33

44
import pytest
5-
from selenium.common.exceptions import NoSuchElementException
65
from selenium.webdriver import Firefox
76
from selenium.webdriver.support import expected_conditions as EC
87

@@ -25,6 +24,10 @@ def add_to_prefs_list():
2524
return [("network.cookie.cookieBehavior", "2")]
2625

2726

27+
WIN_GHA = environ.get("GITHUB_ACTIONS") == "true" and sys.platform.startswith("win")
28+
29+
30+
@pytest.mark.skipif(WIN_GHA, reason="Test unstable on Windows in Github Actions")
2831
@pytest.mark.audio
2932
def test_mute_unmute_tab(screenshot, driver: Firefox, video_url: str):
3033
"""C134719, test that tabs can be muted and unmuted"""
@@ -33,11 +36,7 @@ def test_mute_unmute_tab(screenshot, driver: Firefox, video_url: str):
3336
tabs.expect(EC.title_contains("mov_bbb.mp4"))
3437

3538
with driver.context(driver.CONTEXT_CHROME):
36-
tab = tabs.get_tab(1)
37-
tabs.wait.until(
38-
lambda _: tab.get_attribute(tabs.MEDIA_STATUS.PLAYING) is not None
39-
)
40-
39+
tabs.expect_tab_sound_status(1, tabs.MEDIA_STATUS.PLAYING)
4140
tabs.click_tab_mute_button(1)
4241
tabs.expect_tab_sound_status(1, tabs.MEDIA_STATUS.MUTED)
4342
tabs.click_tab_mute_button(1)

0 commit comments

Comments
 (0)