mirror of
https://github.com/feder-cr/invisible_playwright.git
synced 2026-07-16 11:31:11 +02:00
Add macOS support
This commit is contained in:
parent
143aff4bd2
commit
d09200f01d
10 changed files with 240 additions and 50 deletions
|
|
@ -241,3 +241,16 @@ def test_e12_linux_resolve_headless_without_xvfb_raises_clear_error(monkeypatch)
|
|||
with pytest.raises(RuntimeError, match="Xvfb"):
|
||||
ip._resolve_headless()
|
||||
assert ip._virtual_display is None
|
||||
|
||||
|
||||
@pytest.mark.e2e
|
||||
def test_e13_darwin_resolve_headless_raises_clear_error(monkeypatch):
|
||||
"""E13: macOS can launch visibly, but ``headless=True`` should fail
|
||||
early with a clear message until an invisible backend exists."""
|
||||
import sys as _sys
|
||||
monkeypatch.setattr(_sys, "platform", "darwin")
|
||||
|
||||
ip = InvisiblePlaywright(seed=42, headless=True)
|
||||
with pytest.raises(RuntimeError, match="headless=True is not yet supported on macOS"):
|
||||
ip._resolve_headless()
|
||||
assert ip._virtual_display is None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue