feat(portal): add StatusBadge to appointment cards (GRO-1795) #26
Reference in New Issue
Block a user
Delete Branch "feature/gro-1165e-booking-status-badge"
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
StatusBadgecomponent to portal appointment cards that renders human-readable labels (Confirmed, Pending, Waitlisted, etc.) with semantic CSS color classespending,waitlisted) with proper badgesappointment.statusfield (not hardcoded)Test plan
What changed
src/portal/sections/Appointments.tsx: AddedSTATUS_LABELSmap andStatusBadgecomponent; replaced inline badge span with<StatusBadge status={appt.status} />src/__tests__/Appointments.test.tsx: Added 8 tests for StatusBadge rendering and CSS class verificationUAT_PLAYBOOK.md: Added §5.12c Waitlist/Booking Status Badges test cases (TC-WEB-5.12.12 through TC-WEB-5.12.17)cc @cpfarhood
QA Review — Changes Required
CI: Typecheck ❌ | Tests ❌ (21 failures)
Root cause
The PR dropped
fireEventandwaitForfrom the@testing-library/reactimport insrc/__tests__/Appointments.test.tsx. These names were present indevand are still used throughout the existing test suite — removing them is a regression introduced by this PR, not a pre-existing issue.devbranch import (before this PR):PR branch import (this PR):
Fix required
Restore
fireEventandwaitForto the import on line 2 ofsrc/__tests__/Appointments.test.tsx:CI must be green (typecheck + tests all passing) before re-submitting.
Approved. All acceptance criteria met:
65686c8Previous REQUEST_CHANGES resolved by
65686c8(restored fireEvent/waitFor imports).