allow to mute and unmute tabs and get mute status into tab info
Testing / test (push) Failing after 34s

This commit is contained in:
2026-04-13 21:19:27 +02:00
parent 5150933319
commit c494e76fe2
7 changed files with 84 additions and 3 deletions
+19
View File
@@ -12,6 +12,7 @@ def test_tabs_list(browser):
assert "windowId" in first
assert "url" in first
assert "title" in first
assert "muted" in first
def test_tabs_count(browser):
@@ -114,3 +115,21 @@ def test_tabs_merge_windows_no_crash(browser):
result = browser("tabs.merge_windows")
assert isinstance(result, dict)
assert "moved" in result
def test_tabs_mute_and_unmute(browser, http_tab):
muted = browser("tabs.mute", {"tabId": http_tab["id"]})
assert isinstance(muted, dict)
assert muted["tabId"] == http_tab["id"]
assert muted["muted"] is True
listed = browser("tabs.list")
listed_tab = next(t for t in listed if t["id"] == http_tab["id"])
assert listed_tab["muted"] is True
unmuted = browser("tabs.unmute", {"tabId": http_tab["id"]})
assert isinstance(unmuted, dict)
assert unmuted["tabId"] == http_tab["id"]
assert unmuted["muted"] is False
listed = browser("tabs.list")
listed_tab = next(t for t in listed if t["id"] == http_tab["id"])
assert listed_tab["muted"] is False