diff --git a/src/models/servarr_data/readarr/readarr_data.rs b/src/models/servarr_data/readarr/readarr_data.rs index 30ad8344..27a37483 100644 --- a/src/models/servarr_data/readarr/readarr_data.rs +++ b/src/models/servarr_data/readarr/readarr_data.rs @@ -30,7 +30,7 @@ use { super::modals::EditionDetailsModal, crate::models::readarr_models::{ AuthorStatus, BookFile, DownloadStatus, Edition, MediaInfo, MonitorType, NewItemMonitorType, - ReadarrHistoryEventType, ReadarrTaskName, + Ratings, ReadarrHistoryEventType, ReadarrTaskName, }, crate::models::servarr_models::{IndexerField, Quality, QualityWrapper}, crate::models::stateful_table::SortOption, @@ -378,9 +378,26 @@ impl ReadarrData<'_> { author_name: "Test Author".into(), status: AuthorStatus::Continuing, overview: Some("some interesting description of the author".to_owned()), + author_type: Some("Person".to_owned()), + disambiguation: Some("American novelist".to_owned()), + ratings: Some(Ratings { + votes: 1024, + value: 4.5, + popularity: Some(9.75), + }), genres: vec!["science fiction".to_owned()], ..AddAuthorSearchResult::default() }; + let unadded_author_search_result = AddAuthorSearchResult { + foreign_author_id: "unadded-foreign-id".to_owned(), + author_name: "Unadded Author".into(), + status: AuthorStatus::Ended, + ended: true, + overview: Some("an author who is not yet in the library".to_owned()), + author_type: Some("Group".to_owned()), + genres: vec!["fantasy".to_owned(), "horror".to_owned()], + ..AddAuthorSearchResult::default() + }; let task = ReadarrTask { name: "Backup".to_owned(), task_name: ReadarrTaskName::Backup, @@ -589,7 +606,7 @@ impl ReadarrData<'_> { readarr_data.queued_events.set_items(vec![queued_event()]); readarr_data.add_author_search = Some("Test Author".into()); let mut add_searched_authors = StatefulTable::default(); - add_searched_authors.set_items(vec![add_author_search_result]); + add_searched_authors.set_items(vec![add_author_search_result, unadded_author_search_result]); readarr_data.add_searched_authors = Some(add_searched_authors); readarr_data.logs.set_items(vec![log_line.into()]); readarr_data.log_details.set_items(vec![log_line.into()]); diff --git a/src/ui/readarr_ui/library/add_author_ui.rs b/src/ui/readarr_ui/library/add_author_ui.rs new file mode 100644 index 00000000..ff6bab80 --- /dev/null +++ b/src/ui/readarr_ui/library/add_author_ui.rs @@ -0,0 +1,446 @@ +use std::sync::atomic::Ordering; + +use ratatui::Frame; +use ratatui::layout::{Constraint, Layout, Rect}; +use ratatui::widgets::{Cell, ListItem, Row}; + +use crate::App; +use crate::models::Route; +use crate::models::readarr_models::AddAuthorSearchResult; +use crate::models::servarr_data::readarr::modals::AddAuthorModal; +use crate::models::servarr_data::readarr::readarr_data::{ADD_AUTHOR_BLOCKS, ActiveReadarrBlock}; +use crate::render_selectable_input_box; +use crate::ui::styles::ManagarrStyle; +use crate::ui::utils::{get_width_from_percentage, layout_block, title_block_centered}; +use crate::ui::widgets::button::Button; +use crate::ui::widgets::input_box::InputBox; +use crate::ui::widgets::managarr_table::ManagarrTable; +use crate::ui::widgets::message::Message; +use crate::ui::widgets::popup::{Popup, Size}; +use crate::ui::widgets::selectable_list::SelectableList; +use crate::ui::{DrawUi, draw_popup}; + +#[cfg(test)] +#[path = "add_author_ui_tests.rs"] +mod add_author_ui_tests; + +pub(super) struct AddAuthorUi; + +impl DrawUi for AddAuthorUi { + fn accepts(route: Route) -> bool { + let Route::Readarr(active_readarr_block, _) = route else { + return false; + }; + ADD_AUTHOR_BLOCKS.contains(&active_readarr_block) + } + + fn draw(f: &mut Frame<'_>, app: &mut App<'_>, _area: Rect) { + if let Route::Readarr(active_readarr_block, _) = app.get_current_route() { + draw_popup(f, app, draw_add_author_search, Size::Large); + + match active_readarr_block { + ActiveReadarrBlock::AddAuthorPrompt + | ActiveReadarrBlock::AddAuthorSelectMonitor + | ActiveReadarrBlock::AddAuthorSelectMonitorNewItems + | ActiveReadarrBlock::AddAuthorSelectQualityProfile + | ActiveReadarrBlock::AddAuthorSelectMetadataProfile + | ActiveReadarrBlock::AddAuthorSelectRootFolder + | ActiveReadarrBlock::AddAuthorTagsInput => { + draw_popup(f, app, draw_confirmation_popup, Size::Long); + } + ActiveReadarrBlock::AddAuthorAlreadyInLibrary => { + f.render_widget( + Popup::new(Message::new("This author is already in your library")).size(Size::Message), + f.area(), + ); + } + _ => (), + } + } + } +} + +fn build_add_author_prompt_title(author_name: &str, disambiguation: &str) -> String { + if disambiguation.is_empty() { + format!("Add - {author_name}") + } else { + format!("Add - {author_name} ({disambiguation})") + } +} + +#[derive(PartialEq, Eq)] +#[cfg_attr(test, derive(Debug))] +struct AddAuthorPromptHighlights { + root_folder: bool, + monitor: bool, + monitor_new_items: bool, + quality_profile: bool, + metadata_profile: bool, + tags: bool, + confirm: bool, +} + +fn add_author_prompt_highlights(selected_block: ActiveReadarrBlock) -> AddAuthorPromptHighlights { + AddAuthorPromptHighlights { + root_folder: selected_block == ActiveReadarrBlock::AddAuthorSelectRootFolder, + monitor: selected_block == ActiveReadarrBlock::AddAuthorSelectMonitor, + monitor_new_items: selected_block == ActiveReadarrBlock::AddAuthorSelectMonitorNewItems, + quality_profile: selected_block == ActiveReadarrBlock::AddAuthorSelectQualityProfile, + metadata_profile: selected_block == ActiveReadarrBlock::AddAuthorSelectMetadataProfile, + tags: selected_block == ActiveReadarrBlock::AddAuthorTagsInput, + confirm: selected_block == ActiveReadarrBlock::AddAuthorConfirmPrompt, + } +} + +fn already_in_library_marker(is_in_library: bool) -> &'static str { + if is_in_library { "✔" } else { "" } +} + +fn draw_add_author_search(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) { + let is_loading = app.is_loading || app.data.readarr_data.add_searched_authors.is_none(); + let current_selection = if let Some(add_searched_authors) = + app.data.readarr_data.add_searched_authors.as_ref() + && !add_searched_authors.is_empty() + { + add_searched_authors.current_selection().clone() + } else { + AddAuthorSearchResult::default() + }; + + let [search_box_area, results_area] = + Layout::vertical([Constraint::Length(3), Constraint::Fill(0)]) + .margin(1) + .areas(area); + let block_content = &app + .data + .readarr_data + .add_author_search + .as_ref() + .expect("add_author_search must be populated") + .text; + let offset = app + .data + .readarr_data + .add_author_search + .as_ref() + .expect("add_author_search must be populated") + .offset + .load(Ordering::SeqCst); + + let search_results_row_mapping = |author: &AddAuthorSearchResult| { + let rating = author + .ratings + .as_ref() + .map_or(String::new(), |r| format!("{:.1}", r.value)); + let in_library = already_in_library_marker( + app + .data + .readarr_data + .authors + .items + .iter() + .any(|a| a.foreign_author_id == author.foreign_author_id), + ); + + author.author_name.scroll_left_or_reset( + get_width_from_percentage(area, 27), + *author == current_selection, + app.should_text_scroll, + ); + + Row::new(vec![ + Cell::from(in_library), + Cell::from(author.author_name.to_string()), + Cell::from(author.author_type.clone().unwrap_or_default()), + Cell::from(author.status.to_display_str()), + Cell::from(rating), + Cell::from(author.genres.join(", ")), + ]) + .primary() + }; + + if let Route::Readarr(active_readarr_block, _) = app.get_current_route() { + match active_readarr_block { + ActiveReadarrBlock::AddAuthorSearchInput => { + let search_box = InputBox::new(block_content) + .offset(offset) + .block(title_block_centered("Add Author")); + + search_box.show_cursor(f, search_box_area); + f.render_widget(layout_block().default_color(), results_area); + f.render_widget(search_box, search_box_area); + } + ActiveReadarrBlock::AddAuthorEmptySearchResults => { + let error_message = Message::new("No authors found matching your query!"); + let error_message_popup = Popup::new(error_message).size(Size::Message); + + f.render_widget(layout_block().default_color(), results_area); + f.render_widget(error_message_popup, f.area()); + } + ActiveReadarrBlock::AddAuthorSearchResults + | ActiveReadarrBlock::AddAuthorPrompt + | ActiveReadarrBlock::AddAuthorSelectMonitor + | ActiveReadarrBlock::AddAuthorSelectMonitorNewItems + | ActiveReadarrBlock::AddAuthorSelectQualityProfile + | ActiveReadarrBlock::AddAuthorSelectMetadataProfile + | ActiveReadarrBlock::AddAuthorSelectRootFolder + | ActiveReadarrBlock::AddAuthorAlreadyInLibrary + | ActiveReadarrBlock::AddAuthorTagsInput => { + let search_results_table = ManagarrTable::new( + app.data.readarr_data.add_searched_authors.as_mut(), + search_results_row_mapping, + ) + .loading(is_loading) + .block(layout_block().default_color()) + .headers(["✔", "Name", "Type", "Status", "Rating", "Genres"]) + .constraints([ + Constraint::Percentage(3), + Constraint::Percentage(27), + Constraint::Percentage(12), + Constraint::Percentage(12), + Constraint::Percentage(8), + Constraint::Percentage(38), + ]); + + f.render_widget(search_results_table, results_area); + } + _ => (), + } + } + + f.render_widget( + InputBox::new(block_content) + .offset(offset) + .block(title_block_centered("Add Author")), + search_box_area, + ); +} + +fn draw_confirmation_popup(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) { + if let Route::Readarr(active_readarr_block, _) = app.get_current_route() { + match active_readarr_block { + ActiveReadarrBlock::AddAuthorSelectMonitor => { + draw_confirmation_prompt(f, app, area); + draw_add_author_select_monitor_popup(f, app); + } + ActiveReadarrBlock::AddAuthorSelectMonitorNewItems => { + draw_confirmation_prompt(f, app, area); + draw_add_author_select_monitor_new_items_popup(f, app); + } + ActiveReadarrBlock::AddAuthorSelectQualityProfile => { + draw_confirmation_prompt(f, app, area); + draw_add_author_select_quality_profile_popup(f, app); + } + ActiveReadarrBlock::AddAuthorSelectMetadataProfile => { + draw_confirmation_prompt(f, app, area); + draw_add_author_select_metadata_profile_popup(f, app); + } + ActiveReadarrBlock::AddAuthorSelectRootFolder => { + draw_confirmation_prompt(f, app, area); + draw_add_author_select_root_folder_popup(f, app); + } + ActiveReadarrBlock::AddAuthorPrompt | ActiveReadarrBlock::AddAuthorTagsInput => { + draw_confirmation_prompt(f, app, area) + } + _ => (), + } + } +} + +fn draw_confirmation_prompt(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) { + let searched_author = app + .data + .readarr_data + .add_searched_authors + .as_ref() + .expect("add_searched_authors must be populated") + .current_selection(); + let author_name = &searched_author.author_name.text; + let author_disambiguation = searched_author.disambiguation.clone().unwrap_or_default(); + + let title = build_add_author_prompt_title(author_name, &author_disambiguation); + let yes_no_value = app.data.readarr_data.prompt_confirm; + let selected_block = app.data.readarr_data.selected_block.get_active_block(); + let highlights = add_author_prompt_highlights(selected_block); + let AddAuthorModal { + monitor_list, + monitor_new_items_list, + quality_profile_list, + metadata_profile_list, + root_folder_list, + tags, + .. + } = app + .data + .readarr_data + .add_author_modal + .as_ref() + .expect("add_author_modal must exist in this context"); + + let selected_monitor = monitor_list.current_selection(); + let selected_monitor_new_items = monitor_new_items_list.current_selection(); + let selected_quality_profile = quality_profile_list.current_selection(); + let selected_metadata_profile = metadata_profile_list.current_selection(); + let selected_root_folder = root_folder_list.current_selection(); + + f.render_widget(title_block_centered(&title), area); + + let [ + _, + root_folder_area, + monitor_area, + monitor_new_items_area, + quality_profile_area, + metadata_profile_area, + tags_area, + _, + buttons_area, + ] = Layout::vertical([ + Constraint::Fill(1), + Constraint::Length(3), + Constraint::Length(3), + Constraint::Length(3), + Constraint::Length(3), + Constraint::Length(3), + Constraint::Length(3), + Constraint::Fill(1), + Constraint::Length(3), + ]) + .margin(1) + .areas(area); + + let [add_area, cancel_area] = + Layout::horizontal([Constraint::Percentage(50), Constraint::Percentage(50)]) + .areas(buttons_area); + + let root_folder_drop_down_button = Button::default() + .title(&selected_root_folder.path) + .label("Root Folder") + .icon("▼") + .selected(highlights.root_folder); + let monitor_drop_down_button = Button::default() + .title(selected_monitor.to_display_str()) + .label("Monitor") + .icon("▼") + .selected(highlights.monitor); + let monitor_new_items_drop_down_button = Button::default() + .title(selected_monitor_new_items.to_display_str()) + .label("Monitor New Items") + .icon("▼") + .selected(highlights.monitor_new_items); + let quality_profile_drop_down_button = Button::default() + .title(selected_quality_profile) + .label("Quality Profile") + .icon("▼") + .selected(highlights.quality_profile); + let metadata_profile_drop_down_button = Button::default() + .title(selected_metadata_profile) + .label("Metadata Profile") + .icon("▼") + .selected(highlights.metadata_profile); + + f.render_widget(root_folder_drop_down_button, root_folder_area); + f.render_widget(monitor_drop_down_button, monitor_area); + f.render_widget(monitor_new_items_drop_down_button, monitor_new_items_area); + f.render_widget(quality_profile_drop_down_button, quality_profile_area); + f.render_widget(metadata_profile_drop_down_button, metadata_profile_area); + + if let Route::Readarr(active_readarr_block, _) = app.get_current_route() { + let tags_input_box = InputBox::new(&tags.text) + .offset(tags.offset.load(Ordering::SeqCst)) + .label("Tags") + .highlighted(highlights.tags) + .selected(active_readarr_block == ActiveReadarrBlock::AddAuthorTagsInput); + render_selectable_input_box!(tags_input_box, f, tags_area); + } + + let add_button = Button::default() + .title("Add") + .selected(yes_no_value && highlights.confirm); + let cancel_button = Button::default() + .title("Cancel") + .selected(!yes_no_value && highlights.confirm); + + f.render_widget(add_button, add_area); + f.render_widget(cancel_button, cancel_area); +} + +fn draw_add_author_select_monitor_popup(f: &mut Frame<'_>, app: &mut App<'_>) { + let monitor_list = SelectableList::new( + &mut app + .data + .readarr_data + .add_author_modal + .as_mut() + .expect("add_author_modal must exist in this context") + .monitor_list, + |monitor| ListItem::new(monitor.to_display_str().to_owned()), + ); + let popup = Popup::new(monitor_list).size(Size::Dropdown); + + f.render_widget(popup, f.area()); +} + +fn draw_add_author_select_monitor_new_items_popup(f: &mut Frame<'_>, app: &mut App<'_>) { + let monitor_new_items_list = SelectableList::new( + &mut app + .data + .readarr_data + .add_author_modal + .as_mut() + .expect("add_author_modal must exist in this context") + .monitor_new_items_list, + |monitor_new_items| ListItem::new(monitor_new_items.to_display_str().to_owned()), + ); + let popup = Popup::new(monitor_new_items_list).size(Size::Dropdown); + + f.render_widget(popup, f.area()); +} + +fn draw_add_author_select_quality_profile_popup(f: &mut Frame<'_>, app: &mut App<'_>) { + let quality_profile_list = SelectableList::new( + &mut app + .data + .readarr_data + .add_author_modal + .as_mut() + .expect("add_author_modal must exist in this context") + .quality_profile_list, + |quality_profile| ListItem::new(quality_profile.clone()), + ); + let popup = Popup::new(quality_profile_list).size(Size::Dropdown); + + f.render_widget(popup, f.area()); +} + +fn draw_add_author_select_metadata_profile_popup(f: &mut Frame<'_>, app: &mut App<'_>) { + let metadata_profile_list = SelectableList::new( + &mut app + .data + .readarr_data + .add_author_modal + .as_mut() + .expect("add_author_modal must exist in this context") + .metadata_profile_list, + |metadata_profile| ListItem::new(metadata_profile.clone()), + ); + let popup = Popup::new(metadata_profile_list).size(Size::Dropdown); + + f.render_widget(popup, f.area()); +} + +fn draw_add_author_select_root_folder_popup(f: &mut Frame<'_>, app: &mut App<'_>) { + let root_folder_list = SelectableList::new( + &mut app + .data + .readarr_data + .add_author_modal + .as_mut() + .expect("add_author_modal must exist in this context") + .root_folder_list, + |root_folder| ListItem::new(root_folder.path.to_owned()), + ); + let popup = Popup::new(root_folder_list).size(Size::Dropdown); + + f.render_widget(popup, f.area()); +} diff --git a/src/ui/readarr_ui/library/add_author_ui_tests.rs b/src/ui/readarr_ui/library/add_author_ui_tests.rs new file mode 100644 index 00000000..667ae129 --- /dev/null +++ b/src/ui/readarr_ui/library/add_author_ui_tests.rs @@ -0,0 +1,289 @@ +#[cfg(test)] +mod tests { + use pretty_assertions::assert_eq; + use pretty_assertions::assert_str_eq; + use rstest::rstest; + use strum::IntoEnumIterator; + + use crate::models::servarr_data::readarr::readarr_data::{ + ADD_AUTHOR_BLOCKS, ADD_AUTHOR_SELECTION_BLOCKS, ActiveReadarrBlock, + }; + use crate::ui::DrawUi; + use crate::ui::readarr_ui::library::add_author_ui::{ + AddAuthorPromptHighlights, AddAuthorUi, add_author_prompt_highlights, + already_in_library_marker, build_add_author_prompt_title, + }; + + #[test] + fn test_add_author_ui_accepts() { + ActiveReadarrBlock::iter().for_each(|active_readarr_block| { + if ADD_AUTHOR_BLOCKS.contains(&active_readarr_block) { + assert!(AddAuthorUi::accepts(active_readarr_block.into())); + } else { + assert!(!AddAuthorUi::accepts(active_readarr_block.into())); + } + }); + } + + #[test] + fn test_build_add_author_prompt_title_without_disambiguation() { + let title = build_add_author_prompt_title("Test Author", ""); + + assert_str_eq!(title, "Add - Test Author"); + } + + #[test] + fn test_build_add_author_prompt_title_with_disambiguation() { + let title = build_add_author_prompt_title("Test Author", "American novelist"); + + assert_str_eq!(title, "Add - Test Author (American novelist)"); + } + + #[test] + fn test_already_in_library_marker_when_in_library() { + let marker = already_in_library_marker(true); + + assert_str_eq!(marker, "✔"); + } + + #[test] + fn test_already_in_library_marker_when_not_in_library() { + let marker = already_in_library_marker(false); + + assert_str_eq!(marker, ""); + } + + #[rstest] + #[case( + ActiveReadarrBlock::AddAuthorSelectRootFolder, + AddAuthorPromptHighlights { + root_folder: true, + monitor: false, + monitor_new_items: false, + quality_profile: false, + metadata_profile: false, + tags: false, + confirm: false, + } + )] + #[case( + ActiveReadarrBlock::AddAuthorSelectMonitor, + AddAuthorPromptHighlights { + root_folder: false, + monitor: true, + monitor_new_items: false, + quality_profile: false, + metadata_profile: false, + tags: false, + confirm: false, + } + )] + #[case( + ActiveReadarrBlock::AddAuthorSelectMonitorNewItems, + AddAuthorPromptHighlights { + root_folder: false, + monitor: false, + monitor_new_items: true, + quality_profile: false, + metadata_profile: false, + tags: false, + confirm: false, + } + )] + #[case( + ActiveReadarrBlock::AddAuthorSelectQualityProfile, + AddAuthorPromptHighlights { + root_folder: false, + monitor: false, + monitor_new_items: false, + quality_profile: true, + metadata_profile: false, + tags: false, + confirm: false, + } + )] + #[case( + ActiveReadarrBlock::AddAuthorSelectMetadataProfile, + AddAuthorPromptHighlights { + root_folder: false, + monitor: false, + monitor_new_items: false, + quality_profile: false, + metadata_profile: true, + tags: false, + confirm: false, + } + )] + #[case( + ActiveReadarrBlock::AddAuthorTagsInput, + AddAuthorPromptHighlights { + root_folder: false, + monitor: false, + monitor_new_items: false, + quality_profile: false, + metadata_profile: false, + tags: true, + confirm: false, + } + )] + #[case( + ActiveReadarrBlock::AddAuthorConfirmPrompt, + AddAuthorPromptHighlights { + root_folder: false, + monitor: false, + monitor_new_items: false, + quality_profile: false, + metadata_profile: false, + tags: false, + confirm: true, + } + )] + fn test_add_author_prompt_highlights( + #[case] selected_block: ActiveReadarrBlock, + #[case] expected_highlights: AddAuthorPromptHighlights, + ) { + let highlights = add_author_prompt_highlights(selected_block); + + assert_eq!(highlights, expected_highlights); + } + + #[test] + fn test_add_author_prompt_highlights_covers_every_selection_step() { + for step in ADD_AUTHOR_SELECTION_BLOCKS { + let highlights = add_author_prompt_highlights(step[0]); + + assert_ne!( + highlights, + add_author_prompt_highlights(ActiveReadarrBlock::Authors) + ); + } + } + + mod snapshot_tests { + use rstest::rstest; + + use super::*; + use crate::app::App; + use crate::models::BlockSelectionState; + use crate::models::HorizontallyScrollableText; + use crate::models::servarr_data::readarr::readarr_data::ADD_AUTHOR_SELECTION_BLOCKS; + use crate::ui::ui_test_utils::test_utils::{TerminalSize, render_to_string_with_app}; + + fn seed_distinct_profile_lists(app: &mut App<'_>) { + let add_author_modal = app + .data + .readarr_data + .add_author_modal + .as_mut() + .expect("add_author_modal must exist in this context"); + add_author_modal + .quality_profile_list + .set_items(vec!["eBook".to_owned()]); + add_author_modal + .metadata_profile_list + .set_items(vec!["Author Only".to_owned()]); + } + + #[test] + fn test_add_author_ui_renders_loading_for_search() { + let mut app = App::test_default_fully_populated(); + app.data.readarr_data.add_author_search = Some(HorizontallyScrollableText::default()); + app.data.readarr_data.add_searched_authors = None; + app.push_navigation_stack(ActiveReadarrBlock::AddAuthorSearchResults.into()); + + let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| { + AddAuthorUi::draw(f, app, f.area()); + }); + + insta::assert_snapshot!(output); + } + + #[rstest] + fn test_add_author_ui_renders( + #[values( + ActiveReadarrBlock::AddAuthorSearchInput, + ActiveReadarrBlock::AddAuthorSearchResults, + ActiveReadarrBlock::AddAuthorEmptySearchResults + )] + active_readarr_block: ActiveReadarrBlock, + ) { + let mut app = App::test_default_fully_populated(); + app.push_navigation_stack(active_readarr_block.into()); + + let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| { + AddAuthorUi::draw(f, app, f.area()); + }); + + insta::assert_snapshot!(format!("add_author_ui_{active_readarr_block}"), output); + } + + #[rstest] + #[case(0, ActiveReadarrBlock::AddAuthorSelectRootFolder)] + #[case(1, ActiveReadarrBlock::AddAuthorSelectMonitor)] + #[case(2, ActiveReadarrBlock::AddAuthorSelectMonitorNewItems)] + #[case(3, ActiveReadarrBlock::AddAuthorSelectQualityProfile)] + #[case(4, ActiveReadarrBlock::AddAuthorSelectMetadataProfile)] + #[case(5, ActiveReadarrBlock::AddAuthorTagsInput)] + #[case(6, ActiveReadarrBlock::AddAuthorConfirmPrompt)] + fn test_add_author_modal_ui_renders_step( + #[case] step: usize, + #[case] selected_readarr_block: ActiveReadarrBlock, + ) { + let mut app = App::test_default_fully_populated(); + app.push_navigation_stack(ActiveReadarrBlock::AddAuthorPrompt.into()); + seed_distinct_profile_lists(&mut app); + let mut selected_block = BlockSelectionState::new(ADD_AUTHOR_SELECTION_BLOCKS); + selected_block.set_index(0, step); + app.data.readarr_data.selected_block = selected_block; + + let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| { + AddAuthorUi::draw(f, app, f.area()); + }); + + insta::assert_snapshot!( + format!("add_author_modal_step_{step}_{selected_readarr_block}"), + output + ); + } + + #[rstest] + #[case(0, ActiveReadarrBlock::AddAuthorSelectRootFolder)] + #[case(1, ActiveReadarrBlock::AddAuthorSelectMonitor)] + #[case(2, ActiveReadarrBlock::AddAuthorSelectMonitorNewItems)] + #[case(3, ActiveReadarrBlock::AddAuthorSelectQualityProfile)] + #[case(4, ActiveReadarrBlock::AddAuthorSelectMetadataProfile)] + #[case(5, ActiveReadarrBlock::AddAuthorTagsInput)] + fn test_add_author_modal_ui_renders_active_block( + #[case] step: usize, + #[case] active_readarr_block: ActiveReadarrBlock, + ) { + let mut app = App::test_default_fully_populated(); + app.push_navigation_stack(active_readarr_block.into()); + seed_distinct_profile_lists(&mut app); + let mut selected_block = BlockSelectionState::new(ADD_AUTHOR_SELECTION_BLOCKS); + selected_block.set_index(0, step); + app.data.readarr_data.selected_block = selected_block; + + let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| { + AddAuthorUi::draw(f, app, f.area()); + }); + + insta::assert_snapshot!( + format!("add_author_modal_active_{active_readarr_block}"), + output + ); + } + + #[test] + fn test_add_author_already_in_library_ui_renders() { + let mut app = App::test_default_fully_populated(); + app.push_navigation_stack(ActiveReadarrBlock::AddAuthorAlreadyInLibrary.into()); + + let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| { + AddAuthorUi::draw(f, app, f.area()); + }); + + insta::assert_snapshot!(output); + } + } +} diff --git a/src/ui/readarr_ui/library/library_ui_tests.rs b/src/ui/readarr_ui/library/library_ui_tests.rs index 757ffde3..6e21d9ba 100644 --- a/src/ui/readarr_ui/library/library_ui_tests.rs +++ b/src/ui/readarr_ui/library/library_ui_tests.rs @@ -4,8 +4,8 @@ mod tests { use crate::models::readarr_models::{Author, AuthorStatistics, AuthorStatus}; use crate::models::servarr_data::readarr::readarr_data::{ - AUTHOR_DETAILS_BLOCKS, ActiveReadarrBlock, BOOK_DETAILS_BLOCKS, EDITION_DETAILS_BLOCKS, - LIBRARY_BLOCKS, + ADD_AUTHOR_BLOCKS, AUTHOR_DETAILS_BLOCKS, ActiveReadarrBlock, BOOK_DETAILS_BLOCKS, + EDITION_DETAILS_BLOCKS, LIBRARY_BLOCKS, }; use crate::ui::DrawUi; use crate::ui::readarr_ui::library::{LibraryUi, decorate_author_row_with_style}; @@ -19,6 +19,7 @@ mod tests { blocks.extend(AUTHOR_DETAILS_BLOCKS); blocks.extend(BOOK_DETAILS_BLOCKS); blocks.extend(EDITION_DETAILS_BLOCKS); + blocks.extend(ADD_AUTHOR_BLOCKS); for active_readarr_block in ActiveReadarrBlock::iter() { if blocks.contains(&active_readarr_block) { @@ -265,5 +266,18 @@ mod tests { insta::assert_snapshot!(output); } + + #[test] + fn test_library_ui_renders_add_author_over_library() { + let mut app = App::test_default_fully_populated(); + app.push_navigation_stack(ActiveReadarrBlock::Authors.into()); + app.push_navigation_stack(ActiveReadarrBlock::AddAuthorSearchResults.into()); + + let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| { + LibraryUi::draw(f, app, f.area()); + }); + + insta::assert_snapshot!(output); + } } } diff --git a/src/ui/readarr_ui/library/mod.rs b/src/ui/readarr_ui/library/mod.rs index 865576af..08b0e235 100644 --- a/src/ui/readarr_ui/library/mod.rs +++ b/src/ui/readarr_ui/library/mod.rs @@ -1,3 +1,4 @@ +use add_author_ui::AddAuthorUi; use author_details_ui::AuthorDetailsUi; use ratatui::{ Frame, @@ -25,6 +26,7 @@ use crate::{ }, }; +mod add_author_ui; mod author_details_ui; mod book_details_ui; mod edition_details_ui; @@ -38,7 +40,9 @@ pub(super) struct LibraryUi; impl DrawUi for LibraryUi { fn accepts(route: Route) -> bool { if let Route::Readarr(active_readarr_block, _) = route { - return AuthorDetailsUi::accepts(route) || LIBRARY_BLOCKS.contains(&active_readarr_block); + return AddAuthorUi::accepts(route) + || AuthorDetailsUi::accepts(route) + || LIBRARY_BLOCKS.contains(&active_readarr_block); } false @@ -49,6 +53,7 @@ impl DrawUi for LibraryUi { draw_library(f, app, area); match route { + _ if AddAuthorUi::accepts(route) => AddAuthorUi::draw(f, app, area), _ if AuthorDetailsUi::accepts(route) => AuthorDetailsUi::draw(f, app, area), Route::Readarr(ActiveReadarrBlock::UpdateAllAuthorsPrompt, _) => { let confirmation_prompt = ConfirmationPrompt::new() diff --git a/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_already_in_library_ui_renders.snap b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_already_in_library_ui_renders.snap new file mode 100644 index 00000000..143ccb74 --- /dev/null +++ b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_already_in_library_ui_renders.snap @@ -0,0 +1,47 @@ +--- +source: src/ui/readarr_ui/library/add_author_ui_tests.rs +expression: output +--- + + + + + + + + ╭───────────────────────────────────────────────────── Add Author ─────────────────────────────────────────────────────╮ + │Test Author │ + ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ + ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ + │ ✔ Name Type Status Rating Genres │ + │=> ✔ Test Author Person Continuing 4.5 science fiction │ + │ Unadded Author Group Ended fantasy, horror │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ ╭─────────────── Error ───────────────╮ │ + │ │This author is already in your library │ │ + │ │ │ │ + │ ╰───────────────────────────────────────╯ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_active_AddAuthorSelectMetadataProfile.snap b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_active_AddAuthorSelectMetadataProfile.snap new file mode 100644 index 00000000..617c0da2 --- /dev/null +++ b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_active_AddAuthorSelectMetadataProfile.snap @@ -0,0 +1,48 @@ +--- +source: src/ui/readarr_ui/library/add_author_ui_tests.rs +expression: output +--- + + + + + + + ╭──────────────────────────────── Add - Test Author (American novelist) ────────────────────────────────╮ + ╭──────│ │───────╮ + │Test A│ │ │ + ╰──────│ │───────╯ + ╭──────│ │───────╮ + │ ✔ │ │ │ + │=> ✔ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Root Folder: │/nfs ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭───────────────────────────────╮──────────────────────────────╮ │ │ + │ │ │Author Only │ ▼ │ │ │ + │ │ │ │──────────────────────────────╯ │ │ + │ │ │ │──────────────────────────────╮ │ │ + │ │ Monito│ │ ▼ │ │ │ + │ │ │ │──────────────────────────────╯ │ │ + │ │ │ │──────────────────────────────╮ │ │ + │ │ Qual│ │ ▼ │ │ │ + │ │ │ │──────────────────────────────╯ │ │ + │ │ │ │──────────────────────────────╮ │ │ + │ │ Metad│ │ ▼ │ │ │ + │ │ │ │──────────────────────────────╯ │ │ + │ │ │ │──────────────────────────────╮ │ │ + │ │ │ │ │ │ │ + │ │ ╰───────────────────────────────╯──────────────────────────────╯ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │╭───────────────────────────────────────────────────╮╭──────────────────────────────────────────────────╮│ │ + │ ││ Add ││ Cancel ││ │ + ╰──────│╰───────────────────────────────────────────────────╯╰──────────────────────────────────────────────────╯│───────╯ + ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_active_AddAuthorSelectMonitor.snap b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_active_AddAuthorSelectMonitor.snap new file mode 100644 index 00000000..b08e1755 --- /dev/null +++ b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_active_AddAuthorSelectMonitor.snap @@ -0,0 +1,48 @@ +--- +source: src/ui/readarr_ui/library/add_author_ui_tests.rs +expression: output +--- + + + + + + + ╭──────────────────────────────── Add - Test Author (American novelist) ────────────────────────────────╮ + ╭──────│ │───────╮ + │Test A│ │ │ + ╰──────│ │───────╯ + ╭──────│ │───────╮ + │ ✔ │ │ │ + │=> ✔ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Root Folder: │/nfs ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭───────────────────────────────╮──────────────────────────────╮ │ │ + │ │ │All Books │ ▼ │ │ │ + │ │ │Future Books │──────────────────────────────╯ │ │ + │ │ │Missing Books │──────────────────────────────╮ │ │ + │ │ Monito│Existing Books │ ▼ │ │ │ + │ │ │First Book │──────────────────────────────╯ │ │ + │ │ │Latest Book │──────────────────────────────╮ │ │ + │ │ Qual│None │ ▼ │ │ │ + │ │ │Unknown │──────────────────────────────╯ │ │ + │ │ │ │──────────────────────────────╮ │ │ + │ │ Metad│ │ ▼ │ │ │ + │ │ │ │──────────────────────────────╯ │ │ + │ │ │ │──────────────────────────────╮ │ │ + │ │ │ │ │ │ │ + │ │ ╰───────────────────────────────╯──────────────────────────────╯ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │╭───────────────────────────────────────────────────╮╭──────────────────────────────────────────────────╮│ │ + │ ││ Add ││ Cancel ││ │ + ╰──────│╰───────────────────────────────────────────────────╯╰──────────────────────────────────────────────────╯│───────╯ + ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_active_AddAuthorSelectMonitorNewItems.snap b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_active_AddAuthorSelectMonitorNewItems.snap new file mode 100644 index 00000000..003db906 --- /dev/null +++ b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_active_AddAuthorSelectMonitorNewItems.snap @@ -0,0 +1,48 @@ +--- +source: src/ui/readarr_ui/library/add_author_ui_tests.rs +expression: output +--- + + + + + + + ╭──────────────────────────────── Add - Test Author (American novelist) ────────────────────────────────╮ + ╭──────│ │───────╮ + │Test A│ │ │ + ╰──────│ │───────╯ + ╭──────│ │───────╮ + │ ✔ │ │ │ + │=> ✔ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Root Folder: │/nfs ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭───────────────────────────────╮──────────────────────────────╮ │ │ + │ │ │All Books │ ▼ │ │ │ + │ │ │No New Books │──────────────────────────────╯ │ │ + │ │ │New Books │──────────────────────────────╮ │ │ + │ │ Monito│ │ ▼ │ │ │ + │ │ │ │──────────────────────────────╯ │ │ + │ │ │ │──────────────────────────────╮ │ │ + │ │ Qual│ │ ▼ │ │ │ + │ │ │ │──────────────────────────────╯ │ │ + │ │ │ │──────────────────────────────╮ │ │ + │ │ Metad│ │ ▼ │ │ │ + │ │ │ │──────────────────────────────╯ │ │ + │ │ │ │──────────────────────────────╮ │ │ + │ │ │ │ │ │ │ + │ │ ╰───────────────────────────────╯──────────────────────────────╯ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │╭───────────────────────────────────────────────────╮╭──────────────────────────────────────────────────╮│ │ + │ ││ Add ││ Cancel ││ │ + ╰──────│╰───────────────────────────────────────────────────╯╰──────────────────────────────────────────────────╯│───────╯ + ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_active_AddAuthorSelectQualityProfile.snap b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_active_AddAuthorSelectQualityProfile.snap new file mode 100644 index 00000000..eb0c7de1 --- /dev/null +++ b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_active_AddAuthorSelectQualityProfile.snap @@ -0,0 +1,48 @@ +--- +source: src/ui/readarr_ui/library/add_author_ui_tests.rs +expression: output +--- + + + + + + + ╭──────────────────────────────── Add - Test Author (American novelist) ────────────────────────────────╮ + ╭──────│ │───────╮ + │Test A│ │ │ + ╰──────│ │───────╯ + ╭──────│ │───────╮ + │ ✔ │ │ │ + │=> ✔ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Root Folder: │/nfs ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭───────────────────────────────╮──────────────────────────────╮ │ │ + │ │ │eBook │ ▼ │ │ │ + │ │ │ │──────────────────────────────╯ │ │ + │ │ │ │──────────────────────────────╮ │ │ + │ │ Monito│ │ ▼ │ │ │ + │ │ │ │──────────────────────────────╯ │ │ + │ │ │ │──────────────────────────────╮ │ │ + │ │ Qual│ │ ▼ │ │ │ + │ │ │ │──────────────────────────────╯ │ │ + │ │ │ │──────────────────────────────╮ │ │ + │ │ Metad│ │ ▼ │ │ │ + │ │ │ │──────────────────────────────╯ │ │ + │ │ │ │──────────────────────────────╮ │ │ + │ │ │ │ │ │ │ + │ │ ╰───────────────────────────────╯──────────────────────────────╯ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │╭───────────────────────────────────────────────────╮╭──────────────────────────────────────────────────╮│ │ + │ ││ Add ││ Cancel ││ │ + ╰──────│╰───────────────────────────────────────────────────╯╰──────────────────────────────────────────────────╯│───────╯ + ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_active_AddAuthorSelectRootFolder.snap b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_active_AddAuthorSelectRootFolder.snap new file mode 100644 index 00000000..0cd8327a --- /dev/null +++ b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_active_AddAuthorSelectRootFolder.snap @@ -0,0 +1,48 @@ +--- +source: src/ui/readarr_ui/library/add_author_ui_tests.rs +expression: output +--- + + + + + + + ╭──────────────────────────────── Add - Test Author (American novelist) ────────────────────────────────╮ + ╭──────│ │───────╮ + │Test A│ │ │ + ╰──────│ │───────╯ + ╭──────│ │───────╮ + │ ✔ │ │ │ + │=> ✔ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Root Folder: │/nfs ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭───────────────────────────────╮──────────────────────────────╮ │ │ + │ │ │/nfs │ ▼ │ │ │ + │ │ │ │──────────────────────────────╯ │ │ + │ │ │ │──────────────────────────────╮ │ │ + │ │ Monito│ │ ▼ │ │ │ + │ │ │ │──────────────────────────────╯ │ │ + │ │ │ │──────────────────────────────╮ │ │ + │ │ Qual│ │ ▼ │ │ │ + │ │ │ │──────────────────────────────╯ │ │ + │ │ │ │──────────────────────────────╮ │ │ + │ │ Metad│ │ ▼ │ │ │ + │ │ │ │──────────────────────────────╯ │ │ + │ │ │ │──────────────────────────────╮ │ │ + │ │ │ │ │ │ │ + │ │ ╰───────────────────────────────╯──────────────────────────────╯ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │╭───────────────────────────────────────────────────╮╭──────────────────────────────────────────────────╮│ │ + │ ││ Add ││ Cancel ││ │ + ╰──────│╰───────────────────────────────────────────────────╯╰──────────────────────────────────────────────────╯│───────╯ + ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_active_AddAuthorTagsInput.snap b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_active_AddAuthorTagsInput.snap new file mode 100644 index 00000000..0ad696bf --- /dev/null +++ b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_active_AddAuthorTagsInput.snap @@ -0,0 +1,48 @@ +--- +source: src/ui/readarr_ui/library/add_author_ui_tests.rs +expression: output +--- + + + + + + + ╭──────────────────────────────── Add - Test Author (American novelist) ────────────────────────────────╮ + ╭──────│ │───────╮ + │Test A│ │ │ + ╰──────│ │───────╯ + ╭──────│ │───────╮ + │ ✔ │ │ │ + │=> ✔ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Root Folder: │/nfs ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Monitor: │All Books ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Monitor New Items: │All Books ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Quality Profile: │eBook ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Metadata Profile: │Author Only ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Tags: │usenet, testing │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │╭───────────────────────────────────────────────────╮╭──────────────────────────────────────────────────╮│ │ + │ ││ Add ││ Cancel ││ │ + ╰──────│╰───────────────────────────────────────────────────╯╰──────────────────────────────────────────────────╯│───────╯ + ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_step_0_AddAuthorSelectRootFolder.snap b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_step_0_AddAuthorSelectRootFolder.snap new file mode 100644 index 00000000..0ad696bf --- /dev/null +++ b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_step_0_AddAuthorSelectRootFolder.snap @@ -0,0 +1,48 @@ +--- +source: src/ui/readarr_ui/library/add_author_ui_tests.rs +expression: output +--- + + + + + + + ╭──────────────────────────────── Add - Test Author (American novelist) ────────────────────────────────╮ + ╭──────│ │───────╮ + │Test A│ │ │ + ╰──────│ │───────╯ + ╭──────│ │───────╮ + │ ✔ │ │ │ + │=> ✔ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Root Folder: │/nfs ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Monitor: │All Books ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Monitor New Items: │All Books ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Quality Profile: │eBook ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Metadata Profile: │Author Only ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Tags: │usenet, testing │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │╭───────────────────────────────────────────────────╮╭──────────────────────────────────────────────────╮│ │ + │ ││ Add ││ Cancel ││ │ + ╰──────│╰───────────────────────────────────────────────────╯╰──────────────────────────────────────────────────╯│───────╯ + ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_step_1_AddAuthorSelectMonitor.snap b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_step_1_AddAuthorSelectMonitor.snap new file mode 100644 index 00000000..0ad696bf --- /dev/null +++ b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_step_1_AddAuthorSelectMonitor.snap @@ -0,0 +1,48 @@ +--- +source: src/ui/readarr_ui/library/add_author_ui_tests.rs +expression: output +--- + + + + + + + ╭──────────────────────────────── Add - Test Author (American novelist) ────────────────────────────────╮ + ╭──────│ │───────╮ + │Test A│ │ │ + ╰──────│ │───────╯ + ╭──────│ │───────╮ + │ ✔ │ │ │ + │=> ✔ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Root Folder: │/nfs ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Monitor: │All Books ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Monitor New Items: │All Books ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Quality Profile: │eBook ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Metadata Profile: │Author Only ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Tags: │usenet, testing │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │╭───────────────────────────────────────────────────╮╭──────────────────────────────────────────────────╮│ │ + │ ││ Add ││ Cancel ││ │ + ╰──────│╰───────────────────────────────────────────────────╯╰──────────────────────────────────────────────────╯│───────╯ + ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_step_2_AddAuthorSelectMonitorNewItems.snap b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_step_2_AddAuthorSelectMonitorNewItems.snap new file mode 100644 index 00000000..0ad696bf --- /dev/null +++ b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_step_2_AddAuthorSelectMonitorNewItems.snap @@ -0,0 +1,48 @@ +--- +source: src/ui/readarr_ui/library/add_author_ui_tests.rs +expression: output +--- + + + + + + + ╭──────────────────────────────── Add - Test Author (American novelist) ────────────────────────────────╮ + ╭──────│ │───────╮ + │Test A│ │ │ + ╰──────│ │───────╯ + ╭──────│ │───────╮ + │ ✔ │ │ │ + │=> ✔ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Root Folder: │/nfs ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Monitor: │All Books ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Monitor New Items: │All Books ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Quality Profile: │eBook ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Metadata Profile: │Author Only ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Tags: │usenet, testing │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │╭───────────────────────────────────────────────────╮╭──────────────────────────────────────────────────╮│ │ + │ ││ Add ││ Cancel ││ │ + ╰──────│╰───────────────────────────────────────────────────╯╰──────────────────────────────────────────────────╯│───────╯ + ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_step_3_AddAuthorSelectQualityProfile.snap b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_step_3_AddAuthorSelectQualityProfile.snap new file mode 100644 index 00000000..0ad696bf --- /dev/null +++ b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_step_3_AddAuthorSelectQualityProfile.snap @@ -0,0 +1,48 @@ +--- +source: src/ui/readarr_ui/library/add_author_ui_tests.rs +expression: output +--- + + + + + + + ╭──────────────────────────────── Add - Test Author (American novelist) ────────────────────────────────╮ + ╭──────│ │───────╮ + │Test A│ │ │ + ╰──────│ │───────╯ + ╭──────│ │───────╮ + │ ✔ │ │ │ + │=> ✔ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Root Folder: │/nfs ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Monitor: │All Books ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Monitor New Items: │All Books ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Quality Profile: │eBook ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Metadata Profile: │Author Only ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Tags: │usenet, testing │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │╭───────────────────────────────────────────────────╮╭──────────────────────────────────────────────────╮│ │ + │ ││ Add ││ Cancel ││ │ + ╰──────│╰───────────────────────────────────────────────────╯╰──────────────────────────────────────────────────╯│───────╯ + ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_step_4_AddAuthorSelectMetadataProfile.snap b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_step_4_AddAuthorSelectMetadataProfile.snap new file mode 100644 index 00000000..0ad696bf --- /dev/null +++ b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_step_4_AddAuthorSelectMetadataProfile.snap @@ -0,0 +1,48 @@ +--- +source: src/ui/readarr_ui/library/add_author_ui_tests.rs +expression: output +--- + + + + + + + ╭──────────────────────────────── Add - Test Author (American novelist) ────────────────────────────────╮ + ╭──────│ │───────╮ + │Test A│ │ │ + ╰──────│ │───────╯ + ╭──────│ │───────╮ + │ ✔ │ │ │ + │=> ✔ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Root Folder: │/nfs ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Monitor: │All Books ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Monitor New Items: │All Books ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Quality Profile: │eBook ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Metadata Profile: │Author Only ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Tags: │usenet, testing │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │╭───────────────────────────────────────────────────╮╭──────────────────────────────────────────────────╮│ │ + │ ││ Add ││ Cancel ││ │ + ╰──────│╰───────────────────────────────────────────────────╯╰──────────────────────────────────────────────────╯│───────╯ + ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_step_5_AddAuthorTagsInput.snap b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_step_5_AddAuthorTagsInput.snap new file mode 100644 index 00000000..0ad696bf --- /dev/null +++ b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_step_5_AddAuthorTagsInput.snap @@ -0,0 +1,48 @@ +--- +source: src/ui/readarr_ui/library/add_author_ui_tests.rs +expression: output +--- + + + + + + + ╭──────────────────────────────── Add - Test Author (American novelist) ────────────────────────────────╮ + ╭──────│ │───────╮ + │Test A│ │ │ + ╰──────│ │───────╯ + ╭──────│ │───────╮ + │ ✔ │ │ │ + │=> ✔ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Root Folder: │/nfs ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Monitor: │All Books ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Monitor New Items: │All Books ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Quality Profile: │eBook ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Metadata Profile: │Author Only ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Tags: │usenet, testing │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │╭───────────────────────────────────────────────────╮╭──────────────────────────────────────────────────╮│ │ + │ ││ Add ││ Cancel ││ │ + ╰──────│╰───────────────────────────────────────────────────╯╰──────────────────────────────────────────────────╯│───────╯ + ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_step_6_AddAuthorConfirmPrompt.snap b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_step_6_AddAuthorConfirmPrompt.snap new file mode 100644 index 00000000..0ad696bf --- /dev/null +++ b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_modal_step_6_AddAuthorConfirmPrompt.snap @@ -0,0 +1,48 @@ +--- +source: src/ui/readarr_ui/library/add_author_ui_tests.rs +expression: output +--- + + + + + + + ╭──────────────────────────────── Add - Test Author (American novelist) ────────────────────────────────╮ + ╭──────│ │───────╮ + │Test A│ │ │ + ╰──────│ │───────╯ + ╭──────│ │───────╮ + │ ✔ │ │ │ + │=> ✔ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Root Folder: │/nfs ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Monitor: │All Books ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Monitor New Items: │All Books ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Quality Profile: │eBook ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Metadata Profile: │Author Only ▼ │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ ╭─────────────────────────────────────────────────╮ │ │ + │ │ Tags: │usenet, testing │ │ │ + │ │ ╰─────────────────────────────────────────────────╯ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │╭───────────────────────────────────────────────────╮╭──────────────────────────────────────────────────╮│ │ + │ ││ Add ││ Cancel ││ │ + ╰──────│╰───────────────────────────────────────────────────╯╰──────────────────────────────────────────────────╯│───────╯ + ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_ui_AddAuthorEmptySearchResults.snap b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_ui_AddAuthorEmptySearchResults.snap new file mode 100644 index 00000000..872a81f2 --- /dev/null +++ b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_ui_AddAuthorEmptySearchResults.snap @@ -0,0 +1,47 @@ +--- +source: src/ui/readarr_ui/library/add_author_ui_tests.rs +expression: output +--- + + + + + + + + ╭───────────────────────────────────────────────────── Add Author ─────────────────────────────────────────────────────╮ + │Test Author │ + ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ + ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ ╭─────────────── Error ───────────────╮ │ + │ │ No authors found matching your query! │ │ + │ │ │ │ + │ ╰───────────────────────────────────────╯ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_ui_AddAuthorSearchInput.snap b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_ui_AddAuthorSearchInput.snap new file mode 100644 index 00000000..229f00ce --- /dev/null +++ b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_ui_AddAuthorSearchInput.snap @@ -0,0 +1,47 @@ +--- +source: src/ui/readarr_ui/library/add_author_ui_tests.rs +expression: output +--- + + + + + + + + ╭───────────────────────────────────────────────────── Add Author ─────────────────────────────────────────────────────╮ + │Test Author │ + ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ + ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_ui_AddAuthorSearchResults.snap b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_ui_AddAuthorSearchResults.snap new file mode 100644 index 00000000..507e5116 --- /dev/null +++ b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_ui_AddAuthorSearchResults.snap @@ -0,0 +1,47 @@ +--- +source: src/ui/readarr_ui/library/add_author_ui_tests.rs +expression: output +--- + + + + + + + + ╭───────────────────────────────────────────────────── Add Author ─────────────────────────────────────────────────────╮ + │Test Author │ + ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ + ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ + │ ✔ Name Type Status Rating Genres │ + │=> ✔ Test Author Person Continuing 4.5 science fiction │ + │ Unadded Author Group Ended fantasy, horror │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_ui_renders_loading_for_search.snap b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_ui_renders_loading_for_search.snap new file mode 100644 index 00000000..9f640028 --- /dev/null +++ b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__add_author_ui__add_author_ui_tests__tests__snapshot_tests__add_author_ui_renders_loading_for_search.snap @@ -0,0 +1,47 @@ +--- +source: src/ui/readarr_ui/library/add_author_ui_tests.rs +expression: output +--- + + + + + + + + ╭───────────────────────────────────────────────────── Add Author ─────────────────────────────────────────────────────╮ + │ │ + ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ + ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ + │ │ + │ │ + │ Loading ... │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__library_ui_tests__tests__snapshot_tests__library_ui_renders_add_author_over_library.snap b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__library_ui_tests__tests__snapshot_tests__library_ui_renders_add_author_over_library.snap new file mode 100644 index 00000000..45145085 --- /dev/null +++ b/src/ui/readarr_ui/library/snapshots/managarr__ui__readarr_ui__library__library_ui_tests__tests__snapshot_tests__library_ui_renders_add_author_over_library.snap @@ -0,0 +1,47 @@ +--- +source: src/ui/readarr_ui/library/library_ui_tests.rs +expression: output +--- +───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── + Name ▼ Status Quality Profile Metadata Profile Books Size Monitored Tags +=> Test Author Continuing Standard Standard 0 0.00 GB 🏷 alex + + + + + ╭───────────────────────────────────────────────────── Add Author ─────────────────────────────────────────────────────╮ + │Test Author │ + ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ + ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ + │ ✔ Name Type Status Rating Genres │ + │=> ✔ Test Author Person Continuing 4.5 science fiction │ + │ Unadded Author Group Ended fantasy, horror │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯