Auth & cached login
For the complete documentation index, see llms.txtSigning in at the top of every scenario is slow and brittle. Cache a logged-in session once and reuse it.
storageState
Point your config at a Playwright storageState.json:
export default { storageState: "unotest/.auth/state.json",};Scenarios then start already authenticated — no flow_signin per test.
Seeding the state
Create the state once (an agent flow, or a small setup scenario that signs in and captures cookies/localStorage). Keep the file git-ignored and refresh it when it expires.
When to still sign in
- Tests that specifically exercise the login flow itself.
- Tests that need a different user than the cached one — use
flow_signinfor those.