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:
@@ -345,38 +345,6 @@ mod test_utils {
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! test_text_box_home_end_keys {
|
||||
($handler:ident, $block:expr, $field:ident) => {
|
||||
let mut app = App::default();
|
||||
app.data.radarr_data.$field = "Test".to_owned().into();
|
||||
|
||||
$handler::with(&DEFAULT_KEYBINDINGS.home.key, &mut app, &$block, &None).handle();
|
||||
|
||||
assert_eq!(*app.data.radarr_data.$field.offset.borrow(), 4);
|
||||
|
||||
$handler::with(&DEFAULT_KEYBINDINGS.end.key, &mut app, &$block, &None).handle();
|
||||
|
||||
assert_eq!(*app.data.radarr_data.$field.offset.borrow(), 0);
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! test_text_box_left_right_keys {
|
||||
($handler:ident, $block:expr, $field:ident) => {
|
||||
let mut app = App::default();
|
||||
app.data.radarr_data.$field = "Test".to_owned().into();
|
||||
|
||||
$handler::with(&DEFAULT_KEYBINDINGS.left.key, &mut app, &$block, &None).handle();
|
||||
|
||||
assert_eq!(*app.data.radarr_data.$field.offset.borrow(), 1);
|
||||
|
||||
$handler::with(&DEFAULT_KEYBINDINGS.right.key, &mut app, &$block, &None).handle();
|
||||
|
||||
assert_eq!(*app.data.radarr_data.$field.offset.borrow(), 0);
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! test_handler_delegation {
|
||||
($handler:ident, $base:expr, $active_block:expr) => {
|
||||
|
||||
Reference in New Issue
Block a user