2 Commits

Author SHA1 Message Date
7a9d85c0d0 Add comprehensive tests for OTP verification page and fix API integration bugs
- Create 24 comprehensive test cases for verify-otp page covering:
  * Input validation and auto-focus
  * Keyboard navigation and backspace handling
  * Paste functionality with filtering
  * Auto-submit when complete
  * Navigation flows (enter-name, add-loved-one, dashboard)
  * Error handling and loading states
  * Resend functionality with countdown
  * localStorage integration

- Fix critical API integration bugs in verify-otp page:
  * Correct API response property names (token/user.id instead of accessToken/userId)
  * Replace non-existent getMe() with getProfile() and getAllBeneficiaries()
  * Fix user data extraction from nested response structure

- All 24 tests passing
- Linting warnings consistent with existing codebase

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-31 17:44:42 -08:00
9d5a40944f Implement web login page with OTP verification
- Add login page with email validation and invite code support
- Add OTP verification page with 6-digit code input
- Implement redirect logic based on user state
- Add placeholder dashboard page
- Add comprehensive test suite for login flow
- Export api as default for cleaner imports
- All tests passing (12/12)

Features:
- Email validation with proper error handling
- Optional invite code input
- OTP resend with 60s countdown
- Auto-submit when all 6 digits entered
- Loading states and error messages
- Redirect to dashboard if already authenticated
- Proper navigation flow after OTP verification

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-31 17:37:38 -08:00