veza/tests
senke 4a6a6293e3 fix(e2e): hard-fail global-setup when rate limiting detected
Previously the rate-limit probe emitted a warning box when it
detected active rate limiting (implying the backend was started
without DISABLE_RATE_LIMIT_FOR_TESTS=true) but let the test run
proceed. The flaky 401s on 02-navigation.spec.ts:77 (and sibling
specs using loginViaAPI in beforeEach) all trace to this silent
failure mode — seed users get progressively locked out as each
spec fires rapid login attempts against the real rate limiter.

Replace console.error(box) with throw new Error(), pointing the
developer at `make dev-e2e`. Preserves fast-iteration when the
setup is correct — only blocks misconfigured runs.

Root cause trace:
- tests/e2e/playwright.config.ts:139 uses reuseExistingServer=true,
  so env vars declared in webServer.env (DISABLE_RATE_LIMIT_FOR_TESTS,
  APP_ENV=test, RATE_LIMIT_LIMIT=10000, ACCOUNT_LOCKOUT_EXEMPT_EMAILS)
  are IGNORED if a non-test-mode backend already owns port 18080.
- Previous global-setup warn path emitted a console box but kept
  running — lockout appeared later, looking like a random flake.

Refactored the try/catch: probe stays wrapped (API-down still OK),
got429 sentinel lifted outside so the throw isn't swallowed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 19:15:39 +02:00
..
audio BASE: completing the initial repo state 2025-12-03 22:56:50 +01:00
e2e fix(e2e): hard-fail global-setup when rate limiting detected 2026-04-23 19:15:39 +02:00
test-auth-complete.sh feat: backend, stream server & infra improvements 2026-03-18 11:36:06 +01:00
test-auth-simple.sh BASE: completing the initial repo state 2025-12-03 22:56:50 +01:00
test-profiles-complete.sh BASE: completing the initial repo state 2025-12-03 22:56:50 +01:00