forked from mirror/crumbs-original
Every test in the `app` project submitted the login form through the authenticatedPage fixture: a page load, an Argon2 verification on the server, a redirect and a networkidle wait. Over 137 tests that was roughly half of the median test's 1.8s. A new `login-state` setup project (tests/e2e/auth.setup.ts) authenticates once after auth.spec has created the account and saves the session cookie to data/test-storage-state.json. The `app` project loads it into every context, so setupAndLogin takes its "session still valid" path and the fixture is reduced to a page load. pwa.spec and mcp.spec describe anonymous visitors and opt out with an empty storageState so their baseline is unchanged. Local run, 4 workers: summed test time 276s -> 256s, median 1.8s -> 1.6s. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>