-
Notifications
You must be signed in to change notification settings - Fork 5
test: Fix skipped tests in onboarding and AppleSignInButton #135
Copy link
Copy link
Closed
Labels
authenticationAuthentication related issuesAuthentication related issuestestingTesting related changesTesting related changes
Description
Summary
There are 3 test suites currently skipped due to mock issues. These tests cover critical authentication and onboarding flows and should be fixed to ensure proper test coverage.
Skipped Tests
1. __tests__/app/onboarding.test.tsx:639
// TODO: Fix this test - the mock upsert isn't being called for unknown reasons
// after migrating from update() to upsert()
it.skip('shows error alert when profile update fails', async () => {Issue: Mock upsert not being called after migration from update() to upsert()
2. __tests__/components/auth/AppleSignInButton.test.tsx:1274
// TODO: Fix these tests - they were added by CodeRabbit but are not working
// The async flow is not completing properly. Need to investigate mock setup.
describe.skip('Analytics tracking edge cases', () => {Issue: Async flow not completing properly in mock setup
3. __tests__/components/auth/AppleSignInButton.test.tsx:1324
// TODO: Fix these tests - they were added by CodeRabbit but are not working
// The async flow is not completing properly. Need to investigate mock setup.
describe.skip('Profile update edge cases', () => {Issue: Same async flow issue as above
Impact
- Test coverage gaps for critical auth flows
- Profile update error handling not tested
- Analytics tracking edge cases not verified
Recommended Approach
- Investigate the mock setup for Supabase upsert operations
- Check if
waitFororactwrappers are needed for async operations - Verify mock return values match expected Supabase response shape
- Consider using
jest.useFakeTimers()if timing is an issue
Files Affected
__tests__/app/onboarding.test.tsx__tests__/components/auth/AppleSignInButton.test.tsx
Effort Estimate
Low - Likely mock configuration issues
Related to: #133 (Daily Codebase Review - 2025-12-11)
🤖 Generated with Claude Code
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
authenticationAuthentication related issuesAuthentication related issuestestingTesting related changesTesting related changes