test(lidarr): pin table search, filter and selection behaviour

The search and filter blocks a table configures were asserted nowhere, so
transposing them was invisible. Selections were also left at index 0 in
every test, which made current_selection() and items[0] indistinguishable,
including for the profile lists inside the edit and add prompts.
This commit is contained in:
Dark-Alex-17 committed 2026-09-09 15:51:10 -06:00
1 parent 18a50ab97c
commit f141e53f30
8 files changed
+419 -80

No files matched your search

@@ -244,6 +244,38 @@ mod tests {
assert_eq!(app.get_current_route(), active_lidarr_block.into());
assert!(!app.is_routing);
}
#[test]
fn test_search_track_history_key() {
let mut app = App::test_default_fully_populated();
app.push_navigation_stack(ActiveLidarrBlock::TrackHistory.into());
TrackDetailsHandler::new(
DEFAULT_KEYBINDINGS.search.key,
&mut app,
ActiveLidarrBlock::TrackHistory,
None,
)
.handle();
assert_navigation_pushed!(app, ActiveLidarrBlock::SearchTrackHistory.into());
}
#[test]
fn test_filter_track_history_key() {
let mut app = App::test_default_fully_populated();
app.push_navigation_stack(ActiveLidarrBlock::TrackHistory.into());
TrackDetailsHandler::new(
DEFAULT_KEYBINDINGS.filter.key,
&mut app,
ActiveLidarrBlock::TrackHistory,
None,
)
.handle();
assert_navigation_pushed!(app, ActiveLidarrBlock::FilterTrackHistory.into());
}
}
#[test]