mirror of
https://gitlab.com/foxixus/neomovies_mobile.git
synced 2025-10-28 03:58:50 +05:00
WebView Player Integration: - Create PlayerEmbedService for API server integration - Update WebView players to use server embed URLs instead of direct links - Add fallback to direct URLs when server is unavailable - Support for both Vibix and Alloha players with server API - Include optional parameters (imdbId, season, episode) for TV shows - Add health check endpoint for server availability Mock Testing Infrastructure: - Add comprehensive TorrentPlatformService tests with mock platform channel - Test all torrent operations without requiring real Android engine - Mock platform channel responses for addTorrent, removeTorrent, pauseTorrent, resumeTorrent - Test error handling with PlatformException simulation - Validate torrent state detection (downloading, seeding, completed) - Test file priority management and video file detection PlayerEmbedService Testing: - Mock HTTP client tests for Vibix and Alloha embed URL generation - Test server API integration with success and failure scenarios - Validate URL encoding for special characters and non-ASCII titles - Test fallback behavior when server is unavailable or times out - Mock player configuration retrieval from server - Test server health check functionality Test Dependencies: - Add http_mock_adapter for HTTP testing - Ensure all tests work without real Flutter/Android environment - Support for testing platform channels and HTTP services This enables proper API server integration for WebView players while maintaining comprehensive test coverage for all torrent and player functionality without requiring Android hardware.