invisible_playwright/tests
chrissbaumann 70c1ca464f test(e2e): add 4 Linux launcher-routing tests for Phase 9
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>
2026-05-14 14:07:03 +02:00
..
conftest.py test: add pytest markers, conftest, fix Windows-incompatible existing tests 2026-05-14 11:21:10 +02:00
test_async_api.py test(launcher, headless, async_api): add 32 Phase 10 gap-coverage tests 2026-05-14 12:59:47 +02:00
test_cli.py test(cli, download): add 17 gap-coverage tests for Phase 7 2026-05-14 12:35:57 +02:00
test_constants.py test: add pytest markers, conftest, fix Windows-incompatible existing tests 2026-05-14 11:21:10 +02:00
test_download.py test(download): add 4 Linux tar.gz download tests for Phase 7 2026-05-14 13:40:42 +02:00
test_e2e.py test(e2e): add 4 Linux launcher-routing tests for Phase 9 2026-05-14 14:07:03 +02:00
test_headless.py test(prefs, headless): add 16 Linux-specific tests for Phase 6 + 10 2026-05-14 13:21:17 +02:00
test_integration.py test(integration): add 3 Linux pipeline tests for Phase 8 2026-05-14 13:53:24 +02:00
test_launcher_helpers.py test(launcher, headless, async_api): add 32 Phase 10 gap-coverage tests 2026-05-14 12:59:47 +02:00
test_network.py test(network): add 25 unit tests for Bayesian network primitives 2026-05-14 11:24:57 +02:00
test_prefs.py test(prefs, headless): add 16 Linux-specific tests for Phase 6 + 10 2026-05-14 13:21:17 +02:00
test_profile.py test(profile): add 43 unit tests for Profile dataclass and pin system 2026-05-14 11:46:09 +02:00
test_proxy.py test(proxy): add 24 unit tests for configure_proxy decision table 2026-05-14 12:24:57 +02:00
test_sampler.py test(sampler): add 55 unit tests for fingerprint Bayesian sampler 2026-05-14 11:35:24 +02:00