fix(e2e): let web-e2e:e2e run outside CI

Without CI, every web-e2e webServer has reuseExistingServer, so
@nx/playwright infers a continuous web:serve dependency for the
`pnpm nx run web:serve` entry. The mocks and the web backend launch as
plain node processes with env, which no Nx task covers, so the plugin
also marks the target non-parallel. Nx refuses a non-parallel task with
continuous dependencies, and `nx run web-e2e:e2e` failed before running
anything; CI passed only because CI=1 disables reuse and with it the
inferred dependency.

Give web-e2e:e2e an empty dependsOn so Playwright starts every server,
as it already does in CI. The Angular dev-server runs inside the Nx
process, so Playwright's process-group kill still stops it. Turn off
the plugin's readiness gate, which no target consumes any more.

Add `pnpm run e2e:task-graphs:validate`: it builds every Playwright
target's task graph with Nx's own validation, with CI unset and set,
and runs in the unit-and-typecheck job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Opus 5.5 committed 2026-10-01 06:29:38 +02:00
1 parent 525ca7bc44
commit 3f3e9ffefb
9 files changed
+260 -16

No files matched your search

+7
View File
@@ -197,6 +197,13 @@ and JSON summary output. CI uploads the merged Tier A report to Codecov with the
Use atomized E2E targets when available, for example
`pnpm nx run web-e2e:e2e-ci--src/xtream.e2e.ts`.
After changing a Playwright config's `webServer` list, `nx.json` target
defaults or an E2E project's `dependsOn`, run
`pnpm run e2e:task-graphs:validate`. It builds every Playwright target's task
graph with and without `CI` and fails on the graphs Nx refuses to run; CI runs
it in the `unit-and-typecheck` job. See
[Xtream mock Playwright integration](xtream-mock-server.md#playwright-integration).
Inside `expect.poll`, read a changing list in one DOM snapshot
(`allTextContents()` or `evaluateAll()`, as in
`apps/electron-backend-e2e/src/sidebar-categories.e2e-support.ts`), not by