Skip to content

fix(e2e): use storageState pattern for login page screenshot test#228

Merged
steilerDev merged 1 commit into
betafrom
fix/ci-e2e-screenshot-login
Feb 23, 2026
Merged

fix(e2e): use storageState pattern for login page screenshot test#228
steilerDev merged 1 commit into
betafrom
fix/ci-e2e-screenshot-login

Conversation

@steilerDev
Copy link
Copy Markdown
Owner

Summary

  • Fixes the Login page screenshot test that fails in CI E2E shards 5 and 10 on the EPIC-05 promotion PR (EPIC-05: Budget Management — promote to stable #160)
  • Root cause: browser.newContext() creates a bare context without project-level settings (viewport, baseURL, timeouts), so the SPA never renders within the timeout
  • Switches to test.use({ storageState: { cookies: [], origins: [] } }) which clears auth while preserving all project settings — the same pattern used by auth-guard.spec.ts and login-logout.spec.ts
  • Fixes screenshots script referencing non-existent desktop-lg project (correct name is desktop)

Test plan

🤖 Generated with Claude Code

The Login page screenshot test used `browser.newContext()` to get an
unauthenticated session, but this bare context lacked all project-level
settings (viewport, baseURL, timeouts, device emulation), causing the
SPA to never render within the timeout on CI.

Switch to `test.use({ storageState: { cookies: [], origins: [] } })`
which clears auth cookies while preserving all project settings —
matching the proven pattern used by auth-guard and login-logout tests.

Also fix the `screenshots` script in e2e/package.json to reference the
correct `desktop` project name (not the non-existent `desktop-lg`).

Co-Authored-By: Claude <noreply@anthropic.com>
@steilerDev steilerDev merged commit ae17b7c into beta Feb 23, 2026
4 of 9 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

ghost commented Feb 23, 2026

🎉 This PR is included in version 1.9.0-beta.63 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants