From b3ce15a564c1b3cfda4ce4224ddced7c63d2e7a6 Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Tue, 8 Sep 2026 21:31:25 -0600 Subject: [PATCH] feat(sonarr): add a scrollable overview popup to series details A series' overview renders as one line of a description box that does not scroll, so a long overview overflows with no way to read the rest. Pressing v on the series details Seasons tab now opens a popup holding the full overview. The popup owns its own ScrollableText, built fresh from the series' overview when it opens and torn down on Esc so a reopened popup starts at the top. Scrolling mutates only that owned state. The background paragraph renders the Series record's overview, which carries no scroll offset, so it cannot scroll along with the popup. Cite the existing view keybinding from the series details context clues and give the popup its own clue set so it does not inherit the hints of the view underneath. Enrich the shared series fixture to a multi-paragraph overview, and the raw response fixture that encodes the same series, so a scrolled popup is distinguishable from an unscrolled one. --- src/app/sonarr/sonarr_context_clues.rs | 16 +- src/app/sonarr/sonarr_context_clues_tests.rs | 34 +- .../library/library_handler_tests.rs | 2 + src/handlers/sonarr_handlers/library/mod.rs | 1 + .../library/series_details_handler.rs | 38 +- .../library/series_details_handler_tests.rs | 175 +++++++- .../library/series_overview_handler.rs | 109 +++++ .../library/series_overview_handler_tests.rs | 393 ++++++++++++++++++ .../sonarr_handler_test_utils.rs | 9 +- src/models/servarr_data/sonarr/modals.rs | 6 + .../servarr_data/sonarr/modals_tests.rs | 9 +- src/models/servarr_data/sonarr/sonarr_data.rs | 12 +- .../servarr_data/sonarr/sonarr_data_tests.rs | 15 +- .../sonarr_network_test_utils.rs | 11 +- src/ui/sonarr_ui/library/library_ui_tests.rs | 3 +- src/ui/sonarr_ui/library/mod.rs | 1 + src/ui/sonarr_ui/library/series_details_ui.rs | 6 + .../library/series_details_ui_tests.rs | 41 ++ .../sonarr_ui/library/series_overview_ui.rs | 87 ++++ .../library/series_overview_ui_tests.rs | 205 +++++++++ ...__edit_series_EditSeriesConfirmPrompt.snap | 4 +- ...EditSeriesConfirmPrompt_SeriesDetails.snap | 6 +- ...t_tests__edit_series_EditSeriesPrompt.snap | 4 +- ...series_EditSeriesPrompt_SeriesDetails.snap | 6 +- ...eries_EditSeriesSelectLanguageProfile.snap | 4 +- ...esSelectLanguageProfile_SeriesDetails.snap | 6 +- ...series_EditSeriesSelectQualityProfile.snap | 4 +- ...iesSelectQualityProfile_SeriesDetails.snap | 6 +- ...dit_series_EditSeriesSelectSeriesType.snap | 4 +- ...tSeriesSelectSeriesType_SeriesDetails.snap | 6 +- ...ry_ui_renders_edit_series_over_series.snap | 4 +- ...ui_renders_series_details_over_series.snap | 2 +- ...s__empty_series_details_SeriesDetails.snap | 2 +- ...s__empty_series_details_SeriesHistory.snap | 2 +- ...y_series_details_SeriesHistoryDetails.snap | 2 +- ..._loading_series_details_SeriesDetails.snap | 2 +- ..._loading_series_details_SeriesHistory.snap | 2 +- ..._ui_AutomaticallySearchSeriesPrompt_0.snap | 2 +- ..._ui_AutomaticallySearchSeriesPrompt_1.snap | 2 +- ...details_ui_FilterSeriesHistoryError_1.snap | 2 +- ...ries_details_ui_FilterSeriesHistory_1.snap | 2 +- ...series_details_ui_SearchSeasonError_0.snap | 2 +- ...sts__series_details_ui_SearchSeason_0.snap | 2 +- ...details_ui_SearchSeriesHistoryError_1.snap | 2 +- ...ries_details_ui_SearchSeriesHistory_1.snap | 2 +- ...ts__series_details_ui_SeriesDetails_0.snap | 2 +- ...ies_details_ui_SeriesHistoryDetails_1.snap | 2 +- ..._details_ui_SeriesHistorySortPrompt_1.snap | 2 +- ...ts__series_details_ui_SeriesHistory_1.snap | 2 +- ...etails_ui_UpdateAndScanSeriesPrompt_0.snap | 2 +- ...etails_ui_UpdateAndScanSeriesPrompt_1.snap | 2 +- ...s_series_overview_over_series_details.snap | 52 +++ ...hot_tests__series_overview_ui_renders.snap | 48 +++ ..._ui_renders_a_series_with_no_overview.snap | 48 +++ ...s__series_overview_ui_renders_loading.snap | 48 +++ ...he_series_overview_modal_is_undefined.snap | 5 + ...__series_overview_ui_renders_scrolled.snap | 48 +++ 57 files changed, 1454 insertions(+), 62 deletions(-) create mode 100644 src/handlers/sonarr_handlers/library/series_overview_handler.rs create mode 100644 src/handlers/sonarr_handlers/library/series_overview_handler_tests.rs create mode 100644 src/ui/sonarr_ui/library/series_overview_ui.rs create mode 100644 src/ui/sonarr_ui/library/series_overview_ui_tests.rs create mode 100644 src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_renders_series_overview_over_series_details.snap create mode 100644 src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_overview_ui__series_overview_ui_tests__tests__snapshot_tests__series_overview_ui_renders.snap create mode 100644 src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_overview_ui__series_overview_ui_tests__tests__snapshot_tests__series_overview_ui_renders_a_series_with_no_overview.snap create mode 100644 src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_overview_ui__series_overview_ui_tests__tests__snapshot_tests__series_overview_ui_renders_loading.snap create mode 100644 src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_overview_ui__series_overview_ui_tests__tests__snapshot_tests__series_overview_ui_renders_nothing_when_the_series_overview_modal_is_undefined.snap create mode 100644 src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_overview_ui__series_overview_ui_tests__tests__snapshot_tests__series_overview_ui_renders_scrolled.snap diff --git a/src/app/sonarr/sonarr_context_clues.rs b/src/app/sonarr/sonarr_context_clues.rs index fb5b46c6..1ed267a0 100644 --- a/src/app/sonarr/sonarr_context_clues.rs +++ b/src/app/sonarr/sonarr_context_clues.rs @@ -7,7 +7,7 @@ use crate::models::Route; use crate::models::servarr_data::sonarr::sonarr_data::{ ADD_SERIES_BLOCKS, ActiveSonarrBlock, DELETE_SERIES_BLOCKS, EDIT_INDEXER_BLOCKS, EDIT_SERIES_BLOCKS, EPISODE_DETAILS_BLOCKS, INDEXER_SETTINGS_BLOCKS, SEASON_DETAILS_BLOCKS, - SERIES_DETAILS_BLOCKS, + SERIES_DETAILS_BLOCKS, SERIES_OVERVIEW_BLOCKS, }; #[cfg(test)] @@ -39,7 +39,7 @@ pub static SERIES_CONTEXT_CLUES: [ContextClue; 11] = [ (DEFAULT_KEYBINDINGS.esc, "cancel filter"), ]; -pub static SERIES_DETAILS_CONTEXT_CLUES: [ContextClue; 8] = [ +pub static SERIES_DETAILS_CONTEXT_CLUES: [ContextClue; 9] = [ ( DEFAULT_KEYBINDINGS.refresh, DEFAULT_KEYBINDINGS.refresh.desc, @@ -56,6 +56,15 @@ pub static SERIES_DETAILS_CONTEXT_CLUES: [ContextClue; 8] = [ DEFAULT_KEYBINDINGS.auto_search, DEFAULT_KEYBINDINGS.auto_search.desc, ), + (DEFAULT_KEYBINDINGS.view, "view overview"), + (DEFAULT_KEYBINDINGS.esc, DEFAULT_KEYBINDINGS.esc.desc), +]; + +pub static SERIES_OVERVIEW_CONTEXT_CLUES: [ContextClue; 2] = [ + ( + DEFAULT_KEYBINDINGS.refresh, + DEFAULT_KEYBINDINGS.refresh.desc, + ), (DEFAULT_KEYBINDINGS.esc, DEFAULT_KEYBINDINGS.esc.desc), ]; @@ -178,6 +187,9 @@ impl ContextClueProvider for SonarrContextClueProvider { .sonarr_data .series_info_tabs .get_active_route_contextual_help(), + _ if SERIES_OVERVIEW_BLOCKS.contains(&active_sonarr_block) => { + Some(&SERIES_OVERVIEW_CONTEXT_CLUES) + } _ if SEASON_DETAILS_BLOCKS.contains(&active_sonarr_block) => app .data .sonarr_data diff --git a/src/app/sonarr/sonarr_context_clues_tests.rs b/src/app/sonarr/sonarr_context_clues_tests.rs index 6f3e4322..09479525 100644 --- a/src/app/sonarr/sonarr_context_clues_tests.rs +++ b/src/app/sonarr/sonarr_context_clues_tests.rs @@ -16,7 +16,7 @@ mod tests { ADD_SERIES_SEARCH_RESULTS_CONTEXT_CLUES, EPISODE_DETAILS_CONTEXT_CLUES, MANUAL_EPISODE_SEARCH_CONTEXT_CLUES, MANUAL_SEASON_SEARCH_CONTEXT_CLUES, SEASON_DETAILS_CONTEXT_CLUES, SEASON_HISTORY_CONTEXT_CLUES, SERIES_CONTEXT_CLUES, - SERIES_DETAILS_CONTEXT_CLUES, SERIES_HISTORY_CONTEXT_CLUES, + SERIES_DETAILS_CONTEXT_CLUES, SERIES_HISTORY_CONTEXT_CLUES, SERIES_OVERVIEW_CONTEXT_CLUES, }, }; use crate::models::servarr_data::radarr::radarr_data::ActiveRadarrBlock; @@ -187,6 +187,10 @@ mod tests { DEFAULT_KEYBINDINGS.auto_search.desc ) ); + assert_some_eq_x!( + series_details_context_clues_iter.next(), + &(DEFAULT_KEYBINDINGS.view, "view overview") + ); assert_some_eq_x!( series_details_context_clues_iter.next(), &(DEFAULT_KEYBINDINGS.esc, DEFAULT_KEYBINDINGS.esc.desc) @@ -194,6 +198,24 @@ mod tests { assert_none!(series_details_context_clues_iter.next()); } + #[test] + fn test_series_overview_context_clues() { + let mut series_overview_context_clues_iter = SERIES_OVERVIEW_CONTEXT_CLUES.iter(); + + assert_some_eq_x!( + series_overview_context_clues_iter.next(), + &( + DEFAULT_KEYBINDINGS.refresh, + DEFAULT_KEYBINDINGS.refresh.desc + ) + ); + assert_some_eq_x!( + series_overview_context_clues_iter.next(), + &(DEFAULT_KEYBINDINGS.esc, DEFAULT_KEYBINDINGS.esc.desc) + ); + assert_none!(series_overview_context_clues_iter.next()); + } + #[test] fn test_season_details_context_clues() { let mut season_details_context_clues_iter = SEASON_DETAILS_CONTEXT_CLUES.iter(); @@ -442,6 +464,16 @@ mod tests { assert_some_eq_x!(context_clues, expected_context_clues); } + #[test] + fn test_sonarr_context_clue_provider_series_overview_block() { + let mut app = App::test_default(); + app.push_navigation_stack(ActiveSonarrBlock::SeriesOverview.into()); + + let context_clues = SonarrContextClueProvider::get_context_clues(&mut app); + + assert_some_eq_x!(context_clues, &SERIES_OVERVIEW_CONTEXT_CLUES); + } + #[rstest] #[case(0, ActiveSonarrBlock::SeasonDetails, &SEASON_DETAILS_CONTEXT_CLUES)] #[case(1, ActiveSonarrBlock::SeasonHistory, &SEASON_HISTORY_CONTEXT_CLUES)] diff --git a/src/handlers/sonarr_handlers/library/library_handler_tests.rs b/src/handlers/sonarr_handlers/library/library_handler_tests.rs index 712168b2..0a605790 100644 --- a/src/handlers/sonarr_handlers/library/library_handler_tests.rs +++ b/src/handlers/sonarr_handlers/library/library_handler_tests.rs @@ -17,6 +17,7 @@ mod tests { use crate::models::servarr_data::sonarr::sonarr_data::{ ADD_SERIES_BLOCKS, ActiveSonarrBlock, DELETE_SERIES_BLOCKS, EDIT_SERIES_BLOCKS, EPISODE_DETAILS_BLOCKS, LIBRARY_BLOCKS, SEASON_DETAILS_BLOCKS, SERIES_DETAILS_BLOCKS, + SERIES_OVERVIEW_BLOCKS, }; use crate::models::sonarr_models::{Series, SeriesStatistics, SeriesStatus, SeriesType}; use crate::test_handler_delegation; @@ -891,6 +892,7 @@ mod tests { library_handler_blocks.extend(DELETE_SERIES_BLOCKS); library_handler_blocks.extend(EDIT_SERIES_BLOCKS); library_handler_blocks.extend(SERIES_DETAILS_BLOCKS); + library_handler_blocks.extend(SERIES_OVERVIEW_BLOCKS); library_handler_blocks.extend(SEASON_DETAILS_BLOCKS); library_handler_blocks.extend(EPISODE_DETAILS_BLOCKS); diff --git a/src/handlers/sonarr_handlers/library/mod.rs b/src/handlers/sonarr_handlers/library/mod.rs index 01934a4e..ab8837ec 100644 --- a/src/handlers/sonarr_handlers/library/mod.rs +++ b/src/handlers/sonarr_handlers/library/mod.rs @@ -36,6 +36,7 @@ mod episode_details_handler; mod library_handler_tests; mod season_details_handler; mod series_details_handler; +mod series_overview_handler; pub(super) struct LibraryHandler<'a, 'b> { key: Key, diff --git a/src/handlers/sonarr_handlers/library/series_details_handler.rs b/src/handlers/sonarr_handlers/library/series_details_handler.rs index f5132ba8..47faeafe 100644 --- a/src/handlers/sonarr_handlers/library/series_details_handler.rs +++ b/src/handlers/sonarr_handlers/library/series_details_handler.rs @@ -1,14 +1,16 @@ +use super::series_overview_handler::SeriesOverviewHandler; use crate::app::App; use crate::event::Key; use crate::handlers::sonarr_handlers::history::history_sorting_options; use crate::handlers::table_handler::{TableHandlingConfig, handle_table}; use crate::handlers::{KeyEventHandler, handle_prompt_toggle}; use crate::matches_key; +use crate::models::servarr_data::sonarr::modals::SeriesOverviewModal; use crate::models::servarr_data::sonarr::sonarr_data::{ ActiveSonarrBlock, EDIT_SERIES_SELECTION_BLOCKS, SERIES_DETAILS_BLOCKS, }; use crate::models::sonarr_models::{Season, SonarrHistoryItem}; -use crate::models::{BlockSelectionState, Route}; +use crate::models::{BlockSelectionState, Route, ScrollableText}; use crate::network::sonarr_network::SonarrEvent; #[cfg(test)] @@ -39,10 +41,36 @@ impl SeriesDetailsHandler<'_, '_> { fn extract_series_id(&self) -> i64 { self.app.data.sonarr_data.series.current_selection().id } + + fn build_series_overview_modal(&mut self) { + let overview = self + .app + .data + .sonarr_data + .series + .current_selection() + .overview + .clone() + .unwrap_or_default(); + + self.app.data.sonarr_data.series_overview_modal = Some(SeriesOverviewModal { + overview: ScrollableText::with_string(overview), + }); + } } impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveSonarrBlock> for SeriesDetailsHandler<'a, 'b> { fn handle(&mut self) { + if SeriesOverviewHandler::accepts(self.active_sonarr_block) { + return SeriesOverviewHandler::new( + self.key, + self.app, + self.active_sonarr_block, + self._context, + ) + .handle(); + } + let season_table_handling_config = TableHandlingConfig::new(ActiveSonarrBlock::SeriesDetails.into()) .searching_block(ActiveSonarrBlock::SearchSeason.into()) @@ -85,7 +113,7 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveSonarrBlock> for SeriesDetailsHandler } fn accepts(active_block: ActiveSonarrBlock) -> bool { - SERIES_DETAILS_BLOCKS.contains(&active_block) + SeriesOverviewHandler::accepts(active_block) || SERIES_DETAILS_BLOCKS.contains(&active_block) } fn ignore_special_keys(&self) -> bool { @@ -276,6 +304,12 @@ impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveSonarrBlock> for SeriesDetailsHandler self.app.data.sonarr_data.selected_block = BlockSelectionState::new(EDIT_SERIES_SELECTION_BLOCKS); } + _ if matches_key!(view, key) => { + self.build_series_overview_modal(); + self + .app + .push_navigation_stack(ActiveSonarrBlock::SeriesOverview.into()); + } _ if matches_key!(toggle_monitoring, key) => { self.app.data.sonarr_data.prompt_confirm = true; let (series_id, season_number) = self.extract_series_id_season_number_tuple(); diff --git a/src/handlers/sonarr_handlers/library/series_details_handler_tests.rs b/src/handlers/sonarr_handlers/library/series_details_handler_tests.rs index 152966a4..33d9c6f1 100644 --- a/src/handlers/sonarr_handlers/library/series_details_handler_tests.rs +++ b/src/handlers/sonarr_handlers/library/series_details_handler_tests.rs @@ -9,11 +9,12 @@ mod tests { use crate::handlers::sonarr_handlers::library::series_details_handler::SeriesDetailsHandler; use crate::handlers::sonarr_handlers::sonarr_handler_test_utils::utils::{season, series}; use crate::models::servarr_data::sonarr::sonarr_data::{ - ActiveSonarrBlock, SERIES_DETAILS_BLOCKS, + ActiveSonarrBlock, SERIES_DETAILS_BLOCKS, SERIES_OVERVIEW_BLOCKS, }; use crate::models::sonarr_models::Season; use crate::models::sonarr_models::SonarrHistoryItem; use crate::models::stateful_table::StatefulTable; + use crate::test_handler_delegation; use pretty_assertions::assert_eq; use rstest::rstest; use strum::IntoEnumIterator; @@ -313,11 +314,12 @@ mod tests { mod test_handle_key_char { use super::*; + use crate::handlers::sonarr_handlers::library::series_overview_handler::SeriesOverviewHandler; use crate::models::servarr_data::sonarr::sonarr_data::SonarrData; use crate::models::servarr_data::sonarr::sonarr_data::sonarr_test_utils::utils::create_test_sonarr_data; use crate::models::sonarr_models::{Series, SeriesType}; use crate::network::sonarr_network::SonarrEvent; - use crate::{assert_navigation_popped, test_edit_series_key}; + use crate::{assert_modal_present, assert_navigation_popped, test_edit_series_key}; use pretty_assertions::{assert_eq, assert_str_eq}; use serde_json::Number; use strum::IntoEnumIterator; @@ -355,6 +357,161 @@ mod tests { assert_modal_absent!(app.data.sonarr_data.edit_series_modal); } + #[test] + fn test_series_details_view_key_opens_the_series_overview() { + let mut app = App::test_default_fully_populated(); + app.data.sonarr_data.series_overview_modal = None; + app.push_navigation_stack(ActiveSonarrBlock::SeriesDetails.into()); + + SeriesDetailsHandler::new( + DEFAULT_KEYBINDINGS.view.key, + &mut app, + ActiveSonarrBlock::SeriesDetails, + None, + ) + .handle(); + + assert_navigation_pushed!(app, ActiveSonarrBlock::SeriesOverview.into()); + assert_modal_present!(app.data.sonarr_data.series_overview_modal); + } + + #[test] + fn test_series_details_view_key_builds_the_overview_from_the_selected_series() { + let mut app = App::test_default_fully_populated(); + app.data.sonarr_data.series_overview_modal = None; + app.push_navigation_stack(ActiveSonarrBlock::SeriesDetails.into()); + + SeriesDetailsHandler::new( + DEFAULT_KEYBINDINGS.view.key, + &mut app, + ActiveSonarrBlock::SeriesDetails, + None, + ) + .handle(); + + let overview = &app + .data + .sonarr_data + .series_overview_modal + .as_ref() + .unwrap() + .overview; + assert_eq!(overview.offset, 0); + assert_eq!( + overview.get_text(), + app + .data + .sonarr_data + .series + .current_selection() + .overview + .clone() + .unwrap() + ); + } + + #[test] + fn test_series_details_view_key_for_a_series_with_no_overview() { + let mut app = App::test_default_fully_populated(); + app.data.sonarr_data.series_overview_modal = None; + let mut series = app.data.sonarr_data.series.current_selection().clone(); + series.overview = None; + app.data.sonarr_data.series.set_items(vec![series]); + app.push_navigation_stack(ActiveSonarrBlock::SeriesDetails.into()); + + SeriesDetailsHandler::new( + DEFAULT_KEYBINDINGS.view.key, + &mut app, + ActiveSonarrBlock::SeriesDetails, + None, + ) + .handle(); + + assert_navigation_pushed!(app, ActiveSonarrBlock::SeriesOverview.into()); + assert_str_eq!( + app + .data + .sonarr_data + .series_overview_modal + .as_ref() + .unwrap() + .overview + .get_text(), + "" + ); + } + + #[test] + fn test_series_details_view_key_reopens_the_series_overview_at_the_top() { + let mut app = App::test_default_fully_populated(); + app.data.sonarr_data.series_overview_modal = None; + app.push_navigation_stack(ActiveSonarrBlock::SeriesDetails.into()); + SeriesDetailsHandler::new( + DEFAULT_KEYBINDINGS.view.key, + &mut app, + ActiveSonarrBlock::SeriesDetails, + None, + ) + .handle(); + SeriesOverviewHandler::new( + DEFAULT_KEYBINDINGS.end.key, + &mut app, + ActiveSonarrBlock::SeriesOverview, + None, + ) + .handle(); + SeriesOverviewHandler::new( + DEFAULT_KEYBINDINGS.esc.key, + &mut app, + ActiveSonarrBlock::SeriesOverview, + None, + ) + .handle(); + + SeriesDetailsHandler::new( + DEFAULT_KEYBINDINGS.view.key, + &mut app, + ActiveSonarrBlock::SeriesDetails, + None, + ) + .handle(); + + assert_navigation_pushed!(app, ActiveSonarrBlock::SeriesOverview.into()); + assert_eq!( + app + .data + .sonarr_data + .series_overview_modal + .as_ref() + .unwrap() + .overview + .offset, + 0 + ); + } + + #[test] + fn test_series_details_view_key_no_op_when_not_ready() { + let mut app = App::test_default_fully_populated(); + app.data.sonarr_data.series_overview_modal = None; + app.is_loading = true; + app.push_navigation_stack(ActiveSonarrBlock::SeriesDetails.into()); + + SeriesDetailsHandler::new( + DEFAULT_KEYBINDINGS.view.key, + &mut app, + ActiveSonarrBlock::SeriesDetails, + None, + ) + .handle(); + + assert_eq!( + app.get_current_route(), + ActiveSonarrBlock::SeriesDetails.into() + ); + assert_modal_absent!(app.data.sonarr_data.series_overview_modal); + } + #[test] fn test_toggle_monitoring_key() { let mut app = App::test_default(); @@ -578,8 +735,11 @@ mod tests { #[test] fn test_series_details_handler_accepts() { + let mut series_details_blocks = SERIES_DETAILS_BLOCKS.to_vec(); + series_details_blocks.extend(SERIES_OVERVIEW_BLOCKS); + ActiveSonarrBlock::iter().for_each(|active_sonarr_block| { - if SERIES_DETAILS_BLOCKS.contains(&active_sonarr_block) { + if series_details_blocks.contains(&active_sonarr_block) { assert!(SeriesDetailsHandler::accepts(active_sonarr_block)); } else { assert!(!SeriesDetailsHandler::accepts(active_sonarr_block)); @@ -587,6 +747,15 @@ mod tests { }); } + #[test] + fn test_delegates_series_overview_blocks_to_series_overview_handler() { + test_handler_delegation!( + SeriesDetailsHandler, + ActiveSonarrBlock::SeriesDetails, + ActiveSonarrBlock::SeriesOverview + ); + } + #[rstest] fn test_series_details_handler_ignore_special_keys( #[values(true, false)] ignore_special_keys_for_textbox_input: bool, diff --git a/src/handlers/sonarr_handlers/library/series_overview_handler.rs b/src/handlers/sonarr_handlers/library/series_overview_handler.rs new file mode 100644 index 00000000..b7819990 --- /dev/null +++ b/src/handlers/sonarr_handlers/library/series_overview_handler.rs @@ -0,0 +1,109 @@ +use crate::app::App; +use crate::event::Key; +use crate::handlers::KeyEventHandler; +use crate::matches_key; +use crate::models::servarr_data::sonarr::sonarr_data::{ActiveSonarrBlock, SERIES_OVERVIEW_BLOCKS}; +use crate::models::{Route, Scrollable, ScrollableText}; + +#[cfg(test)] +#[path = "series_overview_handler_tests.rs"] +mod series_overview_handler_tests; + +pub(super) struct SeriesOverviewHandler<'a, 'b> { + key: Key, + app: &'a mut App<'b>, + active_sonarr_block: ActiveSonarrBlock, + _context: Option, +} + +impl SeriesOverviewHandler<'_, '_> { + fn overview(&mut self) -> &mut ScrollableText { + &mut self + .app + .data + .sonarr_data + .series_overview_modal + .as_mut() + .expect("Series overview modal is undefined") + .overview + } +} + +impl<'a, 'b> KeyEventHandler<'a, 'b, ActiveSonarrBlock> for SeriesOverviewHandler<'a, 'b> { + fn accepts(active_block: ActiveSonarrBlock) -> bool { + SERIES_OVERVIEW_BLOCKS.contains(&active_block) + } + + fn ignore_special_keys(&self) -> bool { + self.app.ignore_special_keys_for_textbox_input + } + + fn new( + key: Key, + app: &'a mut App<'b>, + active_block: ActiveSonarrBlock, + _context: Option, + ) -> SeriesOverviewHandler<'a, 'b> { + SeriesOverviewHandler { + key, + app, + active_sonarr_block: active_block, + _context, + } + } + + fn get_key(&self) -> Key { + self.key + } + + fn is_ready(&self) -> bool { + if self.app.is_loading { + return false; + } + + self.app.data.sonarr_data.series_overview_modal.is_some() + } + + fn handle_scroll_up(&mut self) { + self.overview().scroll_up(); + } + + fn handle_scroll_down(&mut self) { + self.overview().scroll_down(); + } + + fn handle_home(&mut self) { + self.overview().scroll_to_top(); + } + + fn handle_end(&mut self) { + self.overview().scroll_to_bottom(); + } + + fn handle_delete(&mut self) {} + + fn handle_left_right_action(&mut self) {} + + fn handle_submit(&mut self) {} + + fn handle_esc(&mut self) { + self.app.pop_navigation_stack(); + self.app.data.sonarr_data.series_overview_modal = None; + } + + fn handle_char_key_event(&mut self) { + if matches_key!(refresh, self.key) { + self + .app + .pop_and_push_navigation_stack(self.active_sonarr_block.into()); + } + } + + fn app_mut(&mut self) -> &mut App<'b> { + self.app + } + + fn current_route(&self) -> Route { + self.app.get_current_route() + } +} diff --git a/src/handlers/sonarr_handlers/library/series_overview_handler_tests.rs b/src/handlers/sonarr_handlers/library/series_overview_handler_tests.rs new file mode 100644 index 00000000..97df075e --- /dev/null +++ b/src/handlers/sonarr_handlers/library/series_overview_handler_tests.rs @@ -0,0 +1,393 @@ +#[cfg(test)] +mod tests { + use strum::IntoEnumIterator; + + use crate::app::App; + use crate::app::key_binding::DEFAULT_KEYBINDINGS; + use crate::handlers::KeyEventHandler; + use crate::handlers::sonarr_handlers::library::series_overview_handler::SeriesOverviewHandler; + use crate::models::ScrollableText; + use crate::models::servarr_data::sonarr::modals::SeriesOverviewModal; + use crate::models::servarr_data::sonarr::sonarr_data::{ + ActiveSonarrBlock, SERIES_OVERVIEW_BLOCKS, + }; + + mod test_handle_scroll_up_and_down { + use super::*; + use pretty_assertions::assert_eq; + + #[test] + fn test_series_overview_scroll_up() { + let mut app = app_with_series_overview(); + set_offset(&mut app, 2); + + SeriesOverviewHandler::new( + DEFAULT_KEYBINDINGS.up.key, + &mut app, + ActiveSonarrBlock::SeriesOverview, + None, + ) + .handle(); + + assert_eq!(overview_offset(&app), 1); + } + + #[test] + fn test_series_overview_scroll_up_no_op_when_not_ready() { + let mut app = app_with_series_overview(); + set_offset(&mut app, 2); + app.is_loading = true; + + SeriesOverviewHandler::new( + DEFAULT_KEYBINDINGS.up.key, + &mut app, + ActiveSonarrBlock::SeriesOverview, + None, + ) + .handle(); + + assert_eq!(overview_offset(&app), 2); + } + + #[test] + fn test_series_overview_scroll_down() { + let mut app = app_with_series_overview(); + + SeriesOverviewHandler::new( + DEFAULT_KEYBINDINGS.down.key, + &mut app, + ActiveSonarrBlock::SeriesOverview, + None, + ) + .handle(); + + assert_eq!(overview_offset(&app), 1); + } + + #[test] + fn test_series_overview_scroll_down_no_op_when_not_ready() { + let mut app = app_with_series_overview(); + app.is_loading = true; + + SeriesOverviewHandler::new( + DEFAULT_KEYBINDINGS.down.key, + &mut app, + ActiveSonarrBlock::SeriesOverview, + None, + ) + .handle(); + + assert_eq!(overview_offset(&app), 0); + } + } + + mod test_handle_home_end { + use super::*; + use pretty_assertions::assert_eq; + + #[test] + fn test_series_overview_home() { + let mut app = app_with_series_overview(); + set_offset(&mut app, 3); + + SeriesOverviewHandler::new( + DEFAULT_KEYBINDINGS.home.key, + &mut app, + ActiveSonarrBlock::SeriesOverview, + None, + ) + .handle(); + + assert_eq!(overview_offset(&app), 0); + } + + #[test] + fn test_series_overview_end() { + let mut app = app_with_series_overview(); + + SeriesOverviewHandler::new( + DEFAULT_KEYBINDINGS.end.key, + &mut app, + ActiveSonarrBlock::SeriesOverview, + None, + ) + .handle(); + + assert_eq!(overview_offset(&app), 5); + } + + #[test] + fn test_series_overview_home_no_op_when_not_ready() { + let mut app = app_with_series_overview(); + set_offset(&mut app, 3); + app.is_loading = true; + + SeriesOverviewHandler::new( + DEFAULT_KEYBINDINGS.home.key, + &mut app, + ActiveSonarrBlock::SeriesOverview, + None, + ) + .handle(); + + assert_eq!(overview_offset(&app), 3); + } + + #[test] + fn test_series_overview_end_no_op_when_not_ready() { + let mut app = app_with_series_overview(); + app.is_loading = true; + + SeriesOverviewHandler::new( + DEFAULT_KEYBINDINGS.end.key, + &mut app, + ActiveSonarrBlock::SeriesOverview, + None, + ) + .handle(); + + assert_eq!(overview_offset(&app), 0); + } + } + + mod test_handle_esc { + use super::*; + use crate::{assert_modal_absent, assert_navigation_popped}; + + #[test] + fn test_series_overview_esc_tears_down_the_series_overview_modal() { + let mut app = app_with_series_overview(); + + SeriesOverviewHandler::new( + DEFAULT_KEYBINDINGS.esc.key, + &mut app, + ActiveSonarrBlock::SeriesOverview, + None, + ) + .handle(); + + assert_navigation_popped!(app, ActiveSonarrBlock::SeriesDetails.into()); + assert_modal_absent!(app.data.sonarr_data.series_overview_modal); + } + + #[test] + fn test_series_overview_esc_tears_down_the_modal_even_when_loading() { + let mut app = app_with_series_overview(); + app.is_loading = true; + + SeriesOverviewHandler::new( + DEFAULT_KEYBINDINGS.esc.key, + &mut app, + ActiveSonarrBlock::SeriesOverview, + None, + ) + .handle(); + + assert_navigation_popped!(app, ActiveSonarrBlock::SeriesDetails.into()); + assert_modal_absent!(app.data.sonarr_data.series_overview_modal); + } + } + + mod test_handle_key_char { + use super::*; + use crate::assert_navigation_pushed; + + #[test] + fn test_series_overview_refresh_key() { + let mut app = app_with_series_overview(); + app.is_routing = false; + + SeriesOverviewHandler::new( + DEFAULT_KEYBINDINGS.refresh.key, + &mut app, + ActiveSonarrBlock::SeriesOverview, + None, + ) + .handle(); + + assert_navigation_pushed!(app, ActiveSonarrBlock::SeriesOverview.into()); + assert!(app.is_routing); + } + + #[test] + fn test_series_overview_refresh_key_no_op_when_not_ready() { + let mut app = app_with_series_overview(); + app.is_loading = true; + app.is_routing = false; + + SeriesOverviewHandler::new( + DEFAULT_KEYBINDINGS.refresh.key, + &mut app, + ActiveSonarrBlock::SeriesOverview, + None, + ) + .handle(); + + assert!(!app.is_routing); + } + } + + #[test] + fn test_scrolling_the_overview_does_not_mutate_the_series_record() { + let mut app = app_with_series_overview(); + let overview_before = app + .data + .sonarr_data + .series + .current_selection() + .overview + .clone(); + + SeriesOverviewHandler::new( + DEFAULT_KEYBINDINGS.down.key, + &mut app, + ActiveSonarrBlock::SeriesOverview, + None, + ) + .handle(); + + assert_eq!(overview_offset(&app), 1); + assert_eq!( + app.data.sonarr_data.series.current_selection().overview, + overview_before + ); + } + + #[test] + fn test_series_overview_handler_accepts() { + ActiveSonarrBlock::iter().for_each(|active_sonarr_block| { + if SERIES_OVERVIEW_BLOCKS.contains(&active_sonarr_block) { + assert!( + SeriesOverviewHandler::accepts(active_sonarr_block), + "{active_sonarr_block} is not accepted by the SeriesOverviewHandler" + ); + } else { + assert!( + !SeriesOverviewHandler::accepts(active_sonarr_block), + "{active_sonarr_block} is wrongly accepted by the SeriesOverviewHandler" + ); + } + }); + } + + #[test] + fn test_series_overview_handler_dispatches_no_network_events() { + let mut app = app_with_series_overview(); + + for key in [ + DEFAULT_KEYBINDINGS.up.key, + DEFAULT_KEYBINDINGS.down.key, + DEFAULT_KEYBINDINGS.home.key, + DEFAULT_KEYBINDINGS.end.key, + DEFAULT_KEYBINDINGS.delete.key, + DEFAULT_KEYBINDINGS.left.key, + DEFAULT_KEYBINDINGS.right.key, + DEFAULT_KEYBINDINGS.submit.key, + DEFAULT_KEYBINDINGS.refresh.key, + ] { + SeriesOverviewHandler::new(key, &mut app, ActiveSonarrBlock::SeriesOverview, None).handle(); + + assert_none!(app.data.sonarr_data.prompt_confirm_action); + assert!(!app.data.sonarr_data.prompt_confirm); + } + } + + #[test] + fn test_series_overview_handler_is_not_ready_when_loading() { + let mut app = app_with_series_overview(); + app.is_loading = true; + + let handler = SeriesOverviewHandler::new( + DEFAULT_KEYBINDINGS.up.key, + &mut app, + ActiveSonarrBlock::SeriesOverview, + None, + ); + + assert!(!handler.is_ready()); + } + + #[test] + fn test_series_overview_handler_is_not_ready_when_the_modal_is_absent() { + let mut app = app_with_series_overview(); + app.data.sonarr_data.series_overview_modal = None; + + let handler = SeriesOverviewHandler::new( + DEFAULT_KEYBINDINGS.up.key, + &mut app, + ActiveSonarrBlock::SeriesOverview, + None, + ); + + assert!(!handler.is_ready()); + } + + #[test] + fn test_series_overview_handler_is_ready() { + let mut app = app_with_series_overview(); + + let handler = SeriesOverviewHandler::new( + DEFAULT_KEYBINDINGS.up.key, + &mut app, + ActiveSonarrBlock::SeriesOverview, + None, + ); + + assert!(handler.is_ready()); + } + + #[test] + fn test_series_overview_handler_ignores_special_keys_for_textbox_input() { + let mut app = app_with_series_overview(); + app.ignore_special_keys_for_textbox_input = true; + + let handler = SeriesOverviewHandler::new( + DEFAULT_KEYBINDINGS.up.key, + &mut app, + ActiveSonarrBlock::SeriesOverview, + None, + ); + + assert!(handler.ignore_special_keys()); + } + + fn app_with_series_overview() -> App<'static> { + let mut app = App::test_default_fully_populated(); + app.data.sonarr_data.series_overview_modal = Some(SeriesOverviewModal { + overview: ScrollableText::with_string( + "Blah blah blah\r\n\ + \r\n\ + It was filmed in Madison, Wisconsin: a city the crew never really left.\r\n\ + \r\n\ + The first season took seven years to finish.\r\n" + .to_owned(), + ), + }); + app.push_navigation_stack(ActiveSonarrBlock::SeriesDetails.into()); + app.push_navigation_stack(ActiveSonarrBlock::SeriesOverview.into()); + + app + } + + fn overview_offset(app: &App<'_>) -> u16 { + app + .data + .sonarr_data + .series_overview_modal + .as_ref() + .unwrap() + .overview + .offset + } + + fn set_offset(app: &mut App<'_>, offset: u16) { + app + .data + .sonarr_data + .series_overview_modal + .as_mut() + .unwrap() + .overview + .offset = offset; + } +} diff --git a/src/handlers/sonarr_handlers/sonarr_handler_test_utils.rs b/src/handlers/sonarr_handlers/sonarr_handler_test_utils.rs index 39e54352..fca77ae4 100644 --- a/src/handlers/sonarr_handlers/sonarr_handler_test_utils.rs +++ b/src/handlers/sonarr_handlers/sonarr_handler_test_utils.rs @@ -351,7 +351,14 @@ pub(in crate::handlers::sonarr_handlers) mod utils { title: "Test".to_owned().into(), status: SeriesStatus::Continuing, ended: false, - overview: Some("Blah blah blah".to_owned()), + overview: Some( + "Blah blah blah\r\n\ + \r\n\ + It was filmed in Madison, Wisconsin: a city the crew never really left.\r\n\ + \r\n\ + The first season took seven years to finish.\r\n" + .to_owned(), + ), network: Some("HBO".to_owned()), seasons: Some(vec![season()]), year: 2022, diff --git a/src/models/servarr_data/sonarr/modals.rs b/src/models/servarr_data/sonarr/modals.rs index d1d12d8c..867aa516 100644 --- a/src/models/servarr_data/sonarr/modals.rs +++ b/src/models/servarr_data/sonarr/modals.rs @@ -303,3 +303,9 @@ impl Default for SeasonDetailsModal { } } } + +#[derive(Default)] +#[cfg_attr(test, derive(Debug))] +pub struct SeriesOverviewModal { + pub overview: ScrollableText, +} diff --git a/src/models/servarr_data/sonarr/modals_tests.rs b/src/models/servarr_data/sonarr/modals_tests.rs index 0a867c84..b8a9616a 100644 --- a/src/models/servarr_data/sonarr/modals_tests.rs +++ b/src/models/servarr_data/sonarr/modals_tests.rs @@ -11,7 +11,7 @@ mod tests { SELECTABLE_EPISODE_DETAILS_CONTEXT_CLUES, }; use crate::models::servarr_data::sonarr::modals::{ - EditSeriesModal, EpisodeDetailsModal, SeasonDetailsModal, + EditSeriesModal, EpisodeDetailsModal, SeasonDetailsModal, SeriesOverviewModal, }; use crate::models::servarr_data::sonarr::sonarr_data::ActiveSonarrBlock; use crate::models::servarr_models::{Indexer, IndexerField}; @@ -428,4 +428,11 @@ mod tests { None ); } + + #[test] + fn test_series_overview_modal_default() { + let series_overview_modal = SeriesOverviewModal::default(); + + assert_is_empty!(series_overview_modal.overview); + } } diff --git a/src/models/servarr_data/sonarr/sonarr_data.rs b/src/models/servarr_data/sonarr/sonarr_data.rs index c4702807..cc20151b 100644 --- a/src/models/servarr_data/sonarr/sonarr_data.rs +++ b/src/models/servarr_data/sonarr/sonarr_data.rs @@ -1,4 +1,4 @@ -use super::modals::{AddSeriesModal, EditSeriesModal, SeasonDetailsModal}; +use super::modals::{AddSeriesModal, EditSeriesModal, SeasonDetailsModal, SeriesOverviewModal}; use crate::{ app::{ context_clues::{ @@ -89,6 +89,7 @@ pub struct SonarrData<'a> { pub series: StatefulTable, pub series_history: Option>, pub series_info_tabs: TabState, + pub series_overview_modal: Option, pub start_time: DateTime, pub tags_map: BiMap, pub tasks: StatefulTable, @@ -172,6 +173,7 @@ impl<'a> Default for SonarrData<'a> { selected_block: BlockSelectionState::default(), series: StatefulTable::default(), series_history: None, + series_overview_modal: None, start_time: DateTime::default(), tags_map: BiMap::default(), tasks: StatefulTable::default(), @@ -347,6 +349,10 @@ impl SonarrData<'_> { series_history.search = Some("series history search".into()); series_history.filter = Some("series history filter".into()); + let series_overview_modal = SeriesOverviewModal { + overview: ScrollableText::with_string(series().overview.clone().unwrap_or_default()), + }; + let mut sonarr_data = SonarrData { add_list_exclusion: true, add_searched_series: Some(add_searched_series), @@ -364,6 +370,7 @@ impl SonarrData<'_> { quality_profile_map: quality_profile_map(), season_details_modal: Some(season_details_modal), series_history: Some(series_history), + series_overview_modal: Some(series_overview_modal), start_time: DateTime::from(DateTime::parse_from_rfc3339("2023-05-20T21:29:16Z").unwrap()), tags_map: tags_map(), updates: updates(), @@ -503,6 +510,7 @@ pub enum ActiveSonarrBlock { SeriesHistory, SeriesHistoryDetails, SeriesHistorySortPrompt, + SeriesOverview, SeriesSortPrompt, System, SystemLogs, @@ -542,6 +550,8 @@ pub static SERIES_DETAILS_BLOCKS: [ActiveSonarrBlock; 12] = [ ActiveSonarrBlock::SeriesHistoryDetails, ]; +pub static SERIES_OVERVIEW_BLOCKS: [ActiveSonarrBlock; 1] = [ActiveSonarrBlock::SeriesOverview]; + pub static SEASON_DETAILS_BLOCKS: [ActiveSonarrBlock; 15] = [ ActiveSonarrBlock::SeasonDetails, ActiveSonarrBlock::SeasonHistory, diff --git a/src/models/servarr_data/sonarr/sonarr_data_tests.rs b/src/models/servarr_data/sonarr/sonarr_data_tests.rs index 25c5756b..4cba45d6 100644 --- a/src/models/servarr_data/sonarr/sonarr_data_tests.rs +++ b/src/models/servarr_data/sonarr/sonarr_data_tests.rs @@ -171,6 +171,7 @@ mod tests { assert_eq!(sonarr_data.selected_block, BlockSelectionState::default()); assert_is_empty!(sonarr_data.series); assert_none!(sonarr_data.series_history); + assert_none!(sonarr_data.series_overview_modal); assert_eq!(sonarr_data.start_time, >::default()); assert_is_empty!(sonarr_data.tags_map); assert_is_empty!(sonarr_data.tasks); @@ -289,7 +290,8 @@ mod tests { EDIT_INDEXER_NZB_SELECTION_BLOCKS, EDIT_INDEXER_TORRENT_SELECTION_BLOCKS, EDIT_SERIES_BLOCKS, EDIT_SERIES_SELECTION_BLOCKS, EPISODE_DETAILS_BLOCKS, HISTORY_BLOCKS, INDEXER_SETTINGS_BLOCKS, INDEXER_SETTINGS_SELECTION_BLOCKS, INDEXERS_BLOCKS, LIBRARY_BLOCKS, - ROOT_FOLDERS_BLOCKS, SEASON_DETAILS_BLOCKS, SERIES_DETAILS_BLOCKS, SYSTEM_DETAILS_BLOCKS, + ROOT_FOLDERS_BLOCKS, SEASON_DETAILS_BLOCKS, SERIES_DETAILS_BLOCKS, SERIES_OVERVIEW_BLOCKS, + SYSTEM_DETAILS_BLOCKS, }; #[test] @@ -671,6 +673,17 @@ mod tests { assert!(SERIES_DETAILS_BLOCKS.contains(&ActiveSonarrBlock::SeriesHistoryDetails)); } + #[test] + fn test_series_details_blocks_excludes_series_overview() { + assert!(!SERIES_DETAILS_BLOCKS.contains(&ActiveSonarrBlock::SeriesOverview)); + } + + #[test] + fn test_series_overview_blocks_contents() { + assert_eq!(SERIES_OVERVIEW_BLOCKS.len(), 1); + assert!(SERIES_OVERVIEW_BLOCKS.contains(&ActiveSonarrBlock::SeriesOverview)); + } + #[test] fn test_season_details_blocks_contents() { assert_eq!(SEASON_DETAILS_BLOCKS.len(), 15); diff --git a/src/network/sonarr_network/sonarr_network_test_utils.rs b/src/network/sonarr_network/sonarr_network_test_utils.rs index 0a9fab3d..ac60fa57 100644 --- a/src/network/sonarr_network/sonarr_network_test_utils.rs +++ b/src/network/sonarr_network/sonarr_network_test_utils.rs @@ -19,7 +19,7 @@ pub mod test_utils { "title": "Test", "status": "continuing", "ended": false, - "overview": "Blah blah blah", + "overview": "Blah blah blah\r\n\r\nIt was filmed in Madison, Wisconsin: a city the crew never really left.\r\n\r\nThe first season took seven years to finish.\r\n", "network": "HBO", "seasons": [ { @@ -319,7 +319,14 @@ pub mod test_utils { title: "Test".to_owned().into(), status: SeriesStatus::Continuing, ended: false, - overview: Some("Blah blah blah".to_owned()), + overview: Some( + "Blah blah blah\r\n\ + \r\n\ + It was filmed in Madison, Wisconsin: a city the crew never really left.\r\n\ + \r\n\ + The first season took seven years to finish.\r\n" + .to_owned(), + ), network: Some("HBO".to_owned()), seasons: Some(vec![season()]), year: 2022, diff --git a/src/ui/sonarr_ui/library/library_ui_tests.rs b/src/ui/sonarr_ui/library/library_ui_tests.rs index 0f73c611..edddd0b1 100644 --- a/src/ui/sonarr_ui/library/library_ui_tests.rs +++ b/src/ui/sonarr_ui/library/library_ui_tests.rs @@ -2,7 +2,7 @@ mod tests { use crate::models::servarr_data::sonarr::sonarr_data::{ ADD_SERIES_BLOCKS, ActiveSonarrBlock, DELETE_SERIES_BLOCKS, EDIT_SERIES_BLOCKS, - EPISODE_DETAILS_BLOCKS, SEASON_DETAILS_BLOCKS, SERIES_DETAILS_BLOCKS, + EPISODE_DETAILS_BLOCKS, SEASON_DETAILS_BLOCKS, SERIES_DETAILS_BLOCKS, SERIES_OVERVIEW_BLOCKS, }; use crate::models::{ servarr_data::sonarr::sonarr_data::LIBRARY_BLOCKS, sonarr_models::SeriesStatus, @@ -27,6 +27,7 @@ mod tests { library_ui_blocks.extend(DELETE_SERIES_BLOCKS); library_ui_blocks.extend(EDIT_SERIES_BLOCKS); library_ui_blocks.extend(SERIES_DETAILS_BLOCKS); + library_ui_blocks.extend(SERIES_OVERVIEW_BLOCKS); library_ui_blocks.extend(SEASON_DETAILS_BLOCKS); library_ui_blocks.extend(EPISODE_DETAILS_BLOCKS); diff --git a/src/ui/sonarr_ui/library/mod.rs b/src/ui/sonarr_ui/library/mod.rs index 2cef8648..eb179001 100644 --- a/src/ui/sonarr_ui/library/mod.rs +++ b/src/ui/sonarr_ui/library/mod.rs @@ -38,6 +38,7 @@ mod episode_details_ui; #[path = "library_ui_tests.rs"] mod library_ui_tests; mod season_details_ui; +mod series_overview_ui; pub(super) struct LibraryUi; diff --git a/src/ui/sonarr_ui/library/series_details_ui.rs b/src/ui/sonarr_ui/library/series_details_ui.rs index 3958763c..7d4ec9d3 100644 --- a/src/ui/sonarr_ui/library/series_details_ui.rs +++ b/src/ui/sonarr_ui/library/series_details_ui.rs @@ -14,6 +14,7 @@ use crate::models::servarr_data::sonarr::sonarr_data::{ActiveSonarrBlock, SERIES use crate::models::sonarr_models::{Season, SeasonStatistics, SonarrHistoryItem}; use crate::ui::sonarr_ui::library::episode_details_ui::EpisodeDetailsUi; use crate::ui::sonarr_ui::library::season_details_ui::SeasonDetailsUi; +use crate::ui::sonarr_ui::library::series_overview_ui::SeriesOverviewUi; use crate::ui::sonarr_ui::sonarr_ui_utils::create_history_event_details; use crate::ui::styles::ManagarrStyle; use crate::ui::utils::{ @@ -40,6 +41,7 @@ impl DrawUi for SeriesDetailsUi { }; SeasonDetailsUi::accepts(route) || EpisodeDetailsUi::accepts(route) + || SeriesOverviewUi::accepts(route) || SERIES_DETAILS_BLOCKS.contains(&active_sonarr_block) } @@ -107,6 +109,10 @@ impl DrawUi for SeriesDetailsUi { if SeasonDetailsUi::accepts(route) { SeasonDetailsUi::draw(f, app, area); } + + if SeriesOverviewUi::accepts(route) { + SeriesOverviewUi::draw(f, app, area); + } } } } diff --git a/src/ui/sonarr_ui/library/series_details_ui_tests.rs b/src/ui/sonarr_ui/library/series_details_ui_tests.rs index 85ab39cf..88bcc299 100644 --- a/src/ui/sonarr_ui/library/series_details_ui_tests.rs +++ b/src/ui/sonarr_ui/library/series_details_ui_tests.rs @@ -5,6 +5,7 @@ mod tests { use crate::app::App; use crate::models::servarr_data::sonarr::sonarr_data::{ ActiveSonarrBlock, EPISODE_DETAILS_BLOCKS, SEASON_DETAILS_BLOCKS, SERIES_DETAILS_BLOCKS, + SERIES_OVERVIEW_BLOCKS, }; use crate::ui::DrawUi; use crate::ui::sonarr_ui::library::series_details_ui::SeriesDetailsUi; @@ -15,6 +16,7 @@ mod tests { let mut blocks = SERIES_DETAILS_BLOCKS.clone().to_vec(); blocks.extend(SEASON_DETAILS_BLOCKS); blocks.extend(EPISODE_DETAILS_BLOCKS); + blocks.extend(SERIES_OVERVIEW_BLOCKS); ActiveSonarrBlock::iter().for_each(|active_sonarr_block| { if blocks.contains(&active_sonarr_block) { @@ -28,6 +30,7 @@ mod tests { mod snapshot_tests { use crate::models::stateful_table::StatefulTable; use crate::ui::ui_test_utils::test_utils::TerminalSize; + use pretty_assertions::assert_str_eq; use rstest::rstest; use super::*; @@ -134,5 +137,43 @@ mod tests { insta::assert_snapshot!(output); } + + #[test] + fn test_series_details_ui_renders_series_overview_over_series_details() { + let mut app = App::test_default_fully_populated(); + app.push_navigation_stack(ActiveSonarrBlock::SeriesDetails.into()); + app.push_navigation_stack(ActiveSonarrBlock::SeriesOverview.into()); + + let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| { + SeriesDetailsUi::draw(f, app, f.area()); + }); + + insta::assert_snapshot!(output); + } + + #[test] + fn test_scrolling_the_series_overview_does_not_scroll_the_series_details_background() { + let mut app = App::test_default_fully_populated(); + app.push_navigation_stack(ActiveSonarrBlock::SeriesDetails.into()); + let before = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| { + SeriesDetailsUi::draw(f, app, f.area()); + }); + + app + .data + .sonarr_data + .series_overview_modal + .as_mut() + .unwrap() + .overview + .offset = 3; + + let after = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| { + SeriesDetailsUi::draw(f, app, f.area()); + }); + + assert_str_eq!(before, after); + assert_contains!(before, "Overview: Blah blah blah"); + } } } diff --git a/src/ui/sonarr_ui/library/series_overview_ui.rs b/src/ui/sonarr_ui/library/series_overview_ui.rs new file mode 100644 index 00000000..06b095d2 --- /dev/null +++ b/src/ui/sonarr_ui/library/series_overview_ui.rs @@ -0,0 +1,87 @@ +use crate::app::App; +use crate::models::Route; +use crate::models::servarr_data::sonarr::sonarr_data::SERIES_OVERVIEW_BLOCKS; +use crate::models::sonarr_models::Series; +use crate::ui::styles::{primary_style, unmonitored_style}; +use crate::ui::utils::title_block_centered; +use crate::ui::widgets::loading_block::LoadingBlock; +use crate::ui::widgets::popup::Size; +use crate::ui::{DrawUi, draw_popup}; +use ratatui::Frame; +use ratatui::layout::Rect; +use ratatui::style::Style; +use ratatui::text::{Line, Span, Text}; +use ratatui::widgets::{Paragraph, Wrap}; + +#[cfg(test)] +#[path = "series_overview_ui_tests.rs"] +mod series_overview_ui_tests; + +pub(super) struct SeriesOverviewUi; + +impl DrawUi for SeriesOverviewUi { + fn accepts(route: Route) -> bool { + let Route::Sonarr(active_sonarr_block, _) = route else { + return false; + }; + SERIES_OVERVIEW_BLOCKS.contains(&active_sonarr_block) + } + + fn draw(f: &mut Frame<'_>, app: &mut App<'_>, _area: Rect) { + if app.data.sonarr_data.series_overview_modal.is_some() { + let draw_series_overview_popup = |f: &mut Frame<'_>, app: &mut App<'_>, popup_area: Rect| { + draw_series_overview(f, app, popup_area); + }; + + draw_popup(f, app, draw_series_overview_popup, Size::Large); + } + } +} + +fn draw_series_overview(f: &mut Frame<'_>, app: &App<'_>, area: Rect) { + let block = title_block_centered("Overview"); + + match app.data.sonarr_data.series_overview_modal.as_ref() { + Some(series_overview_modal) if !app.is_loading => { + let style = if app.data.sonarr_data.series.is_empty() { + primary_style() + } else { + style_from_series(app.data.sonarr_data.series.current_selection()) + }; + let overview = &series_overview_modal.overview; + let text = Text::from( + overview + .items + .iter() + .map(|line| overview_line(line, style)) + .collect::>>(), + ); + + let paragraph = Paragraph::new(text) + .block(block) + .wrap(Wrap { trim: false }) + .scroll((overview.offset, 0)); + + f.render_widget(paragraph, area); + } + _ => f.render_widget( + LoadingBlock::new( + app.is_loading || app.data.sonarr_data.series_overview_modal.is_none(), + block, + ), + area, + ), + } +} + +fn style_from_series(series: &Series) -> Style { + if !series.monitored { + return unmonitored_style(); + } + + primary_style() +} + +fn overview_line(line: &str, style: Style) -> Line<'static> { + Line::from(Span::styled(line.trim_end().to_owned(), style)) +} diff --git a/src/ui/sonarr_ui/library/series_overview_ui_tests.rs b/src/ui/sonarr_ui/library/series_overview_ui_tests.rs new file mode 100644 index 00000000..27e524cd --- /dev/null +++ b/src/ui/sonarr_ui/library/series_overview_ui_tests.rs @@ -0,0 +1,205 @@ +#[cfg(test)] +mod tests { + use pretty_assertions::assert_eq; + use ratatui::style::Modifier; + use ratatui::text::Line; + use strum::IntoEnumIterator; + + use crate::app::App; + use crate::models::servarr_data::sonarr::sonarr_data::{ + ActiveSonarrBlock, SERIES_OVERVIEW_BLOCKS, + }; + use crate::models::sonarr_models::Series; + use crate::ui::DrawUi; + use crate::ui::sonarr_ui::library::series_overview_ui::{ + SeriesOverviewUi, overview_line, style_from_series, + }; + use crate::ui::styles::{primary_style, unmonitored_style}; + use crate::ui::ui_test_utils::test_utils::render_to_string_with_app; + + #[test] + fn test_series_overview_ui_accepts() { + ActiveSonarrBlock::iter().for_each(|active_sonarr_block| { + if SERIES_OVERVIEW_BLOCKS.contains(&active_sonarr_block) { + assert!(SeriesOverviewUi::accepts(active_sonarr_block.into())); + } else { + assert!(!SeriesOverviewUi::accepts(active_sonarr_block.into())); + } + }); + } + + #[test] + fn test_style_from_series_monitored() { + let series = Series { + monitored: true, + ..Series::default() + }; + + let style = style_from_series(&series); + + assert_eq!(style, primary_style()); + } + + #[test] + fn test_style_from_series_unmonitored() { + let series = Series { + monitored: false, + ..Series::default() + }; + + let style = style_from_series(&series); + + assert_eq!(style, unmonitored_style()); + } + + #[test] + fn test_overview_line_does_not_split_a_label_from_a_colon_in_the_prose() { + let line = overview_line( + "It was filmed in Madison, Wisconsin: a city the crew never really left.", + primary_style(), + ); + + assert_eq!( + span_contents(&line), + vec!["It was filmed in Madison, Wisconsin: a city the crew never really left."] + ); + } + + #[test] + fn test_overview_line_renders_the_prose_without_bolding_it() { + let line = overview_line("Overview: a prose line", primary_style()); + + assert_eq!(line.spans.len(), 1); + assert!(!line.spans[0].style.add_modifier.contains(Modifier::BOLD)); + } + + #[test] + fn test_overview_line_applies_the_given_style() { + let line = overview_line("an unmonitored series", unmonitored_style()); + + assert_eq!(line.spans[0].style.fg, unmonitored_style().fg); + } + + #[test] + fn test_overview_line_trims_a_trailing_carriage_return() { + let line = overview_line( + "The first season took seven years to finish.\r", + primary_style(), + ); + + assert_eq!( + span_contents(&line), + vec!["The first season took seven years to finish."] + ); + } + + #[test] + fn test_overview_line_renders_a_carriage_return_only_line_as_blank() { + let line = overview_line("\r", primary_style()); + + assert_eq!(span_contents(&line), vec![""]); + } + + fn span_contents(line: &Line<'_>) -> Vec { + line + .spans + .iter() + .map(|span| span.content.to_string()) + .collect() + } + + mod snapshot_tests { + use crate::models::ScrollableText; + use crate::models::servarr_data::sonarr::modals::SeriesOverviewModal; + use crate::models::stateful_table::StatefulTable; + use crate::ui::ui_test_utils::test_utils::TerminalSize; + + use super::*; + + #[test] + fn test_series_overview_ui_renders() { + let mut app = App::test_default_fully_populated(); + app.push_navigation_stack(ActiveSonarrBlock::SeriesOverview.into()); + + let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| { + SeriesOverviewUi::draw(f, app, f.area()); + }); + + insta::assert_snapshot!(output); + } + + #[test] + fn test_series_overview_ui_renders_loading() { + let mut app = App::test_default_fully_populated(); + app.is_loading = true; + app.push_navigation_stack(ActiveSonarrBlock::SeriesOverview.into()); + + let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| { + SeriesOverviewUi::draw(f, app, f.area()); + }); + + insta::assert_snapshot!(output); + } + + #[test] + fn test_series_overview_ui_renders_scrolled() { + let mut app = App::test_default_fully_populated(); + app.push_navigation_stack(ActiveSonarrBlock::SeriesOverview.into()); + app + .data + .sonarr_data + .series_overview_modal + .as_mut() + .unwrap() + .overview + .offset = 2; + + let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| { + SeriesOverviewUi::draw(f, app, f.area()); + }); + + insta::assert_snapshot!(output); + } + + #[test] + fn test_series_overview_ui_renders_a_series_with_no_overview() { + let mut app = App::test_default_fully_populated(); + app.push_navigation_stack(ActiveSonarrBlock::SeriesOverview.into()); + app.data.sonarr_data.series_overview_modal = Some(SeriesOverviewModal { + overview: ScrollableText::with_string(String::new()), + }); + + let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| { + SeriesOverviewUi::draw(f, app, f.area()); + }); + + insta::assert_snapshot!(output); + } + + #[test] + fn test_series_overview_ui_renders_nothing_when_the_series_overview_modal_is_undefined() { + let mut app = App::test_default_fully_populated(); + app.push_navigation_stack(ActiveSonarrBlock::SeriesOverview.into()); + app.data.sonarr_data.series_overview_modal = None; + + let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| { + SeriesOverviewUi::draw(f, app, f.area()); + }); + + insta::assert_snapshot!(output); + } + + #[test] + fn test_series_overview_ui_renders_with_zero_series() { + let mut app = App::test_default_fully_populated(); + app.data.sonarr_data.series = StatefulTable::default(); + app.push_navigation_stack(ActiveSonarrBlock::SeriesOverview.into()); + + let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| { + SeriesOverviewUi::draw(f, app, f.area()); + }); + + assert_contains!(output, "Blah blah blah"); + } + } +} diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesConfirmPrompt.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesConfirmPrompt.snap index fd06895e..eaad66e7 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesConfirmPrompt.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesConfirmPrompt.snap @@ -11,9 +11,9 @@ expression: output ╭───────────────────────────────────────────── Edit - Test ─────────────────────────────────────────────╮ │ Blah blah blah │ │ │ + │ It was filmed in Madison, Wisconsin: a city the crew never really left. │ │ │ - │ │ - │ │ + │ The first season took seven years to finish. │ │ │ │ ╭───╮ │ │ Monitored: │ ✔ │ │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesConfirmPrompt_SeriesDetails.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesConfirmPrompt_SeriesDetails.snap index be8a8fe2..f4d7ba67 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesConfirmPrompt_SeriesDetails.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesConfirmPrompt_SeriesDetails.snap @@ -7,13 +7,13 @@ expression: output ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO ╭───────────────────────────────────────────── Edit - Test ─────────────────────────────────────────────╮ │ │Status: Continuing │ Blah blah blah │ │ │Genres: cool, famil│ │ │ - │Rating: 84% │ │ │ + │Rating: 84% │ It was filmed in Madison, Wisconsin: a city the crew never really left. │ │ │Year: 2022 │ │ │ - │Runtime: 63 minutes│ │ │ + │Runtime: 63 minutes│ The first season took seven years to finish. │ │ │Path: /nfs/tv/Test │ │ │ │Quality Profile: Bl│ ╭───╮ │ │ │Language Profile: E│ Monitored: │ ✔ │ │ │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesPrompt.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesPrompt.snap index fd06895e..eaad66e7 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesPrompt.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesPrompt.snap @@ -11,9 +11,9 @@ expression: output ╭───────────────────────────────────────────── Edit - Test ─────────────────────────────────────────────╮ │ Blah blah blah │ │ │ + │ It was filmed in Madison, Wisconsin: a city the crew never really left. │ │ │ - │ │ - │ │ + │ The first season took seven years to finish. │ │ │ │ ╭───╮ │ │ Monitored: │ ✔ │ │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesPrompt_SeriesDetails.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesPrompt_SeriesDetails.snap index be8a8fe2..f4d7ba67 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesPrompt_SeriesDetails.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesPrompt_SeriesDetails.snap @@ -7,13 +7,13 @@ expression: output ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO ╭───────────────────────────────────────────── Edit - Test ─────────────────────────────────────────────╮ │ │Status: Continuing │ Blah blah blah │ │ │Genres: cool, famil│ │ │ - │Rating: 84% │ │ │ + │Rating: 84% │ It was filmed in Madison, Wisconsin: a city the crew never really left. │ │ │Year: 2022 │ │ │ - │Runtime: 63 minutes│ │ │ + │Runtime: 63 minutes│ The first season took seven years to finish. │ │ │Path: /nfs/tv/Test │ │ │ │Quality Profile: Bl│ ╭───╮ │ │ │Language Profile: E│ Monitored: │ ✔ │ │ │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesSelectLanguageProfile.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesSelectLanguageProfile.snap index 9990fb34..ce0dcc5b 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesSelectLanguageProfile.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesSelectLanguageProfile.snap @@ -11,9 +11,9 @@ expression: output ╭───────────────────────────────────────────── Edit - Test ─────────────────────────────────────────────╮ │ Blah blah blah │ │ │ + │ It was filmed in Madison, Wisconsin: a city the crew never really left. │ │ │ - │ │ - │ │ + │ The first season took seven years to finish. │ │ │ │ ╭───╮ │ │ Monitored: │ ✔ │ │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesSelectLanguageProfile_SeriesDetails.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesSelectLanguageProfile_SeriesDetails.snap index f882c48d..e86f0274 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesSelectLanguageProfile_SeriesDetails.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesSelectLanguageProfile_SeriesDetails.snap @@ -7,13 +7,13 @@ expression: output ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO ╭───────────────────────────────────────────── Edit - Test ─────────────────────────────────────────────╮ │ │Status: Continuing │ Blah blah blah │ │ │Genres: cool, famil│ │ │ - │Rating: 84% │ │ │ + │Rating: 84% │ It was filmed in Madison, Wisconsin: a city the crew never really left. │ │ │Year: 2022 │ │ │ - │Runtime: 63 minutes│ │ │ + │Runtime: 63 minutes│ The first season took seven years to finish. │ │ │Path: /nfs/tv/Test │ │ │ │Quality Profile: Bl│ ╭───╮ │ │ │Language Profile: E│ Monitored: │ ✔ │ │ │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesSelectQualityProfile.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesSelectQualityProfile.snap index 3cc0c3e1..0f225f03 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesSelectQualityProfile.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesSelectQualityProfile.snap @@ -11,9 +11,9 @@ expression: output ╭───────────────────────────────────────────── Edit - Test ─────────────────────────────────────────────╮ │ Blah blah blah │ │ │ + │ It was filmed in Madison, Wisconsin: a city the crew never really left. │ │ │ - │ │ - │ │ + │ The first season took seven years to finish. │ │ │ │ ╭───╮ │ │ Monitored: │ ✔ │ │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesSelectQualityProfile_SeriesDetails.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesSelectQualityProfile_SeriesDetails.snap index 7f9f5449..91820af6 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesSelectQualityProfile_SeriesDetails.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesSelectQualityProfile_SeriesDetails.snap @@ -7,13 +7,13 @@ expression: output ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO ╭───────────────────────────────────────────── Edit - Test ─────────────────────────────────────────────╮ │ │Status: Continuing │ Blah blah blah │ │ │Genres: cool, famil│ │ │ - │Rating: 84% │ │ │ + │Rating: 84% │ It was filmed in Madison, Wisconsin: a city the crew never really left. │ │ │Year: 2022 │ │ │ - │Runtime: 63 minutes│ │ │ + │Runtime: 63 minutes│ The first season took seven years to finish. │ │ │Path: /nfs/tv/Test │ │ │ │Quality Profile: Bl│ ╭───╮ │ │ │Language Profile: E│ Monitored: │ ✔ │ │ │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesSelectSeriesType.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesSelectSeriesType.snap index cd0e5be2..97e1bcc2 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesSelectSeriesType.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesSelectSeriesType.snap @@ -11,9 +11,9 @@ expression: output ╭───────────────────────────────────────────── Edit - Test ─────────────────────────────────────────────╮ │ Blah blah blah │ │ │ + │ It was filmed in Madison, Wisconsin: a city the crew never really left. │ │ │ - │ │ - │ │ + │ The first season took seven years to finish. │ │ │ │ ╭───╮ │ │ Monitored: │ ✔ │ │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesSelectSeriesType_SeriesDetails.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesSelectSeriesType_SeriesDetails.snap index 8d22ec94..ee29f2c1 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesSelectSeriesType_SeriesDetails.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__edit_series_ui__edit_series_ui_tests__tests__snapshot_tests__edit_series_EditSeriesSelectSeriesType_SeriesDetails.snap @@ -7,13 +7,13 @@ expression: output ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO ╭───────────────────────────────────────────── Edit - Test ─────────────────────────────────────────────╮ │ │Status: Continuing │ Blah blah blah │ │ │Genres: cool, famil│ │ │ - │Rating: 84% │ │ │ + │Rating: 84% │ It was filmed in Madison, Wisconsin: a city the crew never really left. │ │ │Year: 2022 │ │ │ - │Runtime: 63 minutes│ │ │ + │Runtime: 63 minutes│ The first season took seven years to finish. │ │ │Path: /nfs/tv/Test │ │ │ │Quality Profile: Bl│ ╭───╮ │ │ │Language Profile: E│ Monitored: │ ✔ │ │ │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__library_ui_tests__tests__snapshot_tests__library_ui_renders_edit_series_over_series.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__library_ui_tests__tests__snapshot_tests__library_ui_renders_edit_series_over_series.snap index 7fe1a718..4689b67e 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__library_ui_tests__tests__snapshot_tests__library_ui_renders_edit_series_over_series.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__library_ui_tests__tests__snapshot_tests__library_ui_renders_edit_series_over_series.snap @@ -11,9 +11,9 @@ expression: output ╭───────────────────────────────────────────── Edit - Test ─────────────────────────────────────────────╮ │ Blah blah blah │ │ │ + │ It was filmed in Madison, Wisconsin: a city the crew never really left. │ │ │ - │ │ - │ │ + │ The first season took seven years to finish. │ │ │ │ ╭───╮ │ │ Monitored: │ ✔ │ │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__library_ui_tests__tests__snapshot_tests__library_ui_renders_series_details_over_series.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__library_ui_tests__tests__snapshot_tests__library_ui_renders_series_details_over_series.snap index 81ab929e..86812c78 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__library_ui_tests__tests__snapshot_tests__library_ui_renders_series_details_over_series.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__library_ui_tests__tests__snapshot_tests__library_ui_renders_series_details_over_series.snap @@ -7,7 +7,7 @@ expression: output => Test 2022 HBO Continuin TV-MA Standard Bluray-1080p English 59.51 GB 🏷 ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO │ │Status: Continuing │ │Genres: cool, family, fun │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__empty_series_details_SeriesDetails.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__empty_series_details_SeriesDetails.snap index 8d7f917d..36ccbeb0 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__empty_series_details_SeriesDetails.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__empty_series_details_SeriesDetails.snap @@ -7,7 +7,7 @@ expression: output ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO │ │Status: Continuing │ │Genres: cool, family, fun │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__empty_series_details_SeriesHistory.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__empty_series_details_SeriesHistory.snap index 8d7f917d..36ccbeb0 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__empty_series_details_SeriesHistory.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__empty_series_details_SeriesHistory.snap @@ -7,7 +7,7 @@ expression: output ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO │ │Status: Continuing │ │Genres: cool, family, fun │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__empty_series_details_SeriesHistoryDetails.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__empty_series_details_SeriesHistoryDetails.snap index 12609fd0..267fbd35 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__empty_series_details_SeriesHistoryDetails.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__empty_series_details_SeriesHistoryDetails.snap @@ -7,7 +7,7 @@ expression: output ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO │ │Status: Continuing │ │Genres: cool, family, fun │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__loading_series_details_SeriesDetails.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__loading_series_details_SeriesDetails.snap index f7e287f0..0ba89efe 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__loading_series_details_SeriesDetails.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__loading_series_details_SeriesDetails.snap @@ -7,7 +7,7 @@ expression: output ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO │ │Status: Continuing │ │Genres: cool, family, fun │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__loading_series_details_SeriesHistory.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__loading_series_details_SeriesHistory.snap index f7e287f0..0ba89efe 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__loading_series_details_SeriesHistory.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__loading_series_details_SeriesHistory.snap @@ -7,7 +7,7 @@ expression: output ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO │ │Status: Continuing │ │Genres: cool, family, fun │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_AutomaticallySearchSeriesPrompt_0.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_AutomaticallySearchSeriesPrompt_0.snap index 385ee3ea..aa11859a 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_AutomaticallySearchSeriesPrompt_0.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_AutomaticallySearchSeriesPrompt_0.snap @@ -7,7 +7,7 @@ expression: output ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO │ │Status: Continuing │ │Genres: cool, family, fun │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_AutomaticallySearchSeriesPrompt_1.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_AutomaticallySearchSeriesPrompt_1.snap index accf608b..1731bf81 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_AutomaticallySearchSeriesPrompt_1.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_AutomaticallySearchSeriesPrompt_1.snap @@ -7,7 +7,7 @@ expression: output ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO │ │Status: Continuing │ │Genres: cool, family, fun │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_FilterSeriesHistoryError_1.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_FilterSeriesHistoryError_1.snap index 7e0ca69a..0701b977 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_FilterSeriesHistoryError_1.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_FilterSeriesHistoryError_1.snap @@ -7,7 +7,7 @@ expression: output ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO │ │Status: Continuing │ │Genres: cool, family, fun │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_FilterSeriesHistory_1.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_FilterSeriesHistory_1.snap index 3e37c149..a92caf68 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_FilterSeriesHistory_1.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_FilterSeriesHistory_1.snap @@ -7,7 +7,7 @@ expression: output ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO │ │Status: Continuing │ │Genres: cool, family, fun │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SearchSeasonError_0.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SearchSeasonError_0.snap index 3bd7da7f..90c6bb9a 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SearchSeasonError_0.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SearchSeasonError_0.snap @@ -7,7 +7,7 @@ expression: output ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO │ │Status: Continuing │ │Genres: cool, family, fun │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SearchSeason_0.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SearchSeason_0.snap index a5940730..d9d22377 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SearchSeason_0.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SearchSeason_0.snap @@ -7,7 +7,7 @@ expression: output ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO │ │Status: Continuing │ │Genres: cool, family, fun │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SearchSeriesHistoryError_1.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SearchSeriesHistoryError_1.snap index c213bf22..0343e7b9 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SearchSeriesHistoryError_1.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SearchSeriesHistoryError_1.snap @@ -7,7 +7,7 @@ expression: output ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO │ │Status: Continuing │ │Genres: cool, family, fun │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SearchSeriesHistory_1.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SearchSeriesHistory_1.snap index afd0fa0e..ebca646d 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SearchSeriesHistory_1.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SearchSeriesHistory_1.snap @@ -7,7 +7,7 @@ expression: output ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO │ │Status: Continuing │ │Genres: cool, family, fun │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SeriesDetails_0.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SeriesDetails_0.snap index 1f91c3aa..6d92d0e1 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SeriesDetails_0.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SeriesDetails_0.snap @@ -7,7 +7,7 @@ expression: output ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO │ │Status: Continuing │ │Genres: cool, family, fun │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SeriesHistoryDetails_1.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SeriesHistoryDetails_1.snap index 851a727c..29599c10 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SeriesHistoryDetails_1.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SeriesHistoryDetails_1.snap @@ -7,7 +7,7 @@ expression: output ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO │ │Status: Continuing │ │Genres: cool, family, fun │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SeriesHistorySortPrompt_1.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SeriesHistorySortPrompt_1.snap index 4c982de4..02b958da 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SeriesHistorySortPrompt_1.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SeriesHistorySortPrompt_1.snap @@ -7,7 +7,7 @@ expression: output ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO │ │Status: Continuing │ │Genres: cool, family, fun │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SeriesHistory_1.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SeriesHistory_1.snap index 7633027b..263df9ca 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SeriesHistory_1.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_SeriesHistory_1.snap @@ -7,7 +7,7 @@ expression: output ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO │ │Status: Continuing │ │Genres: cool, family, fun │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_UpdateAndScanSeriesPrompt_0.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_UpdateAndScanSeriesPrompt_0.snap index 05966110..a77fd126 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_UpdateAndScanSeriesPrompt_0.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_UpdateAndScanSeriesPrompt_0.snap @@ -7,7 +7,7 @@ expression: output ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO │ │Status: Continuing │ │Genres: cool, family, fun │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_UpdateAndScanSeriesPrompt_1.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_UpdateAndScanSeriesPrompt_1.snap index 2e1e2ee8..d5269529 100644 --- a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_UpdateAndScanSeriesPrompt_1.snap +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_UpdateAndScanSeriesPrompt_1.snap @@ -7,7 +7,7 @@ expression: output ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │Title: Test │ - │Overview: Blah blah blah │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ │Network: HBO │ │Status: Continuing │ │Genres: cool, family, fun │ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_renders_series_overview_over_series_details.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_renders_series_overview_over_series_details.snap new file mode 100644 index 00000000..6ac1fb17 --- /dev/null +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_details_ui__series_details_ui_tests__tests__snapshot_tests__series_details_ui_renders_series_overview_over_series_details.snap @@ -0,0 +1,52 @@ +--- +source: src/ui/sonarr_ui/library/series_details_ui_tests.rs +expression: output +--- + + + + ╭ Test ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ + │Title: Test │ + │Overview: Blah blah blahIt was filmed in Madison, Wisconsin: a city the crew never really left.The first season took seven years to finish. │ + │Network: HB╭─────────────────────────────────────────────────────── Overview ───────────────────────────────────────────────────────╮ │ + │Status: Con│Blah blah blah │ │ + │Genres: coo│ │ │ + │Rating: 84%│It was filmed in Madison, Wisconsin: a city the crew never really left. │ │ + │Year: 2022 │ │ │ + │Runtime: 63│The first season took seven years to finish. │ │ + │Path: /nfs/│ │ │ + │Quality Pro│ │ │ + │Language Pr│ │ │ + │Monitored: │ │ │ + │Size on Dis│ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │╭ Series D│ │───────────╮│ + ││ Seasons ││ │ ││ + ││──────────│ │───────────││ + ││ Monitor│ │ ││ + ││=> 🏷 │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ │ │ ││ + ││ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ││ + ││ ││ + ││ ││ + │╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯│ + ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_overview_ui__series_overview_ui_tests__tests__snapshot_tests__series_overview_ui_renders.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_overview_ui__series_overview_ui_tests__tests__snapshot_tests__series_overview_ui_renders.snap new file mode 100644 index 00000000..da225edf --- /dev/null +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_overview_ui__series_overview_ui_tests__tests__snapshot_tests__series_overview_ui_renders.snap @@ -0,0 +1,48 @@ +--- +source: src/ui/sonarr_ui/library/series_overview_ui_tests.rs +expression: output +--- + + + + + + + ╭─────────────────────────────────────────────────────── Overview ───────────────────────────────────────────────────────╮ + │Blah blah blah │ + │ │ + │It was filmed in Madison, Wisconsin: a city the crew never really left. │ + │ │ + │The first season took seven years to finish. │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_overview_ui__series_overview_ui_tests__tests__snapshot_tests__series_overview_ui_renders_a_series_with_no_overview.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_overview_ui__series_overview_ui_tests__tests__snapshot_tests__series_overview_ui_renders_a_series_with_no_overview.snap new file mode 100644 index 00000000..77a6bd5f --- /dev/null +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_overview_ui__series_overview_ui_tests__tests__snapshot_tests__series_overview_ui_renders_a_series_with_no_overview.snap @@ -0,0 +1,48 @@ +--- +source: src/ui/sonarr_ui/library/series_overview_ui_tests.rs +expression: output +--- + + + + + + + ╭─────────────────────────────────────────────────────── Overview ───────────────────────────────────────────────────────╮ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_overview_ui__series_overview_ui_tests__tests__snapshot_tests__series_overview_ui_renders_loading.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_overview_ui__series_overview_ui_tests__tests__snapshot_tests__series_overview_ui_renders_loading.snap new file mode 100644 index 00000000..e230d95e --- /dev/null +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_overview_ui__series_overview_ui_tests__tests__snapshot_tests__series_overview_ui_renders_loading.snap @@ -0,0 +1,48 @@ +--- +source: src/ui/sonarr_ui/library/series_overview_ui_tests.rs +expression: output +--- + + + + + + + ╭─────────────────────────────────────────────────────── Overview ───────────────────────────────────────────────────────╮ + │ │ + │ │ + │ Loading ... │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_overview_ui__series_overview_ui_tests__tests__snapshot_tests__series_overview_ui_renders_nothing_when_the_series_overview_modal_is_undefined.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_overview_ui__series_overview_ui_tests__tests__snapshot_tests__series_overview_ui_renders_nothing_when_the_series_overview_modal_is_undefined.snap new file mode 100644 index 00000000..0c31337c --- /dev/null +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_overview_ui__series_overview_ui_tests__tests__snapshot_tests__series_overview_ui_renders_nothing_when_the_series_overview_modal_is_undefined.snap @@ -0,0 +1,5 @@ +--- +source: src/ui/sonarr_ui/library/series_overview_ui_tests.rs +expression: output +--- + diff --git a/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_overview_ui__series_overview_ui_tests__tests__snapshot_tests__series_overview_ui_renders_scrolled.snap b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_overview_ui__series_overview_ui_tests__tests__snapshot_tests__series_overview_ui_renders_scrolled.snap new file mode 100644 index 00000000..a7c38a6c --- /dev/null +++ b/src/ui/sonarr_ui/library/snapshots/managarr__ui__sonarr_ui__library__series_overview_ui__series_overview_ui_tests__tests__snapshot_tests__series_overview_ui_renders_scrolled.snap @@ -0,0 +1,48 @@ +--- +source: src/ui/sonarr_ui/library/series_overview_ui_tests.rs +expression: output +--- + + + + + + + ╭─────────────────────────────────────────────────────── Overview ───────────────────────────────────────────────────────╮ + │It was filmed in Madison, Wisconsin: a city the crew never really left. │ + │ │ + │The first season took seven years to finish. │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + │ │ + ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯