Skip to content
↑↓Navigate↵SelectescClose

Console browser tests

Run the console browser tests with Playwright and an isolated fake backend

Run from the Nexus repository root with Node 26+ and pnpm 9.15:

Terminal window
pnpm install --frozen-lockfile
pnpm --filter @nexus/console exec playwright install chromium
pnpm --filter @nexus/console test:e2e

Run only the workspace loading regressions:

Terminal window
pnpm --filter @nexus/console test:e2e tests/workspace-usage.spec.ts

The runner owns a Next development server on localhost:15449 and a fake backend on 127.0.0.1:15453. It refuses to reuse occupied ports and uses .next-e2e for its build cache. The fake backend verifies only the test cookie for server-rendered authentication; browser API routes are intercepted with per-test fixtures. Unexpected browser API routes fail tests, and unmocked server routes return 501. No database or Compose services are required.

The development server enables React StrictMode. Dashboard request assertions explicitly expect two mount effects for the four-panel usage request and two for the manager’s separate MTD request. Selection must not trigger another inventory load or another dashboard mount; explicit refresh must still fetch. Playwright traces are retained under test-results on failure.