Skip to content

Conversation

@onevcat
Copy link
Member

@onevcat onevcat commented Jul 30, 2025

Summary

  • Introduce LoginFlowFactory with dependency injection pattern to improve testability of LoginProcess
  • Add comprehensive mock framework for external dependencies (UIApplication, LINE app detection, etc.)
  • Expand test coverage with 15+ new test methods covering all login flow branches and error scenarios

Test plan

  • Run existing unit tests to ensure backward compatibility
  • Verify new LoginProcessFlowTests cover all critical paths
  • Test LoginFlowFactory default implementations maintain existing behavior
  • Validate mock framework correctly simulates real dependencies

onevdog added 2 commits July 30, 2025 11:21
- Introduce LoginFlowFactory protocol and DefaultLoginFlowFactory for creating login flows
- Add ApplicationOpener protocol to abstract UIApplication.open behavior
- Create flow protocols (AppUniversalLinkFlowType, AppAuthSchemeFlowType, WebLoginFlowType) for better testing
- Add LINEAvailabilityChecker protocol to abstract LINE app detection
- Inject dependencies into LoginProcess constructor for improved testability
- Maintain backward compatibility with default implementations

This refactoring enables comprehensive unit testing of login flow logic without requiring actual app switching or external dependencies.
@onevcat onevcat temporarily deployed to Coverage Badge Env July 30, 2025 05:19 — with GitHub Actions Inactive
- Add flexible LoginFlowFactory injection with backward compatibility for Swift 4.2
- Enable --allow-warnings flag in pod lint for better CI/CD workflow
- Maintain testability improvements while ensuring CocoaPods compliance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants