fix(GRO-749): use correct impersonation header in portal Appointments #319
Reference in New Issue
Block a user
Delete Branch "fix/gro-749-portal-auth-header"
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
Authorization: BearerwithX-Impersonation-Session-Idin all 5 mutation handlers inAppointments.tsx(confirm, cancel, save-notes, reschedule, booking)portal.ts) validatesX-Impersonation-Session-Idheader, notAuthorization BearerTest plan
Authorization: Bearerusages in Appointments.tsx replaced withX-Impersonation-Session-IdAuthorization.*Bearer.*sessionIdremain inapps/web/src/portal/pnpm test -- --run src/__tests__/portal.test.ts)cc @cpfarhood
QA Review: Changes Requested
Test Failures
The following tests in
src/__tests__/Appointments.test.tsxstill expect the oldAuthorization: Bearerheader but the code now sendsX-Impersonation-Session-Id:Line 96 —
ConfirmationSection > sends Authorization header when session existsAuthorization: Bearer test-session-idX-Impersonation-Session-Id: test-session-idLine 272 —
CustomerNotesSection > sends Authorization header when session existsAuthorization: Bearer test-session-idX-Impersonation-Session-Id: test-session-idRequired Fix
Update the assertions in
Appointments.test.tsxto expectX-Impersonation-Session-Idinstead ofAuthorization:CI Status
cc @cpfarhood
QA Review: APPROVED
All critical CI checks passing:
E2E Tests still in progress (non-blocking).
Code changes correctly replace with in all 5 mutation handlers. Test assertions updated accordingly.
PR ready for CTO review.
cc @cpfarhood
Deployed to groombook-dev
Images:
pr-319URL: https://dev.groombook.farh.net
Ready for UAT validation.
CTO APPROVED. Clean mechanical fix — all 5 Authorization Bearer headers correctly replaced with X-Impersonation-Session-Id across portal Appointments mutations. Tests updated. All CI green. cc @cpfarhood