Did a lot of things in this one: Cleaned up a bit of leftover unused code from yesterday; deprecated the use of drain() on HorizontallyScrollableText; Refactored the uses of search and filter to be wrapped in Options; Fixed a race condition when closing the Add Movie modals in rapid succession; upgraded to ratatui 0.22.0; Fixed a bug in attempting to close an empty root folder; fixed a bug in attempting to close an empty filter; fixed a bug in attempting to close an empty search; fixed a bug in attempting to close an empty filter without resetting the view; fixed a bug in attempting to delete a movie after dynamically added one and updating the main library table

This commit is contained in:
2023-08-08 10:50:07 -06:00
parent 2d624e2648
commit 77fd9e621f
28 changed files with 1151 additions and 352 deletions
@@ -445,7 +445,10 @@ mod tests {
fn test_edit_collection_root_folder_path_input_submit() {
let mut app = App::default();
app.should_ignore_quit_key = true;
app.data.radarr_data.edit_path = "Test Path".to_owned().into();
app.data.radarr_data.edit_collection_modal = Some(EditCollectionModal {
path: "Test Path".into(),
..EditCollectionModal::default()
});
app.push_navigation_stack(ActiveRadarrBlock::EditCollectionPrompt.into());
app.push_navigation_stack(ActiveRadarrBlock::EditCollectionRootFolderPathInput.into());
@@ -458,7 +461,15 @@ mod tests {
.handle();
assert!(!app.should_ignore_quit_key);
assert!(!app.data.radarr_data.edit_path.text.is_empty());
assert!(!app
.data
.radarr_data
.edit_collection_modal
.as_ref()
.unwrap()
.path
.text
.is_empty());
assert_eq!(
app.get_current_route(),
&ActiveRadarrBlock::EditCollectionPrompt.into()