mirror of
https://github.com/rommapp/romm.git
synced 2026-11-28 17:48:31 +01:00
Every spec drove the login form, which is 15 UI logins to test something
login.spec.ts can cover on its own.
auth.setup.ts now runs first as its own project, logs each fixture user in
once and saves the session (cookies plus localStorage) to playwright/.auth/.
Specs pick an identity with `test.use({ storageState })` and start signed in.
That is preferred over building a context by hand, which would silently drop
the project's options -- baseURL, the blocked service worker, viewport.
login.spec.ts is the one place the form is exercised, on a deliberately
unauthenticated page, and it gained cover the suite never had: a rejected
password and the redirect for an anonymous visitor.
Suite: 33s -> ~19s, with 18 tests instead of 15. Verified three times against
the build and once against the dev server.