Sub-Phase 10.3: Add Mock Authentication for Development#18
Merged
jeremyeder merged 2 commits intomainfrom Nov 27, 2025
Merged
Conversation
## Test Infrastructure Improvements - Added Sentry mock for Jest tests (__mocks__/@sentry/react-native.ts) - Fixed 161 passing tests (82.9% pass rate, up from test failures) - Created comprehensive test infrastructure documentation - Updated .gitignore to exclude coverage/ directory ## Test Results - 8 passing test suites, 6 failing (style-related brittle tests) - 161 passing tests, 32 failing (style assertions) - Test coverage: 20.23% (below 80% target, documented for future work) ## Documentation Added - docs/testing/TEST_INFRASTRUCTURE.md - Complete test infrastructure overview - Test patterns and best practices - Coverage gaps and recommendations - Known issues and solutions ## Performance Status Performance optimizations were already completed in a previous phase: - QueryClient singleton pattern (90% reduction in API calls) - Theme context memoization (70-80% reduction in re-renders) - Dashboard FlatList optimization (50% reduction in filtering time) - Component memoization (Header, Quick Actions) - Comprehensive performance monitoring infrastructure See docs/performance/optimizations.md for full details. ## Phase 10.3 Completion ✅ Test infrastructure setup and documentation ✅ Performance optimization review and validation ✅ 161 tests passing with clear path for improvement 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Implements environment-based mock auth to bypass OAuth when backend callback is unavailable. This allows developers to use the app while OAuth integration is being configured. Features: - Toggle via EXPO_PUBLIC_USE_MOCK_AUTH=true in .env.local - Auto-login with mock user data - No OAuth flow when enabled - Easy to disable when backend is ready Changes: - Added MockAuthService with mock user profile - Added USE_MOCK_AUTH feature flag to constants - Updated useAuth hook to use mock auth when flag is enabled - All auth operations (login, logout, checkAuth) support mock mode To use: 1. Add EXPO_PUBLIC_USE_MOCK_AUTH=true to .env.local 2. Restart dev server 3. App will auto-authenticate as 'Developer User' To disable: 1. Set EXPO_PUBLIC_USE_MOCK_AUTH=false (or remove line) 2. Restart dev server 3. App will use real OAuth flow 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add mock authentication functionality to enable development and testing without a real backend.
Changes
This commit adds mock authentication for development purposes, allowing developers to:
Related
Part of Phase 10.3: Test Infrastructure & Performance Review
🤖 Generated with Claude Code