fix: Updated the name of the should_ignore_quit_key to ignore_special_keys_for_textbox_input to give a better idea of what the flag is used for; also added alt keybinding for backspace

This commit is contained in:
2025-03-27 15:21:44 -06:00
parent f25829f3c1
commit cf00d7992e
80 changed files with 584 additions and 435 deletions
@@ -331,7 +331,7 @@ mod tests {
app.get_current_route(),
ActiveRadarrBlock::AddMovieSearchInput.into()
);
assert!(app.should_ignore_quit_key);
assert!(app.ignore_special_keys_for_textbox_input);
assert!(app.data.radarr_data.add_movie_search.is_some());
}
@@ -355,7 +355,7 @@ mod tests {
.handle();
assert_eq!(app.get_current_route(), ActiveRadarrBlock::Movies.into());
assert!(!app.should_ignore_quit_key);
assert!(!app.ignore_special_keys_for_textbox_input);
assert!(app.data.radarr_data.add_movie_search.is_none());
}
@@ -778,11 +778,11 @@ mod tests {
}
#[rstest]
fn test_library_handler_ignore_alt_navigation(
#[values(true, false)] should_ignore_quit_key: bool,
fn test_library_handler_ignore_special_keys(
#[values(true, false)] ignore_special_keys_for_textbox_input: bool,
) {
let mut app = App::test_default();
app.should_ignore_quit_key = should_ignore_quit_key;
app.ignore_special_keys_for_textbox_input = ignore_special_keys_for_textbox_input;
let handler = LibraryHandler::new(
DEFAULT_KEYBINDINGS.esc.key,
&mut app,
@@ -790,7 +790,10 @@ mod tests {
None,
);
assert_eq!(handler.ignore_alt_navigation(), should_ignore_quit_key);
assert_eq!(
handler.ignore_special_keys(),
ignore_special_keys_for_textbox_input
);
}
#[test]