mirror of
https://github.com/feder-cr/invisible_playwright.git
synced 2026-06-25 09:28:05 +02:00
test: activate the full e2e (browser-driving) suite + add fetch --force
The 138 @pytest.mark.e2e tests were doubly inactive: deselected by addopts AND skipped without a cached binary — and 3 of the 6 per-file firefox_binary fixtures silently ignored INVPW_BINARY_PATH, so they'd test whatever was cached even when you pointed the suite elsewhere (a false-confidence trap). - Centralize firefox_binary into conftest.py (env INVPW_BINARY_PATH → cache → skip); delete the 6 duplicates. Unify test_webrtc_realness onto the same env. - scripts/run_e2e.py: one command that runs ALL e2e against a chosen binary, with reruns so an under-load interaction flake (dblclick/hover pass 3/3 in isolation) self-heals while a real break fails every attempt. The webrtc e2e fake a TCP-only SOCKS locally, so the suite is offline. This is the MANDATORY pre-release browser gate (local — hosted runners are too interaction-flaky). - Running the suite against firefox-9 surfaced a real gap: `invisible_playwright fetch --force` was unrecognized (the subparser took no args) though the e2e test + docstring expect it. Implement it: drop the cached version dir, refetch. - Add pytest-rerunfailures + playwright to the dev extras. Baseline against firefox-9: 136 passed, 1 skipped (linux_only on win host), 1 was the --force gap now fixed.
This commit is contained in:
parent
67b5e7cd5e
commit
5dac302938
11 changed files with 120 additions and 135 deletions
|
|
@ -10,7 +10,15 @@ from .constants import BINARY_VERSION, FIREFOX_UPSTREAM_VERSION
|
|||
from .download import cache_root, ensure_binary
|
||||
|
||||
|
||||
def _cmd_fetch(_args: argparse.Namespace) -> int:
|
||||
def _cmd_fetch(args: argparse.Namespace) -> int:
|
||||
# --force: re-download even if already cached (drop the cached version dir,
|
||||
# then let ensure_binary fetch it fresh). Useful to recover a corrupted cache
|
||||
# or re-pull after a re-published release.
|
||||
if getattr(args, "force", False):
|
||||
from .download import cache_dir_for_version
|
||||
d = cache_dir_for_version()
|
||||
if d.exists():
|
||||
shutil.rmtree(d, ignore_errors=True)
|
||||
path = ensure_binary()
|
||||
print(path)
|
||||
return 0
|
||||
|
|
@ -52,7 +60,9 @@ def build_parser() -> argparse.ArgumentParser:
|
|||
)
|
||||
sub = p.add_subparsers(dest="cmd")
|
||||
|
||||
sub.add_parser("fetch", help="download the patched Firefox binary")
|
||||
fetch_p = sub.add_parser("fetch", help="download the patched Firefox binary")
|
||||
fetch_p.add_argument("--force", action="store_true",
|
||||
help="re-download even if already cached")
|
||||
sub.add_parser("path", help="print the absolute path to the cached binary")
|
||||
sub.add_parser("version", help="print wrapper and binary versions")
|
||||
sub.add_parser("clear-cache", help="remove all cached binaries")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue