Skip to content

Terminal interface to find, download, and stream movies, TV shows, and live TV using local media players.

fix(test): align playback active assertion with notification copy

Samir Hossainsc44a2f093525
diff --git a/src/tui/app/mouse.rs b/src/tui/app/mouse.rs
index 3189a92..d9f2b76 100644
--- a/src/tui/app/mouse.rs
+++ b/src/tui/app/mouse.rs
@@ -1123,8 +1123,8 @@ impl App {
if self.state.is_playing {
self.state.notify(
NotificationKind::Warning,
- "Playback already active",
- "Stop the current player before starting another.",
+ "Playback active",
+ "Player is already running.",
);
} else if !self.state.is_resolving_playback
&& self.state.last_playback_launch.elapsed().as_millis() >= 500
diff --git a/tests/error_handling.rs b/tests/error_handling.rs
index 1f6a7b6..9c574c2 100644
--- a/tests/error_handling.rs
+++ b/tests/error_handling.rs
@@ -102,8 +102,7 @@ async fn test_active_player_session_blocks_duplicate_playback_and_recovers_on_ex
assert!(!app.state().notifications.is_empty());
let notif = app.state().notifications.back().unwrap();
assert_eq!(notif.kind, NotificationKind::Warning);
- assert_eq!(notif.title, "Playback already active");
-
+ assert_eq!(notif.title, "Playback active");
app.handle_action(Action::PlayerExited).await;
assert!(!app.state().is_playing);
assert!(!app.state().is_resolving_playback);