mirror of
https://github.com/feder-cr/invisible_playwright.git
synced 2026-06-07 08:35:12 +02:00
E9-E12 exercise the launcher's Linux code paths without spawning a real Firefox binary or Xvfb. They monkeypatch ``sys.platform`` and stub ``make_virtual_display`` / ``_binary_on_path`` so the tests run on any host: - E9 ``_build_prefs(headless=True)`` on Linux passes ``virtual_display=False`` to the translator, so the Win32-only ``security.sandbox.gpu.level`` workaround never leaks into Linux prefs (Xvfb handles window hiding instead). - E10 ``_resolve_headless`` on Linux + headless=True invokes the dispatcher and stores the returned object on ``self._virtual_display``. - E11 ``_teardown`` stops the Linux virtual display, clears the reference, and is idempotent on a second call. - E12 With Xvfb missing from PATH, ``_resolve_headless`` raises a clear ``RuntimeError`` mentioning ``Xvfb`` instead of a cryptic FileNotFoundError. Suite on Linux/WSL: 286 passed, 5 skipped (4 binary-gated E2E lifecycle tests + 1 Win32 ctypes test). Binary-gated E1/E2/E5/E8 remain ready to run on Linux once the patched Firefox tar.gz is fetched locally. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| conftest.py | ||
| test_async_api.py | ||
| test_cli.py | ||
| test_constants.py | ||
| test_download.py | ||
| test_e2e.py | ||
| test_headless.py | ||
| test_integration.py | ||
| test_launcher_helpers.py | ||
| test_network.py | ||
| test_prefs.py | ||
| test_profile.py | ||
| test_proxy.py | ||
| test_sampler.py | ||