test(radarr): pin table search, filter and selection behaviour
Radarr handler tests never asserted which block the search and filter keys push, so transposing searching_block and filtering_block in a TableHandlingConfig went undetected. Add a search key and a filter key test for each of the three handlers that configure them: library, collections and history. No test moved a table or list selection off index 0 either, which made current_selection() and items[0] indistinguishable. Select a non-zero index in the tests covering every handler that reads a selected row, enriching fixtures with a second, distinct entry where only one existed. Several fixtures also asserted against a default value, so the expected result was indistinguishable from an unset field. The system details tasks now use two distinct non-default task names, and the add movie body expects a non-default monitor and minimum availability.
This commit is contained in:
16 files changed
+481
-133
No files matched your search
@@ -142,11 +142,15 @@ mod tests {
|
||||
#[test]
|
||||
fn test_collection_details_submit_movie_already_in_library() {
|
||||
let mut app = App::test_default();
|
||||
app
|
||||
.data
|
||||
.radarr_data
|
||||
.collection_movies
|
||||
.set_items(vec![collection_movie()]);
|
||||
app.data.radarr_data.collection_movies.set_items(vec![
|
||||
CollectionMovie {
|
||||
tmdb_id: 5678,
|
||||
overview: "Some other overview".to_owned(),
|
||||
..CollectionMovie::default()
|
||||
},
|
||||
collection_movie(),
|
||||
]);
|
||||
app.data.radarr_data.collection_movies.select_index(Some(1));
|
||||
app.data.radarr_data.movies.set_items(vec![Movie {
|
||||
tmdb_id: collection_movie().tmdb_id,
|
||||
..Movie::default()
|
||||
|
||||
Reference in new issue
Block a user