test: stabilize deterministic integration coverage

This commit is contained in:
edde746
2026-07-24 03:40:06 +02:00
parent d98e85614a
commit 1d1c301f61
48 changed files with 1175 additions and 350 deletions
@@ -14,23 +14,6 @@ import 'package:plezy/services/multi_server_manager.dart';
import 'package:provider/provider.dart';
import '../test_helpers/media_items.dart';
// NOTE on coverage scope:
// `EpisodeNavigationService` has two methods:
//
// 1. `loadAdjacentEpisodes` — pure-ish: reads PlaybackStateProvider, asks for
// next/prev episode, wraps the result. The interesting branch is the
// "no queue active" short-circuit, which we exercise without any client
// or network because PlaybackStateProvider can be constructed bare.
//
// 2. `navigateToEpisode` — performs full navigation through
// [navigateToVideoPlayer], which depends on a Navigator, a
// DownloadProvider, a MultiServerProvider, and the [SettingsService]
// singleton. Skipped: not unit-testable without recreating the entire
// app shell.
//
// We also cover the [AdjacentEpisodes] data class invariants since that's
// the public surface callers depend on.
MediaItem _meta(String id, {String? title}) =>
testMediaItem(id: id, backend: MediaBackend.plex, kind: MediaKind.episode, title: title ?? 'Episode $id');