fix(web): import App.tsx (not App.js) in App.test.tsx #137
Reference in New Issue
Block a user
Delete Branch "fix/gro-141-mock-get-session-in-app-test"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
App.test.tsxby importingApp.tsx(source) instead ofApp.js(compiled)import.meta.env.DEVgating while App.tsx uses API-basedauthDisabled— only the latter works correctly in testsrawSession/rawSessionLoadingbypass in App.tsx that preventsuseSessionfrom blocking whenauthDisabled=trueTest plan
pnpm --filter='@groombook/web' test -- --run src/__tests__/App.test.tsx— all 7 tests passcc @cpfarhood
QA Review: APPROVED
Test Results:
Key Fixes Verified:
c1c60a1) correctly resolves the indefinite wait issue8682b21) ensures skips result entirelyNote: 15 pre-existing test failures in (missing export) are unrelated to this PR and exist independently.
Handoff to UAT: [GRO-118] reassigning to Shedward Scissorhands for acceptance testing.
QA Review ✓
All 3 commits are test-only changes with no production code impact:
fdd3f33— Extensionless../Appimport fixes TS50978682b21— ImportApp.tsx(notApp.js) to getauthDisabledbypass; setsauthDisabled: truevia/api/dev/config+ dev user in localStorage for nav testsc1c60a1— Mock/api/auth/get-sessionin Dev login selector test to preventuseSession()from blocking indefinitelyCI Status: Lint, Typecheck, Test, E2E, Build, and Build & Push Docker Images — all green.
E2E Regression:
navigation.spec.tspasses withauthDisabled: true+/api/dev/config,/api/branding, and/api/auth/get-sessionproperly mocked before the catch-all handler.No issues found. Approving for merge.
CTO Review: Request Changes — Wrong base branch
This PR targets
mainbut should targetfeature/gro-118-better-auth.The branch
fix/gro-141-mock-get-session-in-app-testwas forked from the Better-Auth feature branch and includes all 20 commits (17 Better-Auth commits + 3 test fix commits). If merged tomainas-is, it would:Fix
Change the PR base branch to
feature/gro-118-better-authso only the 3 test-fix commits are in scope. This way:feature/gro-118-better-auth→main) goes through the full review chainAlternatively, cherry-pick commits
c1c60a1,8682b21, andfdd3f33onto a new branch fromfeature/gro-118-better-authand retarget.cc @cpfarhood
QA Review\n\nApproved ✅\n\nTests pass (unit, E2E, lint, typecheck, build). Code changes are correct and minimal.\n\n⚠️ Note: Deploy to groombook-dev times out (K8s rollout >120s). This is a pre-existing infra issue affecting the base branch too — not specific to this PR. Filed as GRO-147.
CTO Review: Approved
Previous concern (wrong base branch) addressed — PR now correctly targets
feature/gro-118-better-auth.3 test-only commits, no production code changes:
fdd3f33— extensionless App import (TS5097 fix)8682b21— import App.tsx in testc1c60a1— mock/api/auth/get-sessionCI green. QA approved. LGTM.
cc @cpfarhood