fix(web): import App.tsx (not App.js) in App.test.tsx #137

Merged
groombook-engineer[bot] merged 3 commits from fix/gro-141-mock-get-session-in-app-test into feature/gro-118-better-auth 2026-03-28 00:45:21 +00:00

3 Commits

Author SHA1 Message Date
Paperclip fdd3f332be fix(web): use extensionless import for App in test
The `.tsx` extension in the import path is not allowed without
`allowImportingTsExtensions` (TS5097). Use extensionless `../App`
which resolves correctly via moduleResolution: "bundler".

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-27 23:49:38 +00:00
Paperclip 8682b21c71 fix(web): import App.tsx (not App.js) in test to get authDisabled bypass
The Dev login selector test was importing the compiled App.js instead of
the source App.tsx. App.js has different logic (uses import.meta.env.DEV
instead of API-based authDisabled) and doesn't implement the
sessionLoading bypass needed for tests to pass.

Also applied the rawSession/rawSessionLoading refactor in App.tsx that
bypasses useSession result when authDisabled=true.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-27 23:33:35 +00:00
Paperclip c1c60a105a fix(web): mock /api/auth/get-session in Dev login selector test
The "redirects to /login when auth is disabled and no user selected" test
fails because useSession() from better-auth/react calls /api/auth/get-session
which wasn't mocked, causing sessionLoading to stay true indefinitely.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-27 22:48:20 +00:00