mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 02:54:26 +00:00
Each role's Playwright spec is staged the same way `test-e2e-playwright` does at deploy time (central config + personas tree + service-gating) and `npx playwright test --list` runs against it. `--list` skips the browser launch and any test body, so this catches refactor regressions like missing helpers, broken exports, or syntax errors in seconds instead of waiting for a full deploy. Stub env values keyed off the variable-name suffix satisfy the few specs that build URLs or call `.replace()` at module-load time. Parallelism caps at `INFINITO_WORKER_CPU` (same env knob as `scripts/make/parallel.sh`); output is replayed in `SPEC_FILES` order after all workers drain so stdout stays deterministic. `@playwright/test` ships as a devDep via the existing eslint `npm ci`. Workflow wires into `ci-orchestrator.yml` behind the `lint-gate`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
24 lines
726 B
Python
24 lines
726 B
Python
"""Install @playwright/test (locally in repo root via npm)."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
from utils.cache import PROJECT_ROOT
|
|
from utils.install.npm import npm_install_local_in_repo
|
|
from utils.install.primitives import log
|
|
|
|
|
|
def ensure() -> None:
|
|
repo_root = Path(PROJECT_ROOT)
|
|
if (repo_root / "node_modules" / "@playwright" / "test").is_dir():
|
|
return
|
|
|
|
log("Missing local '@playwright/test'. Installing via npm (in repo root).")
|
|
npm_install_local_in_repo(str(repo_root))
|
|
|
|
if not (repo_root / "node_modules" / "@playwright" / "test").is_dir():
|
|
raise RuntimeError(
|
|
"Local '@playwright/test' is still unavailable after installation."
|
|
)
|