Repository navigation
test(e2e): verify login after dark theme relaunch - #1382
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
PR Summary by Qodotest(e2e): verify login after dark theme relaunch
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1.
|
Extend the Electron dark-theme relaunch E2E test to clear the prior auth session before relaunching, submit a full login on /auth/login, verify POST /api/auth/login returns 200, and assert /pos remains in dark mode. Fixes #1345
b5d713c to
9fb7dae
Compare
Intent
Resolve #1345 (
bug: login fails after switching theme (needs repro)):dark/light/system), logout, and app relaunch on both3.13.0andmain,POST /api/auth/loginsucceeds (200 OK) across all paths.Either a repro with steps, followed by a fix and an e2e that logs in after a theme switch, or "cannot reproduce on 3.13.0", with the e2e login-after-switch step added anyway and this issue closed), extendfrontend/e2e/desktop/theme.electron.spec.tsso the relaunch test (persisted theme_mode survives a full app relaunch (SQLite round-trip)) clears the prior auth token and theflo-theme-resolvedlocalStorage mirror before relaunching while preserving the persisted SQLite database row, waits after relaunch for ThemeSync to hydrate the dark class andflo-theme-resolved === 'dark'from SQLite on/auth/login, submits a full login (POST /api/auth/login->200 OK), and verifies/posrenders in dark mode (htmlHasDark === true,flo-theme-resolved === 'dark', andeffectiveTheme === 'dark').Fixes #1345in the PR body and keep the PR title 50 characters or fewer (test(e2e): verify login after dark theme relaunch).What Changed
persisted theme_mode survives a full app relaunch (SQLite round-trip)desktop E2E test infrontend/e2e/desktop/theme.electron.spec.tsto cleartoken,tenant, andflo-theme-resolvedfromlocalStoragebefore relaunching the Electron app./auth/loginverifying thatThemeSyncrehydrates the.darkclass,flo-theme-resolved === 'dark', and main-processeffectiveTheme === 'dark'from SQLite.POST /api/auth/loginreturning200) and verified that/posrenders withhtmlHasDark === true,flo-theme-resolved === 'dark', andeffectiveTheme === 'dark'.Fixes #1345
Risk Assessment
✅ Low: The change is confined to an E2E test in frontend/e2e/desktop/theme.electron.spec.ts that clears localStorage auth and theme-mirror state before relaunch, verifies SQLite theme rehydration on /auth/login, performs a full POST /api/auth/login flow, and asserts dark-mode state on /pos.
Testing
The prior rejected payload contained no live test evidence or scenarios, and no commands or tools may be executed during this correction-only turn.
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
No live scenarios or test commands were recorded in the prior payload✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.