test: Created snapshot tests for all Radarr UI modules

This commit is contained in:
2025-12-15 20:17:09 -07:00
parent 7084ca1be2
commit 316ed64315
273 changed files with 8859 additions and 2031 deletions
+2
View File
@@ -35,6 +35,8 @@ pub mod theme;
mod ui_property_tests;
#[cfg(test)]
pub mod ui_test_utils;
#[cfg(test)]
mod ui_tests;
mod utils;
mod widgets;
@@ -3,9 +3,7 @@ mod tests {
use strum::IntoEnumIterator;
use crate::app::App;
use crate::models::radarr_models::BlocklistItem;
use crate::models::servarr_data::radarr::radarr_data::{ActiveRadarrBlock, BLOCKLIST_BLOCKS};
use crate::models::stateful_table::StatefulTable;
use crate::ui::DrawUi;
use crate::ui::radarr_ui::blocklist::BlocklistUi;
use crate::ui::ui_test_utils::test_utils::render_to_string_with_app;
@@ -21,54 +19,54 @@ mod tests {
});
}
#[test]
fn test_blocklist_ui_renders_loading_state() {
let mut app = App::test_default();
app.is_loading = true;
app.push_navigation_stack(ActiveRadarrBlock::Blocklist.into());
mod snapshot_tests {
use rstest::rstest;
use crate::ui::ui_test_utils::test_utils::TerminalSize;
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
BlocklistUi::draw(f, app, f.area());
});
use super::*;
insta::assert_snapshot!(output);
}
#[test]
fn test_blocklist_ui_renders_blocklist_tab_loading() {
let mut app = App::test_default();
app.is_loading = true;
app.push_navigation_stack(ActiveRadarrBlock::Blocklist.into());
#[test]
fn test_blocklist_ui_renders_empty_blocklist() {
let mut app = App::test_default();
app.push_navigation_stack(ActiveRadarrBlock::Blocklist.into());
app.data.radarr_data.blocklist = StatefulTable::default();
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
BlocklistUi::draw(f, app, f.area());
});
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
BlocklistUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
insta::assert_snapshot!(output);
}
#[test]
fn test_blocklist_ui_renders_empty_blocklist() {
let mut app = App::test_default();
app.push_navigation_stack(ActiveRadarrBlock::Blocklist.into());
#[test]
fn test_blocklist_ui_renders_with_blocklist_items() {
let mut app = App::test_default();
app.push_navigation_stack(ActiveRadarrBlock::Blocklist.into());
app.data.radarr_data.blocklist = StatefulTable::default();
app.data.radarr_data.blocklist.set_items(vec![
BlocklistItem {
id: 1,
source_title: "Test.Movie.2023.1080p".to_owned(),
..BlocklistItem::default()
},
BlocklistItem {
id: 2,
source_title: "Another.Movie.2023.720p".to_owned(),
..BlocklistItem::default()
},
]);
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
BlocklistUi::draw(f, app, f.area());
});
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
BlocklistUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
insta::assert_snapshot!(output);
#[rstest]
fn test_blocklist_ui_renders_blocklist_tab(
#[values(
ActiveRadarrBlock::Blocklist,
ActiveRadarrBlock::BlocklistSortPrompt,
ActiveRadarrBlock::DeleteBlocklistItemPrompt,
ActiveRadarrBlock::BlocklistClearAllItemsPrompt,
)] active_radarr_block: ActiveRadarrBlock
) {
let mut app = App::test_default_fully_populated();
app.push_navigation_stack(active_radarr_block.into());
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
BlocklistUi::draw(f, app, f.area());
});
insta::assert_snapshot!(active_radarr_block.to_string(), output);
}
}
}
@@ -1,8 +0,0 @@
---
source: src/ui/radarr_ui/blocklist/blocklist_ui_tests.rs
expression: output
---
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Movie Title Source Title Languages Quality Formats Date
=> Test.Movie.2023.1080p 1970-01-01 00:00:0
Another.Movie.2023.720p 1970-01-01 00:00:0
@@ -0,0 +1,7 @@
---
source: src/ui/radarr_ui/blocklist/blocklist_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Movie Title ▼ Source Title Languages Quality Formats Date
=> Test z movie English HD - 1080p English 2024-02-10 07:28:45 UTC
@@ -0,0 +1,34 @@
---
source: src/ui/radarr_ui/blocklist/blocklist_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Movie Title ▼ Source Title Languages Quality Formats Date
=> Test z movie English HD - 1080p English 2024-02-10 07:28:45 UTC
╭────── Clear Blocklist ──────╮
│ Do you want to clear your │
│ blocklist? │
│ │
│ │
│ │
│╭──────────────╮╭─────────────╮│
││ Yes ││ No ││
│╰──────────────╯╰─────────────╯│
╰───────────────────────────────╯
@@ -0,0 +1,42 @@
---
source: src/ui/radarr_ui/blocklist/blocklist_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Movie Title Source Title Languages Quality Formats Date
=> Test z movie English HD - 1080p English 2024-02-10 07:28:45 UTC
╭───────────────────────────────╮
│Something │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
╰───────────────────────────────╯
@@ -0,0 +1,38 @@
---
source: src/ui/radarr_ui/blocklist/blocklist_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Movie Title ▼ Source Title Languages Quality Formats Date
=> Test z movie English HD - 1080p English 2024-02-10 07:28:45 UTC
╭────────────── Remove Item from Blocklist ───────────────╮
│ Do you want to remove this item from your blocklist: │
│ z movie? │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│╭────────────────────────────╮╭───────────────────────────╮│
││ Yes ││ No ││
│╰────────────────────────────╯╰───────────────────────────╯│
╰───────────────────────────────────────────────────────────╯
@@ -2,7 +2,7 @@
source: src/ui/radarr_ui/blocklist/blocklist_ui_tests.rs
expression: output
---
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Loading ...
@@ -2,4 +2,4 @@
source: src/ui/radarr_ui/blocklist/blocklist_ui_tests.rs
expression: output
---
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
@@ -100,7 +100,7 @@ pub fn draw_collection_details(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect)
.unwrap_or_default()
.value
.as_f64()
.unwrap();
.unwrap_or_default();
let rotten_tomatoes_rating = movie
.ratings
.rotten_tomatoes
@@ -108,7 +108,7 @@ pub fn draw_collection_details(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect)
.unwrap_or_default()
.value
.as_u64()
.unwrap();
.unwrap_or_default();
let imdb_rating = if imdb_rating == 0.0 {
String::new()
} else {
@@ -1,17 +1,14 @@
#[cfg(test)]
mod tests {
use bimap::BiMap;
use strum::IntoEnumIterator;
use crate::app::App;
use crate::models::radarr_models::{Collection, CollectionMovie};
use crate::models::servarr_data::radarr::radarr_data::{
ActiveRadarrBlock, COLLECTION_DETAILS_BLOCKS,
};
use crate::models::stateful_table::StatefulTable;
use crate::ui::DrawUi;
use crate::ui::radarr_ui::collections::collection_details_ui::CollectionDetailsUi;
use crate::ui::ui_test_utils::test_utils::render_to_string_with_app;
use crate::ui::ui_test_utils::test_utils::{TerminalSize, render_to_string_with_app};
#[test]
fn test_collection_details_ui_accepts() {
@@ -39,27 +36,39 @@ mod tests {
));
}
#[test]
fn test_collection_details_ui_renders_collection_details() {
let mut app = App::test_default();
app.push_navigation_stack(ActiveRadarrBlock::CollectionDetails.into());
app.data.radarr_data.quality_profile_map = BiMap::from_iter(vec![(1, "HD - 1080p".to_owned())]);
app.data.radarr_data.collections = StatefulTable::default();
app.data.radarr_data.collections.set_items(vec![Collection {
id: 1,
title: "Test Collection".into(),
quality_profile_id: 1,
movies: Some(vec![CollectionMovie {
title: "Movie 1".into(),
..CollectionMovie::default()
}]),
..Collection::default()
}]);
mod snapshot_tests {
use rstest::rstest;
use crate::models::stateful_table::StatefulTable;
use super::*;
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
CollectionDetailsUi::draw(f, app, f.area());
});
#[rstest]
fn test_collection_details_ui_renders_collection_details(
#[values(
ActiveRadarrBlock::CollectionDetails,
ActiveRadarrBlock::ViewMovieOverview
)] active_radarr_block: ActiveRadarrBlock
) {
let mut app = App::test_default_fully_populated();
app.push_navigation_stack(active_radarr_block.into());
insta::assert_snapshot!(output);
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
CollectionDetailsUi::draw(f, app, f.area());
});
insta::assert_snapshot!(active_radarr_block.to_string(), output);
}
#[test]
fn test_collection_details_ui_renders_collection_details_empty() {
let mut app = App::test_default_fully_populated();
app.data.radarr_data.collection_movies = StatefulTable::default();
app.push_navigation_stack(ActiveRadarrBlock::CollectionDetails.into());
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
CollectionDetailsUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
}
}
}
@@ -10,7 +10,7 @@ mod tests {
use crate::models::stateful_table::StatefulTable;
use crate::ui::DrawUi;
use crate::ui::radarr_ui::collections::CollectionsUi;
use crate::ui::ui_test_utils::test_utils::render_to_string_with_app;
use crate::ui::ui_test_utils::test_utils::{TerminalSize, render_to_string_with_app};
#[test]
fn test_collections_ui_accepts() {
@@ -28,29 +28,95 @@ mod tests {
});
}
#[test]
fn test_collections_ui_renders_loading_state() {
let mut app = App::test_default();
app.is_loading = true;
app.push_navigation_stack(ActiveRadarrBlock::Collections.into());
mod snapshot_tests {
use super::*;
use rstest::rstest;
use crate::models::BlockSelectionState;
use crate::models::servarr_data::radarr::radarr_data::EDIT_COLLECTION_SELECTION_BLOCKS;
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
CollectionsUi::draw(f, app, f.area());
});
#[rstest]
#[case(true, false, false)]
#[case(false, true, false)]
#[case(false, false, true)]
fn test_radarr_ui_renders_collections_tab_loading(
#[case] is_loading: bool,
#[case] empty_movies: bool,
#[case] empty_profile_map: bool,
) {
let mut app = App::test_default_fully_populated();
app.push_navigation_stack(ActiveRadarrBlock::Collections.into());
app.is_loading = is_loading;
if empty_movies {
app.data.radarr_data.movies = StatefulTable::default();
}
insta::assert_snapshot!(output);
}
if empty_profile_map {
app.data.radarr_data.quality_profile_map = Default::default();
}
#[test]
fn test_collections_ui_renders_empty_collections() {
let mut app = App::test_default();
app.push_navigation_stack(ActiveRadarrBlock::Collections.into());
app.data.radarr_data.collections = StatefulTable::default();
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
CollectionsUi::draw(f, app, f.area());
});
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
CollectionsUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
insta::assert_snapshot!(output);
#[rstest]
fn test_radarr_ui_renders_collections_tab(
#[values(
ActiveRadarrBlock::Collections,
ActiveRadarrBlock::CollectionsSortPrompt,
ActiveRadarrBlock::FilterCollections,
ActiveRadarrBlock::FilterCollectionsError,
ActiveRadarrBlock::SearchCollection,
ActiveRadarrBlock::SearchCollectionError,
ActiveRadarrBlock::UpdateAllCollectionsPrompt,
)] active_radarr_block: ActiveRadarrBlock) {
let mut app = App::test_default_fully_populated();
app.push_navigation_stack(active_radarr_block.into());
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
CollectionsUi::draw(f, app, f.area());
});
insta::assert_snapshot!(active_radarr_block.to_string(), output);
}
#[test]
fn test_radarr_ui_renders_collections_tab_empty() {
let mut app = App::test_default_fully_populated();
app.data.radarr_data.collections = StatefulTable::default();
app.push_navigation_stack(ActiveRadarrBlock::Collections.into());
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
CollectionsUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
#[rstest]
#[case(ActiveRadarrBlock::CollectionDetails, ActiveRadarrBlock::EditCollectionPrompt)]
#[case(ActiveRadarrBlock::CollectionDetails, ActiveRadarrBlock::EditCollectionConfirmPrompt)]
#[case(ActiveRadarrBlock::CollectionDetails, ActiveRadarrBlock::EditCollectionRootFolderPathInput)]
#[case(ActiveRadarrBlock::CollectionDetails, ActiveRadarrBlock::EditCollectionSelectMinimumAvailability)]
#[case(ActiveRadarrBlock::CollectionDetails, ActiveRadarrBlock::EditCollectionSelectQualityProfile)]
#[case(ActiveRadarrBlock::CollectionDetails, ActiveRadarrBlock::EditCollectionToggleSearchOnAdd)]
#[case(ActiveRadarrBlock::CollectionDetails, ActiveRadarrBlock::EditCollectionToggleMonitored)]
fn test_edit_collection_ui_renders_edit_collection_modal(
#[case] context_block: ActiveRadarrBlock,
#[case] active_radarr_block: ActiveRadarrBlock,
) {
let mut app = App::test_default_fully_populated();
app.push_navigation_stack((active_radarr_block, Some(context_block)).into());
app.data.radarr_data.selected_block =
BlockSelectionState::new(EDIT_COLLECTION_SELECTION_BLOCKS);
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
CollectionsUi::draw(f, app, f.area());
});
insta::assert_snapshot!(format!("{}_{}", active_radarr_block.to_string(), context_block.to_string()), output);
}
}
}
@@ -1,19 +1,15 @@
#[cfg(test)]
mod tests {
use bimap::BiMap;
use strum::IntoEnumIterator;
use crate::app::App;
use crate::models::BlockSelectionState;
use crate::models::radarr_models::Collection;
use crate::models::servarr_data::radarr::modals::EditCollectionModal;
use crate::models::servarr_data::radarr::radarr_data::{
ActiveRadarrBlock, EDIT_COLLECTION_BLOCKS, EDIT_COLLECTION_SELECTION_BLOCKS,
};
use crate::models::stateful_table::StatefulTable;
use crate::ui::DrawUi;
use crate::ui::radarr_ui::collections::edit_collection_ui::EditCollectionUi;
use crate::ui::ui_test_utils::test_utils::render_to_string_with_app;
use crate::ui::ui_test_utils::test_utils::{TerminalSize, render_to_string_with_app};
#[test]
fn test_edit_collection_ui_accepts() {
@@ -34,28 +30,39 @@ mod tests {
));
}
#[test]
fn test_edit_collection_ui_renders_edit_collection_modal() {
let mut app = App::test_default();
app.push_navigation_stack(ActiveRadarrBlock::EditCollectionRootFolderPathInput.into());
app.data.radarr_data.quality_profile_map = BiMap::from_iter(vec![(1, "HD - 1080p".to_owned())]);
app.data.radarr_data.collections = StatefulTable::default();
app.data.radarr_data.collections.set_items(vec![Collection {
id: 1,
title: "Test Collection".into(),
quality_profile_id: 1,
root_folder_path: Some("/movies".to_owned()),
..Collection::default()
}]);
app.data.radarr_data.selected_block =
BlockSelectionState::new(EDIT_COLLECTION_SELECTION_BLOCKS);
app.data.radarr_data.edit_collection_modal =
Some(EditCollectionModal::from(&app.data.radarr_data));
mod snapshot_tests {
use rstest::rstest;
use super::*;
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
EditCollectionUi::draw(f, app, f.area());
});
#[rstest]
#[case(ActiveRadarrBlock::Collections, ActiveRadarrBlock::EditCollectionPrompt)]
#[case(ActiveRadarrBlock::Collections, ActiveRadarrBlock::EditCollectionConfirmPrompt)]
#[case(ActiveRadarrBlock::Collections, ActiveRadarrBlock::EditCollectionRootFolderPathInput)]
#[case(ActiveRadarrBlock::Collections, ActiveRadarrBlock::EditCollectionSelectMinimumAvailability)]
#[case(ActiveRadarrBlock::Collections, ActiveRadarrBlock::EditCollectionSelectQualityProfile)]
#[case(ActiveRadarrBlock::Collections, ActiveRadarrBlock::EditCollectionToggleSearchOnAdd)]
#[case(ActiveRadarrBlock::Collections, ActiveRadarrBlock::EditCollectionToggleMonitored)]
#[case(ActiveRadarrBlock::CollectionDetails, ActiveRadarrBlock::EditCollectionPrompt)]
#[case(ActiveRadarrBlock::CollectionDetails, ActiveRadarrBlock::EditCollectionConfirmPrompt)]
#[case(ActiveRadarrBlock::CollectionDetails, ActiveRadarrBlock::EditCollectionRootFolderPathInput)]
#[case(ActiveRadarrBlock::CollectionDetails, ActiveRadarrBlock::EditCollectionSelectMinimumAvailability)]
#[case(ActiveRadarrBlock::CollectionDetails, ActiveRadarrBlock::EditCollectionSelectQualityProfile)]
#[case(ActiveRadarrBlock::CollectionDetails, ActiveRadarrBlock::EditCollectionToggleSearchOnAdd)]
#[case(ActiveRadarrBlock::CollectionDetails, ActiveRadarrBlock::EditCollectionToggleMonitored)]
fn test_edit_collection_ui_renders_edit_collection_modal(
#[case] active_radarr_block: ActiveRadarrBlock,
#[case] context_block: ActiveRadarrBlock,
) {
let mut app = App::test_default_fully_populated();
app.push_navigation_stack((active_radarr_block, Some(context_block)).into());
app.data.radarr_data.selected_block =
BlockSelectionState::new(EDIT_COLLECTION_SELECTION_BLOCKS);
insta::assert_snapshot!(output);
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
EditCollectionUi::draw(f, app, f.area());
});
insta::assert_snapshot!(format!("{}_{}", active_radarr_block.to_string(), context_block.to_string()), output);
}
}
}
}
@@ -1,30 +0,0 @@
---
source: src/ui/radarr_ui/collections/collection_details_ui_tests.rs
expression: output
---
╭ Test Collection ─────────────────────────────────────────────────────────────────────╮
│Overview: │
│Root Folder Path: │
│Quality Profile: HD - 1080p │
│Minimum Availability: Announced │
│Monitored: No │
│ Movies ──────────────────────────────────────────────────────────────────────────────│
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,48 @@
---
source: src/ui/radarr_ui/collections/collection_details_ui_tests.rs
expression: output
---
╭ Test Collection ───────────────────────────────────────────────────────────────────────────────────────────────────────╮
│Overview: Collection blah blah blah │
│Root Folder Path: /nfs/movies │
│Quality Profile: HD - 1080p │
│Minimum Availability: Released │
│Monitored: Yes │
│Search on Add: Yes │
│ │
│ │
│ │
│ Movies ────────────────────────────────────────────────────────────────────────────────────────────────────────────────│
│ ✔ Title Year Runtime IMDB Rating Rotten Tomatoes Rating Genres │
│=> ✔ Test 2023 2h 0m 9.9 99% cool, family, fun │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,48 @@
---
source: src/ui/radarr_ui/collections/collection_details_ui_tests.rs
expression: output
---
╭ Test Collection ───────────────────────────────────────────────────────────────────────────────────────────────────────╮
│Overview: Collection blah blah blah │
│Root Folder Path: /nfs/movies │
│Quality Profile: HD - 1080p │
│Minimum Availability: Released │
│Monitored: Yes │
│Search on Add: Yes │
│ │
│ │
│ ╭ Overview ────────────────────────────────────────────────────╮ │
│ Movies ───────────────────│Collection blah blah blah │───────────────────────────│
│ ✔ Title │ │ │
│=> ✔ Test │ │family, fun │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ ╰────────────────────────────────────────────────────────────────╯ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,48 @@
---
source: src/ui/radarr_ui/collections/collection_details_ui_tests.rs
expression: output
---
╭ Test Collection ───────────────────────────────────────────────────────────────────────────────────────────────────────╮
│Overview: Collection blah blah blah │
│Root Folder Path: /nfs/movies │
│Quality Profile: HD - 1080p │
│Minimum Availability: Released │
│Monitored: Yes │
│Search on Add: Yes │
│ │
│ │
│ │
│ Movies ────────────────────────────────────────────────────────────────────────────────────────────────────────────────│
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,7 @@
---
source: src/ui/radarr_ui/collections/collections_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Collection ▼ Number of Movies Root Folder Path Quality Profile Search on Add Monitored
=> Test Collection 1 /nfs/movies HD - 1080p Yes 🏷
@@ -0,0 +1,42 @@
---
source: src/ui/radarr_ui/collections/collections_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Collection Number of Movies Root Folder Path Quality Profile Search on Add Monitored
=> Test Collection 1 /nfs/movies HD - 1080p Yes 🏷
╭───────────────────────────────╮
│Something │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
╰───────────────────────────────╯
@@ -0,0 +1,48 @@
---
source: src/ui/radarr_ui/collections/collections_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Collection ▼ Number of Movies Root Folder Path Quality Profile Search on Add Monitored
=> Test Collection 1 /nfs/movies HD - 1080p Yes 🏷
╭ Test Collection ───────────────────────────────────────────────────────────────────────────────────────────────────────╮
│Overview: Collection blah blah blah │
│Root Folder Path: /nfs/movies │
│Quality Profile: HD - 1080p │
│Minimum Avai╭─────────────────────────────────── Edit - Test Collection ────────────────────────────────────╮ │
│Monitored: Y│ Collection blah blah blah │ │
│Search on Ad│ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ Movies ──│ │───────────│
│ ✔ Title │ ╭───╮ │ │
│=> ✔ Test │ Monitored: │ ✔ │ │ │
│ │ ╰───╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Minimum Availability: │Announced ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Quality Profile: │HD - 1080p ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Root Folder: │/nfs/movies │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭───╮ │ │
│ │ Search on Add: │ ✔ │ │ │
│ │ ╰───╯ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│ │
│ ││ Save ││ Cancel ││ │
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,48 @@
---
source: src/ui/radarr_ui/collections/collections_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Collection ▼ Number of Movies Root Folder Path Quality Profile Search on Add Monitored
=> Test Collection 1 /nfs/movies HD - 1080p Yes 🏷
╭ Test Collection ───────────────────────────────────────────────────────────────────────────────────────────────────────╮
│Overview: Collection blah blah blah │
│Root Folder Path: /nfs/movies │
│Quality Profile: HD - 1080p │
│Minimum Avai╭─────────────────────────────────── Edit - Test Collection ────────────────────────────────────╮ │
│Monitored: Y│ Collection blah blah blah │ │
│Search on Ad│ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ Movies ──│ │───────────│
│ ✔ Title │ ╭───╮ │ │
│=> ✔ Test │ Monitored: │ ✔ │ │ │
│ │ ╰───╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Minimum Availability: │Announced ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Quality Profile: │HD - 1080p ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Root Folder: │/nfs/movies │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭───╮ │ │
│ │ Search on Add: │ ✔ │ │ │
│ │ ╰───╯ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│ │
│ ││ Save ││ Cancel ││ │
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,48 @@
---
source: src/ui/radarr_ui/collections/collections_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Collection ▼ Number of Movies Root Folder Path Quality Profile Search on Add Monitored
=> Test Collection 1 /nfs/movies HD - 1080p Yes 🏷
╭ Test Collection ───────────────────────────────────────────────────────────────────────────────────────────────────────╮
│Overview: Collection blah blah blah │
│Root Folder Path: /nfs/movies │
│Quality Profile: HD - 1080p │
│Minimum Avai╭─────────────────────────────────── Edit - Test Collection ────────────────────────────────────╮ │
│Monitored: Y│ Collection blah blah blah │ │
│Search on Ad│ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ Movies ──│ │───────────│
│ ✔ Title │ ╭───╮ │ │
│=> ✔ Test │ Monitored: │ ✔ │ │ │
│ │ ╰───╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Minimum Availability: │Announced ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Quality Profile: │HD - 1080p ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Root Folder: │/nfs/movies │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭───╮ │ │
│ │ Search on Add: │ ✔ │ │ │
│ │ ╰───╯ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│ │
│ ││ Save ││ Cancel ││ │
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,48 @@
---
source: src/ui/radarr_ui/collections/collections_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Collection ▼ Number of Movies Root Folder Path Quality Profile Search on Add Monitored
=> Test Collection 1 /nfs/movies HD - 1080p Yes 🏷
╭ Test Collection ───────────────────────────────────────────────────────────────────────────────────────────────────────╮
│Overview: Collection blah blah blah │
│Root Folder Path: /nfs/movies │
│Quality Profile: HD - 1080p │
│Minimum Avai╭─────────────────────────────────── Edit - Test Collection ────────────────────────────────────╮ │
│Monitored: Y│ Collection blah blah blah │ │
│Search on Ad│ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ Movies ──│ │───────────│
│ ✔ Title │ ╭───╮ │ │
│=> ✔ Test │ ╭───────────────────────────────╮ │ │
│ │ │Announced │ │ │
│ │ │In Cinemas │───────────────────────────╮ │ │
│ │ Minimum│Released │ ▼ │ │ │
│ │ │TBA │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ Qu│ │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ │ │ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ ╰───────────────────────────────╯ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│ │
│ ││ Save ││ Cancel ││ │
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,48 @@
---
source: src/ui/radarr_ui/collections/collections_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Collection ▼ Number of Movies Root Folder Path Quality Profile Search on Add Monitored
=> Test Collection 1 /nfs/movies HD - 1080p Yes 🏷
╭ Test Collection ───────────────────────────────────────────────────────────────────────────────────────────────────────╮
│Overview: Collection blah blah blah │
│Root Folder Path: /nfs/movies │
│Quality Profile: HD - 1080p │
│Minimum Avai╭─────────────────────────────────── Edit - Test Collection ────────────────────────────────────╮ │
│Monitored: Y│ Collection blah blah blah │ │
│Search on Ad│ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ Movies ──│ │───────────│
│ ✔ Title │ ╭───╮ │ │
│=> ✔ Test │ ╭───────────────────────────────╮ │ │
│ │ │HD - 1080p │ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ Minimum│ │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ Qu│ │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ │ │ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ ╰───────────────────────────────╯ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│ │
│ ││ Save ││ Cancel ││ │
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,48 @@
---
source: src/ui/radarr_ui/collections/collections_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Collection ▼ Number of Movies Root Folder Path Quality Profile Search on Add Monitored
=> Test Collection 1 /nfs/movies HD - 1080p Yes 🏷
╭ Test Collection ───────────────────────────────────────────────────────────────────────────────────────────────────────╮
│Overview: Collection blah blah blah │
│Root Folder Path: /nfs/movies │
│Quality Profile: HD - 1080p │
│Minimum Avai╭─────────────────────────────────── Edit - Test Collection ────────────────────────────────────╮ │
│Monitored: Y│ Collection blah blah blah │ │
│Search on Ad│ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ Movies ──│ │───────────│
│ ✔ Title │ ╭───╮ │ │
│=> ✔ Test │ Monitored: │ ✔ │ │ │
│ │ ╰───╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Minimum Availability: │Announced ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Quality Profile: │HD - 1080p ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Root Folder: │/nfs/movies │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭───╮ │ │
│ │ Search on Add: │ ✔ │ │ │
│ │ ╰───╯ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│ │
│ ││ Save ││ Cancel ││ │
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,48 @@
---
source: src/ui/radarr_ui/collections/collections_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Collection ▼ Number of Movies Root Folder Path Quality Profile Search on Add Monitored
=> Test Collection 1 /nfs/movies HD - 1080p Yes 🏷
╭ Test Collection ───────────────────────────────────────────────────────────────────────────────────────────────────────╮
│Overview: Collection blah blah blah │
│Root Folder Path: /nfs/movies │
│Quality Profile: HD - 1080p │
│Minimum Avai╭─────────────────────────────────── Edit - Test Collection ────────────────────────────────────╮ │
│Monitored: Y│ Collection blah blah blah │ │
│Search on Ad│ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ Movies ──│ │───────────│
│ ✔ Title │ ╭───╮ │ │
│=> ✔ Test │ Monitored: │ ✔ │ │ │
│ │ ╰───╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Minimum Availability: │Announced ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Quality Profile: │HD - 1080p ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Root Folder: │/nfs/movies │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭───╮ │ │
│ │ Search on Add: │ ✔ │ │ │
│ │ ╰───╯ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│ │
│ ││ Save ││ Cancel ││ │
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,28 @@
---
source: src/ui/radarr_ui/collections/collections_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Collection ▼ Number of Movies Root Folder Path Quality Profile Search on Add Monitored
=> Test Collection 1 /nfs/movies HD - 1080p Yes 🏷
╭───────────────── Filter ──────────────────╮
│Something │
╰─────────────────────────────────────────────╯
@@ -0,0 +1,31 @@
---
source: src/ui/radarr_ui/collections/collections_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Collection ▼ Number of Movies Root Folder Path Quality Profile Search on Add Monitored
=> Test Collection 1 /nfs/movies HD - 1080p Yes 🏷
╭─────────────── Error ───────────────╮
│The given filter produced empty results│
│ │
╰───────────────────────────────────────╯
@@ -0,0 +1,28 @@
---
source: src/ui/radarr_ui/collections/collections_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Collection ▼ Number of Movies Root Folder Path Quality Profile Search on Add Monitored
=> Test Collection 1 /nfs/movies HD - 1080p Yes 🏷
╭───────────────── Search ──────────────────╮
│Something │
╰─────────────────────────────────────────────╯
@@ -0,0 +1,31 @@
---
source: src/ui/radarr_ui/collections/collections_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Collection ▼ Number of Movies Root Folder Path Quality Profile Search on Add Monitored
=> Test Collection 1 /nfs/movies HD - 1080p Yes 🏷
╭─────────────── Error ───────────────╮
│ No items found matching search │
│ │
╰───────────────────────────────────────╯
@@ -0,0 +1,38 @@
---
source: src/ui/radarr_ui/collections/collections_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Collection ▼ Number of Movies Root Folder Path Quality Profile Search on Add Monitored
=> Test Collection 1 /nfs/movies HD - 1080p Yes 🏷
╭──────────────── Update All Collections ─────────────────╮
│ Do you want to update all of your collections? │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│╭────────────────────────────╮╭───────────────────────────╮│
││ Yes ││ No ││
│╰────────────────────────────╯╰───────────────────────────╯│
╰───────────────────────────────────────────────────────────╯
@@ -0,0 +1,5 @@
---
source: src/ui/radarr_ui/collections/collections_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
@@ -2,7 +2,7 @@
source: src/ui/radarr_ui/collections/collections_ui_tests.rs
expression: output
---
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Loading ...
@@ -2,7 +2,7 @@
source: src/ui/radarr_ui/collections/collections_ui_tests.rs
expression: output
---
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Loading ...
@@ -0,0 +1,8 @@
---
source: src/ui/radarr_ui/collections/collections_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Loading ...
@@ -1,28 +0,0 @@
---
source: src/ui/radarr_ui/collections/edit_collection_ui_tests.rs
expression: output
---
╭────────────────────── Edit - Test Collection ──────────────────────╮
│ │
│ │
│ │
│ ╭───╮ │
│ Monitored: ╰───╯ │
│ ╭───────────────────────────────╮ │
│ Minimum Availability: │Announced ▼ │ │
│ ╰───────────────────────────────╯ │
│ ╭───────────────────────────────╮ │
│ Quality Profile: │HD - 1080p ▼ │ │
│ ╰───────────────────────────────╯ │
│ ╭───────────────────────────────╮ │
│ Root Folder: ╰───────────────────────────────╯ │
│ ╭───╮ │
│ Search on Add: │ │ │
│ ╰───╯ │
╰──────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,44 @@
---
source: src/ui/radarr_ui/collections/edit_collection_ui_tests.rs
expression: output
---
╭─────────────────────────────────── Edit - Test Collection ────────────────────────────────────╮
│ Collection blah blah blah │
│ │
│ │
│ │
│ │
│ │
│ ╭───╮ │
│ Monitored: │ ✔ │ │
│ ╰───╯ │
│ ╭────────────────────────────────────────────╮ │
│ Minimum Availability: │Announced ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Quality Profile: │HD - 1080p ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Root Folder: │/nfs/movies │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭───╮ │
│ Search on Add: │ ✔ │ │
│ ╰───╯ │
│ │
│ │
│ │
│ │
│╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│
││ Save ││ Cancel ││
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,44 @@
---
source: src/ui/radarr_ui/collections/edit_collection_ui_tests.rs
expression: output
---
╭─────────────────────────────────── Edit - Test Collection ────────────────────────────────────╮
│ Collection blah blah blah │
│ │
│ │
│ │
│ │
│ │
│ ╭───╮ │
│ Monitored: │ ✔ │ │
│ ╰───╯ │
│ ╭────────────────────────────────────────────╮ │
│ Minimum Availability: │Announced ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Quality Profile: │HD - 1080p ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Root Folder: │/nfs/movies │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭───╮ │
│ Search on Add: │ ✔ │ │
│ ╰───╯ │
│ │
│ │
│ │
│ │
│╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│
││ Save ││ Cancel ││
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,44 @@
---
source: src/ui/radarr_ui/collections/edit_collection_ui_tests.rs
expression: output
---
╭─────────────────────────────────── Edit - Test Collection ────────────────────────────────────╮
│ Collection blah blah blah │
│ │
│ │
│ │
│ │
│ │
│ ╭───╮ │
│ Monitored: │ ✔ │ │
│ ╰───╯ │
│ ╭────────────────────────────────────────────╮ │
│ Minimum Availability: │Announced ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Quality Profile: │HD - 1080p ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Root Folder: │/nfs/movies │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭───╮ │
│ Search on Add: │ ✔ │ │
│ ╰───╯ │
│ │
│ │
│ │
│ │
│╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│
││ Save ││ Cancel ││
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,44 @@
---
source: src/ui/radarr_ui/collections/edit_collection_ui_tests.rs
expression: output
---
╭─────────────────────────────────── Edit - Test Collection ────────────────────────────────────╮
│ Collection blah blah blah │
│ │
│ │
│ │
│ │
│ │
│ ╭───╮ │
│ Monitored: │ ✔ │ │
│ ╰───╯ │
│ ╭────────────────────────────────────────────╮ │
│ Minimum Availability: │Announced ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Quality Profile: │HD - 1080p ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Root Folder: │/nfs/movies │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭───╮ │
│ Search on Add: │ ✔ │ │
│ ╰───╯ │
│ │
│ │
│ │
│ │
│╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│
││ Save ││ Cancel ││
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,44 @@
---
source: src/ui/radarr_ui/collections/edit_collection_ui_tests.rs
expression: output
---
╭─────────────────────────────────── Edit - Test Collection ────────────────────────────────────╮
│ Collection blah blah blah │
│ │
│ │
│ │
│ │
│ │
│ ╭───╮ │
│ Monitored: │ ✔ │ │
│ ╰───╯ │
│ ╭────────────────────────────────────────────╮ │
│ Minimum Availability: │Announced ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Quality Profile: │HD - 1080p ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Root Folder: │/nfs/movies │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭───╮ │
│ Search on Add: │ ✔ │ │
│ ╰───╯ │
│ │
│ │
│ │
│ │
│╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│
││ Save ││ Cancel ││
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,44 @@
---
source: src/ui/radarr_ui/collections/edit_collection_ui_tests.rs
expression: output
---
╭─────────────────────────────────── Edit - Test Collection ────────────────────────────────────╮
│ Collection blah blah blah │
│ │
│ │
│ │
│ │
│ │
│ ╭───╮ │
│ Monitored: │ ✔ │ │
│ ╰───╯ │
│ ╭────────────────────────────────────────────╮ │
│ Minimum Availability: │Announced ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Quality Profile: │HD - 1080p ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Root Folder: │/nfs/movies │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭───╮ │
│ Search on Add: │ ✔ │ │
│ ╰───╯ │
│ │
│ │
│ │
│ │
│╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│
││ Save ││ Cancel ││
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,44 @@
---
source: src/ui/radarr_ui/collections/edit_collection_ui_tests.rs
expression: output
---
╭─────────────────────────────────── Edit - Test Collection ────────────────────────────────────╮
│ Collection blah blah blah │
│ │
│ │
│ │
│ │
│ │
│ ╭───╮ │
│ Monitored: │ ✔ │ │
│ ╰───╯ │
│ ╭────────────────────────────────────────────╮ │
│ Minimum Availability: │Announced ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Quality Profile: │HD - 1080p ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Root Folder: │/nfs/movies │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭───╮ │
│ Search on Add: │ ✔ │ │
│ ╰───╯ │
│ │
│ │
│ │
│ │
│╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│
││ Save ││ Cancel ││
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,44 @@
---
source: src/ui/radarr_ui/collections/edit_collection_ui_tests.rs
expression: output
---
╭─────────────────────────────────── Edit - Test Collection ────────────────────────────────────╮
│ Collection blah blah blah │
│ │
│ │
│ │
│ │
│ │
│ ╭───╮ │
│ Monitored: │ ✔ │ │
│ ╰───╯ │
│ ╭────────────────────────────────────────────╮ │
│ Minimum Availability: │Announced ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Quality Profile: │HD - 1080p ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Root Folder: │/nfs/movies │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭───╮ │
│ Search on Add: │ ✔ │ │
│ ╰───╯ │
│ │
│ │
│ │
│ │
│╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│
││ Save ││ Cancel ││
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,44 @@
---
source: src/ui/radarr_ui/collections/edit_collection_ui_tests.rs
expression: output
---
╭─────────────────────────────────── Edit - Test Collection ────────────────────────────────────╮
│ Collection blah blah blah │
│ │
│ │
│ │
│ │
│ │
│ ╭───╮ │
│ Monitored: │ ✔ │ │
│ ╰───╯ │
│ ╭────────────────────────────────────────────╮ │
│ Minimum Availability: │Announced ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Quality Profile: │HD - 1080p ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Root Folder: │/nfs/movies │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭───╮ │
│ Search on Add: │ ✔ │ │
│ ╰───╯ │
│ │
│ │
│ │
│ │
│╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│
││ Save ││ Cancel ││
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,44 @@
---
source: src/ui/radarr_ui/collections/edit_collection_ui_tests.rs
expression: output
---
╭─────────────────────────────────── Edit - Test Collection ────────────────────────────────────╮
│ Collection blah blah blah │
│ │
│ │
│ │
│ │
│ │
│ ╭───╮ │
│ Monitored: │ ✔ │ │
│ ╰───╯ │
│ ╭────────────────────────────────────────────╮ │
│ Minimum Availability: │Announced ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Quality Profile: │HD - 1080p ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Root Folder: │/nfs/movies │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭───╮ │
│ Search on Add: │ ✔ │ │
│ ╰───╯ │
│ │
│ │
│ │
│ │
│╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│
││ Save ││ Cancel ││
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,44 @@
---
source: src/ui/radarr_ui/collections/edit_collection_ui_tests.rs
expression: output
---
╭─────────────────────────────────── Edit - Test Collection ────────────────────────────────────╮
│ Collection blah blah blah │
│ │
│ │
│ │
│ │
│ │
│ ╭───╮ │
│ Monitored: │ ✔ │ │
│ ╰───╯ │
│ ╭────────────────────────────────────────────╮ │
│ Minimum Availability: │Announced ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Quality Profile: │HD - 1080p ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Root Folder: │/nfs/movies │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭───╮ │
│ Search on Add: │ ✔ │ │
│ ╰───╯ │
│ │
│ │
│ │
│ │
│╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│
││ Save ││ Cancel ││
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,44 @@
---
source: src/ui/radarr_ui/collections/edit_collection_ui_tests.rs
expression: output
---
╭─────────────────────────────────── Edit - Test Collection ────────────────────────────────────╮
│ Collection blah blah blah │
│ │
│ │
│ │
│ │
│ │
│ ╭───╮ │
│ Monitored: │ ✔ │ │
│ ╰───╯ │
│ ╭────────────────────────────────────────────╮ │
│ Minimum Availability: │Announced ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Quality Profile: │HD - 1080p ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Root Folder: │/nfs/movies │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭───╮ │
│ Search on Add: │ ✔ │ │
│ ╰───╯ │
│ │
│ │
│ │
│ │
│╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│
││ Save ││ Cancel ││
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,44 @@
---
source: src/ui/radarr_ui/collections/edit_collection_ui_tests.rs
expression: output
---
╭─────────────────────────────────── Edit - Test Collection ────────────────────────────────────╮
│ Collection blah blah blah │
│ │
│ │
│ │
│ │
│ │
│ ╭───╮ │
│ Monitored: │ ✔ │ │
│ ╰───╯ │
│ ╭────────────────────────────────────────────╮ │
│ Minimum Availability: │Announced ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Quality Profile: │HD - 1080p ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Root Folder: │/nfs/movies │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭───╮ │
│ Search on Add: │ ✔ │ │
│ ╰───╯ │
│ │
│ │
│ │
│ │
│╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│
││ Save ││ Cancel ││
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,44 @@
---
source: src/ui/radarr_ui/collections/edit_collection_ui_tests.rs
expression: output
---
╭─────────────────────────────────── Edit - Test Collection ────────────────────────────────────╮
│ Collection blah blah blah │
│ │
│ │
│ │
│ │
│ │
│ ╭───╮ │
│ Monitored: │ ✔ │ │
│ ╰───╯ │
│ ╭────────────────────────────────────────────╮ │
│ Minimum Availability: │Announced ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Quality Profile: │HD - 1080p ▼ │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭────────────────────────────────────────────╮ │
│ Root Folder: │/nfs/movies │ │
│ ╰────────────────────────────────────────────╯ │
│ ╭───╮ │
│ Search on Add: │ ✔ │ │
│ ╰───╯ │
│ │
│ │
│ │
│ │
│╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│
││ Save ││ Cancel ││
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -3,12 +3,10 @@ mod tests {
use strum::IntoEnumIterator;
use crate::app::App;
use crate::models::radarr_models::DownloadRecord;
use crate::models::servarr_data::radarr::radarr_data::{ActiveRadarrBlock, DOWNLOADS_BLOCKS};
use crate::models::stateful_table::StatefulTable;
use crate::ui::DrawUi;
use crate::ui::radarr_ui::downloads::DownloadsUi;
use crate::ui::ui_test_utils::test_utils::render_to_string_with_app;
use crate::ui::ui_test_utils::test_utils::{TerminalSize, render_to_string_with_app};
#[test]
fn test_downloads_ui_accepts() {
@@ -21,62 +19,51 @@ mod tests {
});
}
#[test]
fn test_downloads_ui_renders_loading_state() {
let mut app = App::test_default();
app.is_loading = true;
app.push_navigation_stack(ActiveRadarrBlock::Downloads.into());
mod snapshot_tests {
use rstest::rstest;
use super::*;
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
DownloadsUi::draw(f, app, f.area());
});
#[test]
fn test_radarr_ui_renders_downloads_tab_loading() {
let mut app = App::test_default_fully_populated();
app.push_navigation_stack(ActiveRadarrBlock::Downloads.into());
app.is_loading = true;
insta::assert_snapshot!(output);
}
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
DownloadsUi::draw(f, app, f.area());
});
#[test]
fn test_downloads_ui_renders_empty_downloads() {
let mut app = App::test_default();
app.push_navigation_stack(ActiveRadarrBlock::Downloads.into());
app.data.radarr_data.downloads = StatefulTable::default();
insta::assert_snapshot!(output);
}
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
DownloadsUi::draw(f, app, f.area());
});
#[rstest]
fn test_radarr_ui_renders_downloads_tab(
#[values(
ActiveRadarrBlock::Downloads,
ActiveRadarrBlock::DeleteDownloadPrompt,
ActiveRadarrBlock::UpdateDownloadsPrompt,
)] active_radarr_block: ActiveRadarrBlock
) {
let mut app = App::test_default_fully_populated();
app.push_navigation_stack(active_radarr_block.into());
insta::assert_snapshot!(output);
}
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
DownloadsUi::draw(f, app, f.area());
});
#[test]
fn test_downloads_ui_renders_with_downloads() {
let mut app = App::test_default();
app.push_navigation_stack(ActiveRadarrBlock::Downloads.into());
app.data.radarr_data.downloads = StatefulTable::default();
app.data.radarr_data.downloads.set_items(vec![
DownloadRecord {
id: 1,
movie_id: 1,
title: "Test Movie Download".to_owned(),
status: "downloading".to_owned(),
size: 1024 * 1024 * 1024,
sizeleft: 512 * 1024 * 1024,
..DownloadRecord::default()
},
DownloadRecord {
id: 2,
movie_id: 2,
title: "Another Movie Download".to_owned(),
status: "completed".to_owned(),
size: 2048 * 1024 * 1024,
sizeleft: 0,
..DownloadRecord::default()
},
]);
insta::assert_snapshot!(active_radarr_block.to_string(), output);
}
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
DownloadsUi::draw(f, app, f.area());
});
#[test]
fn test_radarr_ui_renders_downloads_tab_empty() {
let mut app = App::test_default();
app.push_navigation_stack(ActiveRadarrBlock::Downloads.into());
insta::assert_snapshot!(output);
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
DownloadsUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
}
}
@@ -1,8 +0,0 @@
---
source: src/ui/radarr_ui/downloads/downloads_ui_tests.rs
expression: output
---
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Title Percent Compl Size Output Path Indexer Download Client
=> Test Movie Download 50% 1.00 GB
Another Movie Download 100% 2.00 GB
@@ -0,0 +1,38 @@
---
source: src/ui/radarr_ui/downloads/downloads_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Title Percent Complete Size Output Path Indexer Download Client
=> Test Download Title 50% 3.30 GB /nfs/movies/Test kickass torrents transmission
╭──────────────────── Cancel Download ────────────────────╮
│ Do you really want to delete this download: │
│ Test Download Title? │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│╭────────────────────────────╮╭───────────────────────────╮│
││ Yes ││ No ││
│╰────────────────────────────╯╰───────────────────────────╯│
╰───────────────────────────────────────────────────────────╯
@@ -0,0 +1,7 @@
---
source: src/ui/radarr_ui/downloads/downloads_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Title Percent Complete Size Output Path Indexer Download Client
=> Test Download Title 50% 3.30 GB /nfs/movies/Test kickass torrents transmission
@@ -0,0 +1,38 @@
---
source: src/ui/radarr_ui/downloads/downloads_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Title Percent Complete Size Output Path Indexer Download Client
=> Test Download Title 50% 3.30 GB /nfs/movies/Test kickass torrents transmission
╭─────────────────── Update Downloads ────────────────────╮
│ Do you want to update your downloads? │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│╭────────────────────────────╮╭───────────────────────────╮│
││ Yes ││ No ││
│╰────────────────────────────╯╰───────────────────────────╯│
╰───────────────────────────────────────────────────────────╯
@@ -2,4 +2,4 @@
source: src/ui/radarr_ui/downloads/downloads_ui_tests.rs
expression: output
---
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
@@ -2,7 +2,7 @@
source: src/ui/radarr_ui/downloads/downloads_ui_tests.rs
expression: output
---
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Loading ...
@@ -4,16 +4,13 @@ mod tests {
use crate::app::App;
use crate::models::BlockSelectionState;
use crate::models::servarr_data::modals::EditIndexerModal;
use crate::models::servarr_data::radarr::radarr_data::{
ActiveRadarrBlock, EDIT_INDEXER_BLOCKS, EDIT_INDEXER_TORRENT_SELECTION_BLOCKS,
};
use crate::models::servarr_models::{Indexer, IndexerField};
use crate::models::stateful_table::StatefulTable;
use crate::models::servarr_models::{Indexer};
use crate::ui::DrawUi;
use crate::ui::radarr_ui::indexers::edit_indexer_ui::EditIndexerUi;
use crate::ui::ui_test_utils::test_utils::render_to_string_with_app;
use serde_json::json;
use crate::ui::ui_test_utils::test_utils::{TerminalSize, render_to_string_with_app};
#[test]
fn test_edit_indexer_ui_accepts() {
@@ -26,40 +23,41 @@ mod tests {
});
}
#[test]
fn test_edit_indexer_ui_renders_edit_indexer_modal() {
let mut app = App::test_default();
app.push_navigation_stack(ActiveRadarrBlock::EditIndexerNameInput.into());
app.data.radarr_data.indexers = StatefulTable::default();
app.data.radarr_data.indexers.set_items(vec![Indexer {
id: 1,
name: Some("Test Indexer".to_owned()),
enable_rss: true,
priority: 25,
fields: Some(vec![
IndexerField {
name: Some("baseUrl".to_owned()),
value: Some(json!("https://test.indexer.com")),
},
IndexerField {
name: Some("apiKey".to_owned()),
value: Some(json!("test-api-key")),
},
IndexerField {
name: Some("seedCriteria.seedRatio".to_owned()),
value: Some(json!(1.0)),
},
]),
..Indexer::default()
}]);
app.data.radarr_data.selected_block =
BlockSelectionState::new(EDIT_INDEXER_TORRENT_SELECTION_BLOCKS);
app.data.radarr_data.edit_indexer_modal = Some(EditIndexerModal::from(&app.data.radarr_data));
mod snapshot_tests {
use crate::models::servarr_data::radarr::radarr_data::EDIT_INDEXER_NZB_SELECTION_BLOCKS;
use crate::network::radarr_network::radarr_network_test_utils::test_utils::indexer;
use super::*;
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
EditIndexerUi::draw(f, app, f.area());
});
#[test]
fn test_edit_indexer_ui_renders_edit_indexer_modal_torrent() {
let mut app = App::test_default_fully_populated();
app.data.radarr_data.selected_block =
BlockSelectionState::new(EDIT_INDEXER_TORRENT_SELECTION_BLOCKS);
app.push_navigation_stack(ActiveRadarrBlock::EditIndexerPrompt.into());
insta::assert_snapshot!(output);
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
EditIndexerUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
#[test]
fn test_edit_indexer_ui_renders_edit_indexer_modal_usenet() {
let mut app = App::test_default_fully_populated();
app.data.radarr_data.indexers.set_items(vec![Indexer {
protocol: "usenet".to_owned(),
..indexer()
}]);
app.data.radarr_data.selected_block =
BlockSelectionState::new(EDIT_INDEXER_NZB_SELECTION_BLOCKS);
app.push_navigation_stack(ActiveRadarrBlock::EditIndexerPrompt.into());
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
EditIndexerUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
}
}
}
@@ -4,13 +4,12 @@ mod tests {
use crate::app::App;
use crate::models::BlockSelectionState;
use crate::models::radarr_models::IndexerSettings;
use crate::models::servarr_data::radarr::radarr_data::{
ActiveRadarrBlock, INDEXER_SETTINGS_BLOCKS, INDEXER_SETTINGS_SELECTION_BLOCKS,
};
use crate::ui::DrawUi;
use crate::ui::radarr_ui::indexers::indexer_settings_ui::IndexerSettingsUi;
use crate::ui::ui_test_utils::test_utils::render_to_string_with_app;
use crate::ui::ui_test_utils::test_utils::{TerminalSize, render_to_string_with_app};
#[test]
fn test_indexer_settings_ui_accepts() {
@@ -23,18 +22,20 @@ mod tests {
});
}
#[test]
fn test_indexer_settings_ui_renders_indexer_settings() {
let mut app = App::test_default();
app.push_navigation_stack(ActiveRadarrBlock::IndexerSettingsMinimumAgeInput.into());
app.data.radarr_data.selected_block =
BlockSelectionState::new(INDEXER_SETTINGS_SELECTION_BLOCKS);
app.data.radarr_data.indexer_settings = Some(IndexerSettings::default());
mod snapshot_tests {
use super::*;
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
IndexerSettingsUi::draw(f, app, f.area());
});
#[test]
fn test_indexer_settings_ui_renders_indexer_settings() {
let mut app = App::test_default_fully_populated();
app.push_navigation_stack(ActiveRadarrBlock::IndexerSettingsMinimumAgeInput.into());
app.data.radarr_data.selected_block = BlockSelectionState::new(INDEXER_SETTINGS_SELECTION_BLOCKS);
insta::assert_snapshot!(output);
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
IndexerSettingsUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
}
}
}
+92 -55
View File
@@ -6,11 +6,10 @@ mod tests {
use crate::models::servarr_data::radarr::radarr_data::{
ActiveRadarrBlock, EDIT_INDEXER_BLOCKS, INDEXER_SETTINGS_BLOCKS, INDEXERS_BLOCKS,
};
use crate::models::servarr_models::Indexer;
use crate::models::stateful_table::StatefulTable;
use crate::ui::DrawUi;
use crate::ui::radarr_ui::indexers::IndexersUi;
use crate::ui::ui_test_utils::test_utils::render_to_string_with_app;
use crate::ui::ui_test_utils::test_utils::{TerminalSize, render_to_string_with_app};
#[test]
fn test_indexers_ui_accepts() {
@@ -29,59 +28,97 @@ mod tests {
});
}
#[test]
fn test_indexers_ui_renders_loading_state() {
let mut app = App::test_default();
app.is_loading = true;
app.push_navigation_stack(ActiveRadarrBlock::Indexers.into());
mod snapshot_tests {
use super::*;
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
IndexersUi::draw(f, app, f.area());
});
#[test]
fn test_indexers_ui_renders_indexers_tab_loading() {
let mut app = App::test_default_fully_populated();
app.is_loading = true;
app.push_navigation_stack(ActiveRadarrBlock::Indexers.into());
insta::assert_snapshot!(output);
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
IndexersUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
#[test]
fn test_indexers_ui_renders_indexers_tab_empty_indexers() {
let mut app = App::test_default_fully_populated();
app.push_navigation_stack(ActiveRadarrBlock::Indexers.into());
app.data.radarr_data.indexers = StatefulTable::default();
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
IndexersUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
#[test]
fn test_indexers_ui_renders_indexers_tab() {
let mut app = App::test_default_fully_populated();
app.push_navigation_stack(ActiveRadarrBlock::Indexers.into());
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
IndexersUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
#[test]
fn test_indexers_ui_renders_test_indexer_loading() {
let mut app = App::test_default_fully_populated();
app.data.radarr_data.indexer_test_errors = None;
app.push_navigation_stack(ActiveRadarrBlock::TestIndexer.into());
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
IndexersUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
#[test]
fn test_indexers_ui_renders_test_indexer_success() {
let mut app = App::test_default_fully_populated();
app.push_navigation_stack(ActiveRadarrBlock::TestIndexer.into());
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
IndexersUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
#[test]
fn test_indexers_ui_renders_test_indexer_error() {
let mut app = App::test_default_fully_populated();
app.push_navigation_stack(ActiveRadarrBlock::TestIndexer.into());
app.data.radarr_data.indexer_test_errors =
Some("Connection timeout: Unable to reach indexer".to_owned());
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
IndexersUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
#[test]
fn test_indexers_ui_renders_delete_indexer_prompt() {
let mut app = App::test_default_fully_populated();
app.push_navigation_stack(ActiveRadarrBlock::DeleteIndexerPrompt.into());
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
IndexersUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
}
#[test]
fn test_indexers_ui_renders_empty_indexers() {
let mut app = App::test_default();
app.push_navigation_stack(ActiveRadarrBlock::Indexers.into());
app.data.radarr_data.indexers = StatefulTable::default();
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
IndexersUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
#[test]
fn test_indexers_ui_renders_with_indexers() {
let mut app = App::test_default();
app.push_navigation_stack(ActiveRadarrBlock::Indexers.into());
app.data.radarr_data.indexers = StatefulTable::default();
app.data.radarr_data.indexers.set_items(vec![
Indexer {
id: 1,
name: Some("Test Indexer 1".to_owned()),
enable_rss: true,
enable_automatic_search: true,
enable_interactive_search: true,
priority: 25,
..Indexer::default()
},
Indexer {
id: 2,
name: Some("Test Indexer 2".to_owned()),
enable_rss: false,
..Indexer::default()
},
]);
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
IndexersUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
}
}
@@ -1,27 +0,0 @@
---
source: src/ui/radarr_ui/indexers/edit_indexer_ui_tests.rs
expression: output
---
╭───────────────────────────────── Edit Indexer ─────────────────────────────────╮
│ │
│ ╭─────────────────╮ ╭─────────────────╮ │
│ Name: ╰─────────────────╯ URL: ╰─────────────────╯ │
│ ╭───╮ ╭─────────────────╮ │
│ ╭───╮ API Key: ╰─────────────────╯ │
│ Enable Automatic Se╰───╯ ╭─────────────────╮ │
│ ╭───╮ Tags: ╰─────────────────╯ │
│ ╭─────────────────╮ │
│ Indexer Priority ▴▾╰─────────────────╯ │
│ │
│ ╭──────────────────╮╭───────────────────╮ │
│ │ Save ││ Cancel │ │
│ ╰──────────────────╯╰───────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,42 @@
---
source: src/ui/radarr_ui/indexers/edit_indexer_ui_tests.rs
expression: output
---
╭──────────────────────────────────────────────── Edit Indexer ─────────────────────────────────────────────────╮
│ │
│ ╭─────────────────────────╮ ╭─────────────────────────╮ │
│ Name: │DrunkenSlug │ URL: │http://127.0.0.1:9696/1/ │ │
│ ╰─────────────────────────╯ ╰─────────────────────────╯ │
│ ╭───╮ ╭─────────────────────────╮ │
│ Enable RSS: │ ✔ │ API Key: │someApiKey │ │
│ ╰───╯ ╰─────────────────────────╯ │
│ ╭───╮ ╭─────────────────────────╮ │
│ Enable Automatic Search: │ ✔ │ Seed Ratio: │ratio │ │
│ ╰───╯ ╰─────────────────────────╯ │
│ ╭───╮ ╭─────────────────────────╮ │
│ Enable Interactive Search: │ ✔ │ Tags: │25 │ │
│ ╰───╯ ╰─────────────────────────╯ │
│ ╭─────────────────────────╮ │
│ Indexer Priority ▴▾: │1 │ │
│ ╰─────────────────────────╯ │
│ │
│ │
│ │
│ │
│ ╭───────────────────────────╮╭──────────────────────────╮ │
│ │ Save ││ Cancel │ │
│ ╰───────────────────────────╯╰──────────────────────────╯ │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,42 @@
---
source: src/ui/radarr_ui/indexers/edit_indexer_ui_tests.rs
expression: output
---
╭──────────────────────────────────────────────── Edit Indexer ─────────────────────────────────────────────────╮
│ │
│ ╭─────────────────────────╮ ╭─────────────────────────╮ │
│ Name: │DrunkenSlug │ URL: │http://127.0.0.1:9696/1/ │ │
│ ╰─────────────────────────╯ ╰─────────────────────────╯ │
│ ╭───╮ ╭─────────────────────────╮ │
│ Enable RSS: │ ✔ │ API Key: │someApiKey │ │
│ ╰───╯ ╰─────────────────────────╯ │
│ ╭───╮ ╭─────────────────────────╮ │
│ Enable Automatic Search: │ ✔ │ Tags: │25 │ │
│ ╰───╯ ╰─────────────────────────╯ │
│ ╭───╮ ╭─────────────────────────╮ │
│ Enable Interactive Search: │ ✔ │ Indexer Priority ▴▾: │1 │ │
│ ╰───╯ ╰─────────────────────────╯ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ ╭───────────────────────────╮╭──────────────────────────╮ │
│ │ Save ││ Cancel │ │
│ ╰───────────────────────────╯╰──────────────────────────╯ │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -1,27 +0,0 @@
---
source: src/ui/radarr_ui/indexers/indexer_settings_ui_tests.rs
expression: output
---
╭──────────────────────── Configure All Indexer Settings ────────────────────────╮
│ │
│ ╭─────────────────╮ ╭─────────────────╮ │
│ Minimum Age (minute╰─────────────────╯ Availability Delay ╰─────────────────╯ │
│ ╭─────────────────╮ ╭─────────────────╮ │
│ Retention (days) ▴▾╰─────────────────╯ RSS Sync Interval (╰─────────────────╯ │
│ ╭─────────────────╮ ╭─────────────────╮ │
│ Maximum Size (MB) ▴╰─────────────────╯ Whitelisted Subtitl╰─────────────────╯ │
│ ╭───╮ ╭───╮ │
│ Prefer Indexer Flag╰───╯ Allow Hardcoded Sub╰───╯ │
│ │
│ ╭──────────────────╮╭───────────────────╮ │
│ │ Save ││ Cancel │ │
│ ╰──────────────────╯╰───────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,42 @@
---
source: src/ui/radarr_ui/indexers/indexer_settings_ui_tests.rs
expression: output
---
╭─────────────────────────────────────── Configure All Indexer Settings ────────────────────────────────────────╮
│ │
│ ╭─────────────────────────╮ ╭─────────────────────────╮ │
│ Minimum Age (minutes) ▴▾: │12 │ Availability Delay (days) │0 │ │
│ ╰─────────────────────────╯ ╰─────────────────────────╯ │
│ ╭─────────────────────────╮ ╭─────────────────────────╮ │
│ Retention (days) ▴▾: │30 │ RSS Sync Interval (minutes│60 │ │
│ ╰─────────────────────────╯ ╰─────────────────────────╯ │
│ ╭─────────────────────────╮ ╭─────────────────────────╮ │
│ Maximum Size (MB) ▴▾: │1234 │ Whitelisted Subtitle Tags:│eng │ │
│ ╰─────────────────────────╯ ╰─────────────────────────╯ │
│ ╭───╮ ╭───╮ │
│ Prefer Indexer Flags: │ ✔ │ Allow Hardcoded Subs: │ ✔ │ │
│ ╰───╯ ╰───╯ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ ╭───────────────────────────╮╭──────────────────────────╮ │
│ │ Save ││ Cancel │ │
│ ╰───────────────────────────╯╰──────────────────────────╯ │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -1,8 +0,0 @@
---
source: src/ui/radarr_ui/indexers/indexers_ui_tests.rs
expression: output
---
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Indexer RSS Automatic Search Interactive Sea Priority Tags
=> Test Indexer 1 Enabled Enabled Enabled 25
Test Indexer 2 Disabled Disabled Disabled 0
@@ -0,0 +1,38 @@
---
source: src/ui/radarr_ui/indexers/indexers_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Indexer ▼ RSS Automatic Search Interactive Search Priority Tags
=> Test Indexer Enabled Enabled Enabled 25 alex
╭──────────────────── Delete Indexer ─────────────────────╮
│ Do you really want to delete this indexer: │
│ Test Indexer? │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│╭────────────────────────────╮╭───────────────────────────╮│
││ Yes ││ No ││
│╰────────────────────────────╯╰───────────────────────────╯│
╰───────────────────────────────────────────────────────────╯
@@ -0,0 +1,7 @@
---
source: src/ui/radarr_ui/indexers/indexers_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Indexer ▼ RSS Automatic Search Interactive Search Priority Tags
=> Test Indexer Enabled Enabled Enabled 25 alex
@@ -2,4 +2,4 @@
source: src/ui/radarr_ui/indexers/indexers_ui_tests.rs
expression: output
---
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
@@ -2,7 +2,7 @@
source: src/ui/radarr_ui/indexers/indexers_ui_tests.rs
expression: output
---
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Loading ...
@@ -0,0 +1,35 @@
---
source: src/ui/radarr_ui/indexers/indexers_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Indexer ▼ RSS Automatic Search Interactive Search Priority Tags
=> Test Indexer Enabled Enabled Enabled 25 alex
╭─────────────── Error ───────────────╮
│ Connection timeout: Unable to reach │
│ indexer │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
╰───────────────────────────────────────╯
@@ -0,0 +1,35 @@
---
source: src/ui/radarr_ui/indexers/indexers_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Indexer ▼ RSS Automatic Search Interactive Search Priority Tags
=> Test Indexer Enabled Enabled Enabled 25 alex
╭ Testing Indexer ────────────────────╮
│ │
│ │
│ Loading ... │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
╰───────────────────────────────────────╯
@@ -0,0 +1,35 @@
---
source: src/ui/radarr_ui/indexers/indexers_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Indexer ▼ RSS Automatic Search Interactive Search Priority Tags
=> Test Indexer Enabled Enabled Enabled 25 alex
╭─────────────── Error ───────────────╮
│ error │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
╰───────────────────────────────────────╯
@@ -2,29 +2,47 @@
source: src/ui/radarr_ui/indexers/test_all_indexers_ui_tests.rs
expression: output
---
╭ Test All Indexers ───────────────────────────────────────────────────────────────────╮
│ │
│ │
│ Loading ...
╰────────────────────────────────────────────────────────────────────────────────────────╯
╭ Test All Indexers ─────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Loading ...
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -20,6 +20,8 @@ mod tests {
}
mod snapshot_tests {
use crate::ui::ui_test_utils::test_utils::TerminalSize;
use super::*;
#[test]
@@ -28,7 +30,7 @@ mod tests {
app.is_loading = true;
app.push_navigation_stack(ActiveRadarrBlock::TestAllIndexers.into());
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
TestAllIndexersUi::draw(f, app, f.area());
});
+2 -2
View File
@@ -104,7 +104,7 @@ fn draw_add_movie_search(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
.unwrap_or_default()
.value
.as_f64()
.unwrap();
.unwrap_or_default();
let rotten_tomatoes_rating = movie
.ratings
.rotten_tomatoes
@@ -112,7 +112,7 @@ fn draw_add_movie_search(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
.unwrap_or_default()
.value
.as_u64()
.unwrap();
.unwrap_or_default();
let imdb_rating = if imdb_rating == 0.0 {
String::new()
} else {
+54 -26
View File
@@ -3,11 +3,10 @@ mod tests {
use strum::IntoEnumIterator;
use crate::app::App;
use crate::models::HorizontallyScrollableText;
use crate::models::servarr_data::radarr::radarr_data::{ADD_MOVIE_BLOCKS, ActiveRadarrBlock};
use crate::ui::DrawUi;
use crate::ui::radarr_ui::library::add_movie_ui::AddMovieUi;
use crate::ui::ui_test_utils::test_utils::render_to_string_with_app;
use crate::ui::ui_test_utils::test_utils::{TerminalSize, render_to_string_with_app};
#[test]
fn test_add_movie_ui_accepts() {
@@ -20,30 +19,59 @@ mod tests {
});
}
#[test]
fn test_add_movie_ui_renders_loading_state() {
let mut app = App::test_default();
app.is_loading = true;
app.push_navigation_stack(ActiveRadarrBlock::AddMovieSearchInput.into());
app.data.radarr_data.add_movie_search = Some(HorizontallyScrollableText::default());
mod snapshot_tests {
use rstest::rstest;
use crate::models::BlockSelectionState;
use crate::models::servarr_data::radarr::radarr_data::ADD_MOVIE_SELECTION_BLOCKS;
use super::*;
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
AddMovieUi::draw(f, app, f.area());
});
#[test]
fn test_add_movie_ui_renders_loading_for_search() {
let mut app = App::test_default_fully_populated();
app.data.radarr_data.add_searched_movies = None;
app.push_navigation_stack(ActiveRadarrBlock::AddMovieSearchResults.into());
insta::assert_snapshot!(output);
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
AddMovieUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
#[rstest]
#[case(ActiveRadarrBlock::AddMovieSearchInput, None)]
#[case(ActiveRadarrBlock::AddMovieSearchResults, None)]
#[case(ActiveRadarrBlock::AddMovieEmptySearchResults, None)]
#[case(ActiveRadarrBlock::AddMoviePrompt, None)]
#[case(ActiveRadarrBlock::AddMovieSelectMinimumAvailability, None)]
#[case(ActiveRadarrBlock::AddMovieSelectMonitor, None)]
#[case(ActiveRadarrBlock::AddMovieSelectQualityProfile, None)]
#[case(ActiveRadarrBlock::AddMovieSelectRootFolder, None)]
#[case(ActiveRadarrBlock::AddMovieAlreadyInLibrary, None)]
#[case(ActiveRadarrBlock::AddMovieTagsInput, None)]
#[case(ActiveRadarrBlock::AddMoviePrompt, Some(ActiveRadarrBlock::CollectionDetails))]
#[case(ActiveRadarrBlock::AddMovieSelectMinimumAvailability, Some(ActiveRadarrBlock::CollectionDetails))]
#[case(ActiveRadarrBlock::AddMovieSelectMonitor, Some(ActiveRadarrBlock::CollectionDetails))]
#[case(ActiveRadarrBlock::AddMovieSelectQualityProfile, Some(ActiveRadarrBlock::CollectionDetails))]
#[case(ActiveRadarrBlock::AddMovieSelectRootFolder, Some(ActiveRadarrBlock::CollectionDetails))]
#[case(ActiveRadarrBlock::AddMovieTagsInput, Some(ActiveRadarrBlock::CollectionDetails))]
fn test_add_movie_ui_renders(
#[case] active_radarr_block: ActiveRadarrBlock,
#[case] context: Option<ActiveRadarrBlock>
) {
let mut app = App::test_default_fully_populated();
app.push_navigation_stack((active_radarr_block, context).into());
app.data.radarr_data.selected_block = BlockSelectionState::new(ADD_MOVIE_SELECTION_BLOCKS);
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
AddMovieUi::draw(f, app, f.area());
});
if let Some(context) = context {
insta::assert_snapshot!(format!("{}_{}", active_radarr_block.to_string(), context.to_string()), output);
} else {
insta::assert_snapshot!(active_radarr_block.to_string(), output);
}
}
}
#[test]
fn test_add_movie_ui_renders_search_input() {
let mut app = App::test_default();
app.push_navigation_stack(ActiveRadarrBlock::AddMovieSearchInput.into());
app.data.radarr_data.add_movie_search = Some(HorizontallyScrollableText::default());
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
AddMovieUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
}
}
@@ -1,18 +1,15 @@
#[cfg(test)]
mod tests {
use bimap::BiMap;
use strum::IntoEnumIterator;
use crate::app::App;
use crate::models::BlockSelectionState;
use crate::models::radarr_models::Movie;
use crate::models::servarr_data::radarr::radarr_data::{
ActiveRadarrBlock, DELETE_MOVIE_BLOCKS, DELETE_MOVIE_SELECTION_BLOCKS,
};
use crate::models::stateful_table::StatefulTable;
use crate::ui::DrawUi;
use crate::ui::radarr_ui::library::delete_movie_ui::DeleteMovieUi;
use crate::ui::ui_test_utils::test_utils::render_to_string_with_app;
use crate::ui::ui_test_utils::test_utils::{TerminalSize, render_to_string_with_app};
#[test]
fn test_delete_movie_ui_accepts() {
@@ -25,24 +22,20 @@ mod tests {
});
}
#[test]
fn test_delete_movie_ui_renders_delete_movie_prompt() {
let mut app = App::test_default();
app.push_navigation_stack(ActiveRadarrBlock::DeleteMoviePrompt.into());
app.data.radarr_data.quality_profile_map = BiMap::from_iter(vec![(0, "Any".to_owned())]);
app.data.radarr_data.selected_block = BlockSelectionState::new(DELETE_MOVIE_SELECTION_BLOCKS);
app.data.radarr_data.movies = StatefulTable::default();
app.data.radarr_data.movies.set_items(vec![Movie {
id: 1,
title: "Test Movie".into(),
quality_profile_id: 0,
..Movie::default()
}]);
mod snapshot_tests {
use super::*;
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
DeleteMovieUi::draw(f, app, f.area());
});
#[test]
fn test_delete_movie_ui_renders_delete_movie_prompt() {
let mut app = App::test_default_fully_populated();
app.push_navigation_stack(ActiveRadarrBlock::DeleteMoviePrompt.into());
app.data.radarr_data.selected_block = BlockSelectionState::new(DELETE_MOVIE_SELECTION_BLOCKS);
insta::assert_snapshot!(output);
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
DeleteMovieUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
}
}
}
+34 -26
View File
@@ -1,19 +1,15 @@
#[cfg(test)]
mod tests {
use bimap::BiMap;
use strum::IntoEnumIterator;
use crate::app::App;
use crate::models::BlockSelectionState;
use crate::models::radarr_models::Movie;
use crate::models::servarr_data::radarr::modals::EditMovieModal;
use crate::models::servarr_data::radarr::radarr_data::{
ActiveRadarrBlock, EDIT_MOVIE_BLOCKS, EDIT_MOVIE_SELECTION_BLOCKS,
};
use crate::models::stateful_table::StatefulTable;
use crate::ui::DrawUi;
use crate::ui::radarr_ui::library::edit_movie_ui::EditMovieUi;
use crate::ui::ui_test_utils::test_utils::render_to_string_with_app;
use crate::ui::ui_test_utils::test_utils::{TerminalSize, render_to_string_with_app};
#[test]
fn test_edit_movie_ui_accepts() {
@@ -26,27 +22,39 @@ mod tests {
});
}
#[test]
fn test_edit_movie_ui_renders_edit_movie_modal() {
let mut app = App::test_default();
app.push_navigation_stack(ActiveRadarrBlock::EditMoviePathInput.into());
app.data.radarr_data.quality_profile_map =
BiMap::from_iter(vec![(1, "HD - 1080p".to_owned()), (2, "Any".to_owned())]);
app.data.radarr_data.selected_block = BlockSelectionState::new(EDIT_MOVIE_SELECTION_BLOCKS);
app.data.radarr_data.movies = StatefulTable::default();
app.data.radarr_data.movies.set_items(vec![Movie {
id: 1,
title: "Test Movie".into(),
path: "/movies/test".into(),
quality_profile_id: 1,
..Movie::default()
}]);
app.data.radarr_data.edit_movie_modal = Some(EditMovieModal::from(&app.data.radarr_data));
mod snapshot_tests {
use rstest::rstest;
use super::*;
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
EditMovieUi::draw(f, app, f.area());
});
#[rstest]
#[case(ActiveRadarrBlock::EditMoviePrompt, None, 0)]
#[case(ActiveRadarrBlock::EditMoviePrompt, Some(ActiveRadarrBlock::MovieDetails), 0)]
#[case(ActiveRadarrBlock::EditMoviePrompt, Some(ActiveRadarrBlock::MovieHistory), 1)]
#[case(ActiveRadarrBlock::EditMoviePrompt, Some(ActiveRadarrBlock::FileInfo), 2)]
#[case(ActiveRadarrBlock::EditMoviePrompt, Some(ActiveRadarrBlock::Cast), 3)]
#[case(ActiveRadarrBlock::EditMoviePrompt, Some(ActiveRadarrBlock::Crew), 4)]
#[case(ActiveRadarrBlock::EditMoviePrompt, Some(ActiveRadarrBlock::ManualSearch), 5)]
fn test_edit_movie_ui_renders_edit_movie_modal(
#[case] active_radarr_block: ActiveRadarrBlock,
#[case] context: Option<ActiveRadarrBlock>,
#[case] index: usize,
) {
let mut app = App::test_default_fully_populated();
app.push_navigation_stack((active_radarr_block, context).into());
if context.is_some() {
app.data.radarr_data.movie_info_tabs.set_index(index);
}
app.data.radarr_data.selected_block = BlockSelectionState::new(EDIT_MOVIE_SELECTION_BLOCKS);
insta::assert_snapshot!(output);
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
EditMovieUi::draw(f, app, f.area());
});
if let Some(context) = context {
insta::assert_snapshot!(format!("{}_{}", active_radarr_block.to_string(), context.to_string()), output);
} else {
insta::assert_snapshot!(active_radarr_block.to_string(), output);
}
}
}
}
}
+96 -1
View File
@@ -2,12 +2,14 @@
mod tests {
use strum::IntoEnumIterator;
use crate::app::App;
use crate::models::servarr_data::radarr::radarr_data::{
ADD_MOVIE_BLOCKS, ActiveRadarrBlock, DELETE_MOVIE_BLOCKS, EDIT_MOVIE_BLOCKS, LIBRARY_BLOCKS,
MOVIE_DETAILS_BLOCKS,
};
use crate::ui::DrawUi;
use crate::ui::radarr_ui::library::LibraryUi;
use crate::ui::ui_test_utils::test_utils::{TerminalSize, render_to_string_with_app};
#[test]
fn test_library_ui_accepts() {
@@ -26,4 +28,97 @@ mod tests {
}
});
}
}
mod snapshot_tests {
use rstest::rstest;
use crate::models::BlockSelectionState;
use crate::models::servarr_data::radarr::radarr_data::{ADD_MOVIE_SELECTION_BLOCKS, EDIT_MOVIE_SELECTION_BLOCKS};
use super::*;
#[test]
fn test_library_ui_renders_library_tab_loading() {
let mut app = App::test_default_fully_populated();
app.is_loading = true;
app.push_navigation_stack(ActiveRadarrBlock::Movies.into());
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
LibraryUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
#[test]
fn test_library_ui_renders_library_tab_empty_movies() {
let mut app = App::test_default();
app.push_navigation_stack(ActiveRadarrBlock::Movies.into());
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
LibraryUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
#[rstest]
fn test_library_ui_renders_library_tab(
#[values(
ActiveRadarrBlock::Movies,
ActiveRadarrBlock::MoviesSortPrompt,
ActiveRadarrBlock::SearchMovie,
ActiveRadarrBlock::SearchMovieError,
ActiveRadarrBlock::FilterMovies,
ActiveRadarrBlock::FilterMoviesError,
ActiveRadarrBlock::UpdateAllMoviesPrompt,
)] active_radarr_block: ActiveRadarrBlock,
) {
let mut app = App::test_default_fully_populated();
app.push_navigation_stack(active_radarr_block.into());
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
LibraryUi::draw(f, app, f.area());
});
insta::assert_snapshot!(active_radarr_block.to_string(), output);
}
#[rstest]
fn test_library_movie_ui_renders_add_movie_ui(
#[values(
ActiveRadarrBlock::AddMovieSearchInput,
ActiveRadarrBlock::AddMovieSearchResults,
ActiveRadarrBlock::AddMovieEmptySearchResults,
ActiveRadarrBlock::AddMoviePrompt,
ActiveRadarrBlock::AddMovieSelectMinimumAvailability,
ActiveRadarrBlock::AddMovieSelectMonitor,
ActiveRadarrBlock::AddMovieSelectQualityProfile,
ActiveRadarrBlock::AddMovieSelectRootFolder,
ActiveRadarrBlock::AddMovieAlreadyInLibrary,
ActiveRadarrBlock::AddMovieTagsInput,
)] active_radarr_block: ActiveRadarrBlock,
) {
let mut app = App::test_default_fully_populated();
app.push_navigation_stack(active_radarr_block.into());
app.data.radarr_data.selected_block = BlockSelectionState::new(ADD_MOVIE_SELECTION_BLOCKS);
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
LibraryUi::draw(f, app, f.area());
});
insta::assert_snapshot!(active_radarr_block.to_string(), output);
}
#[test]
fn test_edit_movie_ui_renders_edit_movie_modal() {
let mut app = App::test_default_fully_populated();
app.push_navigation_stack(ActiveRadarrBlock::EditMoviePrompt.into());
app.data.radarr_data.selected_block = BlockSelectionState::new(EDIT_MOVIE_SELECTION_BLOCKS);
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
LibraryUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
}
}
+2 -2
View File
@@ -409,12 +409,12 @@ fn draw_movie_releases(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
.clone()
.unwrap_or(Number::from(0u64))
.as_u64()
.unwrap();
.unwrap_or_default();
let leechers = leechers
.clone()
.unwrap_or(Number::from(0u64))
.as_u64()
.unwrap();
.unwrap_or_default();
decorate_peer_style(
seeders,
@@ -1,22 +1,18 @@
#[cfg(test)]
mod tests {
use bimap::BiMap;
use pretty_assertions::assert_eq;
use ratatui::style::Style;
use rstest::rstest;
use strum::IntoEnumIterator;
use crate::app::App;
use crate::models::radarr_models::{Movie, RadarrRelease};
use crate::models::servarr_data::radarr::modals::MovieDetailsModal;
use crate::models::servarr_data::radarr::radarr_data::{ActiveRadarrBlock, MOVIE_DETAILS_BLOCKS};
use crate::models::stateful_table::StatefulTable;
use crate::ui::DrawUi;
use crate::ui::radarr_ui::library::movie_details_ui::{
MovieDetailsUi, style_from_download_status,
};
use crate::ui::styles::ManagarrStyle;
use crate::ui::ui_test_utils::test_utils::render_to_string_with_app;
use crate::ui::ui_test_utils::test_utils::{TerminalSize, render_to_string_with_app};
#[test]
fn test_movie_details_ui_accepts() {
@@ -49,98 +45,70 @@ mod tests {
);
}
#[test]
fn test_movie_details_ui_renders_loading_state() {
let mut app = App::test_default();
app.is_loading = true;
app.push_navigation_stack(ActiveRadarrBlock::MovieDetails.into());
app.data.radarr_data.movies = StatefulTable::default();
mod snapshot_tests {
use super::*;
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
MovieDetailsUi::draw(f, app, f.area());
});
#[rstest]
#[case(ActiveRadarrBlock::MovieDetails, None, 0)]
#[case(ActiveRadarrBlock::MovieDetails, Some(ActiveRadarrBlock::AutomaticallySearchMoviePrompt), 0)]
#[case(ActiveRadarrBlock::MovieDetails, Some(ActiveRadarrBlock::UpdateAndScanPrompt), 0)]
#[case(ActiveRadarrBlock::MovieHistory, None, 1)]
#[case(ActiveRadarrBlock::MovieHistory, Some(ActiveRadarrBlock::AutomaticallySearchMoviePrompt), 1)]
#[case(ActiveRadarrBlock::MovieHistory, Some(ActiveRadarrBlock::UpdateAndScanPrompt), 1)]
#[case(ActiveRadarrBlock::FileInfo, None, 2)]
#[case(ActiveRadarrBlock::FileInfo, Some(ActiveRadarrBlock::AutomaticallySearchMoviePrompt), 2)]
#[case(ActiveRadarrBlock::FileInfo, Some(ActiveRadarrBlock::UpdateAndScanPrompt), 2)]
#[case(ActiveRadarrBlock::Cast, None, 3)]
#[case(ActiveRadarrBlock::Cast, Some(ActiveRadarrBlock::AutomaticallySearchMoviePrompt), 3)]
#[case(ActiveRadarrBlock::Cast, Some(ActiveRadarrBlock::UpdateAndScanPrompt), 3)]
#[case(ActiveRadarrBlock::Crew, None, 4)]
#[case(ActiveRadarrBlock::Crew, Some(ActiveRadarrBlock::AutomaticallySearchMoviePrompt), 4)]
#[case(ActiveRadarrBlock::Crew, Some(ActiveRadarrBlock::UpdateAndScanPrompt), 4)]
#[case(ActiveRadarrBlock::ManualSearch, None, 5)]
#[case(ActiveRadarrBlock::ManualSearch, Some(ActiveRadarrBlock::AutomaticallySearchMoviePrompt), 5)]
#[case(ActiveRadarrBlock::ManualSearch, Some(ActiveRadarrBlock::UpdateAndScanPrompt), 5)]
#[case(ActiveRadarrBlock::ManualSearchSortPrompt, None, 5)]
#[case(ActiveRadarrBlock::ManualSearchConfirmPrompt, None, 5)]
fn test_movie_details_ui_renders_movie_details_tab(
#[case] active_radarr_block: ActiveRadarrBlock,
#[case] context: Option<ActiveRadarrBlock>,
#[case] index: usize
) {
let mut app = App::test_default_fully_populated();
app.push_navigation_stack((active_radarr_block, context).into());
app.data.radarr_data.movie_info_tabs.set_index(index);
insta::assert_snapshot!(output);
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
MovieDetailsUi::draw(f, app, f.area());
});
if let Some(context) = context {
insta::assert_snapshot!(format!("movie_details_render_{active_radarr_block}_{context}"), output);
} else {
insta::assert_snapshot!(format!("movie_details_render_{active_radarr_block}"), output);
}
}
#[rstest]
fn test_movie_details_ui_renders_movie_details_tabs_loading(
#[values(
ActiveRadarrBlock::MovieDetails,
ActiveRadarrBlock::MovieHistory,
ActiveRadarrBlock::FileInfo,
ActiveRadarrBlock::Cast,
ActiveRadarrBlock::Crew,
ActiveRadarrBlock::ManualSearch,
)] active_radarr_block: ActiveRadarrBlock
) {
let mut app = App::test_default();
app.is_loading = true;
app.push_navigation_stack(active_radarr_block.into());
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
MovieDetailsUi::draw(f, app, f.area());
});
insta::assert_snapshot!(format!("movie_details_loading_{active_radarr_block}"), output);
}
}
#[test]
fn test_movie_details_ui_renders_movie_details_tab() {
let mut app = App::test_default();
app.push_navigation_stack(ActiveRadarrBlock::MovieDetails.into());
app.data.radarr_data.quality_profile_map =
BiMap::from_iter(vec![(2222, "HD - 1080p".to_owned())]);
app.data.radarr_data.movies = StatefulTable::default();
app.data.radarr_data.movies.set_items(vec![Movie {
id: 1,
title: "Test Movie".into(),
..Movie::default()
}]);
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
MovieDetailsUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
#[test]
fn test_movie_details_ui_renders_movie_history_tab() {
let mut app = App::test_default();
app.push_navigation_stack(ActiveRadarrBlock::MovieDetails.into());
app.data.radarr_data.quality_profile_map =
BiMap::from_iter(vec![(2222, "HD - 1080p".to_owned())]);
app.data.radarr_data.movies = StatefulTable::default();
app.data.radarr_data.movies.set_items(vec![Movie {
id: 1,
title: "Test Movie".into(),
..Movie::default()
}]);
app.data.radarr_data.movie_info_tabs.set_index(1);
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
MovieDetailsUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
#[test]
fn test_movie_details_ui_renders_manual_search_tab() {
let mut app = App::test_default();
app.push_navigation_stack(ActiveRadarrBlock::MovieDetails.into());
app.data.radarr_data.quality_profile_map =
BiMap::from_iter(vec![(2222, "HD - 1080p".to_owned())]);
app.data.radarr_data.movies = StatefulTable::default();
app.data.radarr_data.movies.set_items(vec![Movie {
id: 1,
title: "Test Movie".into(),
..Movie::default()
}]);
app.data.radarr_data.movie_details_modal = Some(MovieDetailsModal::default());
app
.data
.radarr_data
.movie_details_modal
.as_mut()
.unwrap()
.movie_releases = StatefulTable::default();
app
.data
.radarr_data
.movie_details_modal
.as_mut()
.unwrap()
.movie_releases
.set_items(vec![RadarrRelease {
title: "Test Release".into(),
..RadarrRelease::default()
}]);
app.data.radarr_data.movie_info_tabs.set_index(2);
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
MovieDetailsUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
}
}
@@ -1,29 +0,0 @@
---
source: src/ui/radarr_ui/library/add_movie_ui_tests.rs
expression: output
---
╭──────────────────────────────────── Add Movie ─────────────────────────────────────╮
│ │
╰──────────────────────────────────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────╯
@@ -1,29 +0,0 @@
---
source: src/ui/radarr_ui/library/add_movie_ui_tests.rs
expression: output
---
╭──────────────────────────────────── Add Movie ─────────────────────────────────────╮
│ │
╰──────────────────────────────────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,47 @@
---
source: src/ui/radarr_ui/library/add_movie_ui_tests.rs
expression: output
---
╭───────────────────────────────────────────────────── Add Movie ──────────────────────────────────────────────────────╮
│test │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✔ Title Year Runtime IMDB Rotten Tomatoes Genres │
│=> ✔ Test 2023 2h 0m 9.9 99% cool, family, fun │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ ╭─────────────── Error ───────────────╮ │
│ │ This film is already in your library │ │
│ │ │ │
│ ╰───────────────────────────────────────╯ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,47 @@
---
source: src/ui/radarr_ui/library/add_movie_ui_tests.rs
expression: output
---
╭───────────────────────────────────────────────────── Add Movie ──────────────────────────────────────────────────────╮
│test │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ ╭─────────────── Error ───────────────╮ │
│ │ No movies found matching your query! │ │
│ │ │ │
│ ╰───────────────────────────────────────╯ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,47 @@
---
source: src/ui/radarr_ui/library/add_movie_ui_tests.rs
expression: output
---
╭───────────────────────────────────────────────────── Add Movie ──────────────────────────────────────────────────────╮
│test │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭───────────╭────────────────────────────────────── Add Movie - Test ───────────────────────────────────────╮──────────╮
│ ✔ Title│ New movie blah blah blah │ │
│=> ✔ Test │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Root Folder: │/nfs ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Monitor: │Movie only ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Minimum Availability: │Announced ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Quality Profile: │HD - 1080p ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Tags: │alex │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│ │
│ ││ Add ││ Cancel ││ │
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,48 @@
---
source: src/ui/radarr_ui/library/add_movie_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Collection ▼ Number of Movies Root Folder Path Quality Profile Search on Add Monitored
=> Test Collection 1 /nfs/movies HD - 1080p Yes 🏷
╭ Test Collection ───────────────────────────────────────────────────────────────────────────────────────────────────────╮
│Overview: Collection blah blah blah │
│Root Folder Path: /nfs/movies │
│Quality Profile: HD - 1080p │
│Minimum Avai╭────────────────────────────────────── Add Movie - Test ───────────────────────────────────────╮ │
│Monitored: Y│ Collection blah blah blah │ │
│Search on Ad│ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ Movies ──│ │───────────│
│ ✔ Title │ ╭────────────────────────────────────────────╮ │ │
│=> ✔ Test │ Root Folder: │/nfs ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Monitor: │Movie only ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Minimum Availability: │Announced ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Quality Profile: │HD - 1080p ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Tags: │alex │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│ │
│ ││ Add ││ Cancel ││ │
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,47 @@
---
source: src/ui/radarr_ui/library/add_movie_ui_tests.rs
expression: output
---
╭───────────────────────────────────────────────────── Add Movie ──────────────────────────────────────────────────────╮
│test │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,47 @@
---
source: src/ui/radarr_ui/library/add_movie_ui_tests.rs
expression: output
---
╭───────────────────────────────────────────────────── Add Movie ──────────────────────────────────────────────────────╮
│test │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✔ Title Year Runtime IMDB Rotten Tomatoes Genres │
│=> ✔ Test 2023 2h 0m 9.9 99% cool, family, fun │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,47 @@
---
source: src/ui/radarr_ui/library/add_movie_ui_tests.rs
expression: output
---
╭───────────────────────────────────────────────────── Add Movie ──────────────────────────────────────────────────────╮
│test │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭───────────╭────────────────────────────────────── Add Movie - Test ───────────────────────────────────────╮──────────╮
│ ✔ Title│ New movie blah blah blah │ │
│=> ✔ Test │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ ╭───────────────────────────────╮ ▼ │ │ │
│ │ │Announced │───────────────────────────╯ │ │
│ │ │In Cinemas │───────────────────────────╮ │ │
│ │ │Released │ ▼ │ │ │
│ │ │TBA │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ Minimum│ │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ Qu│ │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ │ │ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ ╰───────────────────────────────╯ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│ │
│ ││ Add ││ Cancel ││ │
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,48 @@
---
source: src/ui/radarr_ui/library/add_movie_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Collection ▼ Number of Movies Root Folder Path Quality Profile Search on Add Monitored
=> Test Collection 1 /nfs/movies HD - 1080p Yes 🏷
╭ Test Collection ───────────────────────────────────────────────────────────────────────────────────────────────────────╮
│Overview: Collection blah blah blah │
│Root Folder Path: /nfs/movies │
│Quality Profile: HD - 1080p │
│Minimum Avai╭────────────────────────────────────── Add Movie - Test ───────────────────────────────────────╮ │
│Monitored: Y│ Collection blah blah blah │ │
│Search on Ad│ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ Movies ──│ │───────────│
│ ✔ Title │ ╭────────────────────────────────────────────╮ │ │
│=> ✔ Test │ ╭───────────────────────────────╮ ▼ │ │ │
│ │ │Announced │───────────────────────────╯ │ │
│ │ │In Cinemas │───────────────────────────╮ │ │
│ │ │Released │ ▼ │ │ │
│ │ │TBA │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ Minimum│ │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ Qu│ │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ │ │ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ ╰───────────────────────────────╯ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│ │
│ ││ Add ││ Cancel ││ │
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,47 @@
---
source: src/ui/radarr_ui/library/add_movie_ui_tests.rs
expression: output
---
╭───────────────────────────────────────────────────── Add Movie ──────────────────────────────────────────────────────╮
│test │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭───────────╭────────────────────────────────────── Add Movie - Test ───────────────────────────────────────╮──────────╮
│ ✔ Title│ New movie blah blah blah │ │
│=> ✔ Test │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ ╭───────────────────────────────╮ ▼ │ │ │
│ │ │Movie only │───────────────────────────╯ │ │
│ │ │Movie and Collection │───────────────────────────╮ │ │
│ │ │None │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ Minimum│ │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ Qu│ │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ │ │ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ ╰───────────────────────────────╯ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│ │
│ ││ Add ││ Cancel ││ │
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,48 @@
---
source: src/ui/radarr_ui/library/add_movie_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Collection ▼ Number of Movies Root Folder Path Quality Profile Search on Add Monitored
=> Test Collection 1 /nfs/movies HD - 1080p Yes 🏷
╭ Test Collection ───────────────────────────────────────────────────────────────────────────────────────────────────────╮
│Overview: Collection blah blah blah │
│Root Folder Path: /nfs/movies │
│Quality Profile: HD - 1080p │
│Minimum Avai╭────────────────────────────────────── Add Movie - Test ───────────────────────────────────────╮ │
│Monitored: Y│ Collection blah blah blah │ │
│Search on Ad│ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ Movies ──│ │───────────│
│ ✔ Title │ ╭────────────────────────────────────────────╮ │ │
│=> ✔ Test │ ╭───────────────────────────────╮ ▼ │ │ │
│ │ │Movie only │───────────────────────────╯ │ │
│ │ │Movie and Collection │───────────────────────────╮ │ │
│ │ │None │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ Minimum│ │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ Qu│ │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ │ │ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ ╰───────────────────────────────╯ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│ │
│ ││ Add ││ Cancel ││ │
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,47 @@
---
source: src/ui/radarr_ui/library/add_movie_ui_tests.rs
expression: output
---
╭───────────────────────────────────────────────────── Add Movie ──────────────────────────────────────────────────────╮
│test │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭───────────╭────────────────────────────────────── Add Movie - Test ───────────────────────────────────────╮──────────╮
│ ✔ Title│ New movie blah blah blah │ │
│=> ✔ Test │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ ╭───────────────────────────────╮ ▼ │ │ │
│ │ │HD - 1080p │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ │ │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ Minimum│ │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ Qu│ │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ │ │ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ ╰───────────────────────────────╯ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│ │
│ ││ Add ││ Cancel ││ │
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,48 @@
---
source: src/ui/radarr_ui/library/add_movie_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Collection ▼ Number of Movies Root Folder Path Quality Profile Search on Add Monitored
=> Test Collection 1 /nfs/movies HD - 1080p Yes 🏷
╭ Test Collection ───────────────────────────────────────────────────────────────────────────────────────────────────────╮
│Overview: Collection blah blah blah │
│Root Folder Path: /nfs/movies │
│Quality Profile: HD - 1080p │
│Minimum Avai╭────────────────────────────────────── Add Movie - Test ───────────────────────────────────────╮ │
│Monitored: Y│ Collection blah blah blah │ │
│Search on Ad│ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ Movies ──│ │───────────│
│ ✔ Title │ ╭────────────────────────────────────────────╮ │ │
│=> ✔ Test │ ╭───────────────────────────────╮ ▼ │ │ │
│ │ │HD - 1080p │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ │ │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ Minimum│ │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ Qu│ │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ │ │ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ ╰───────────────────────────────╯ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│ │
│ ││ Add ││ Cancel ││ │
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,47 @@
---
source: src/ui/radarr_ui/library/add_movie_ui_tests.rs
expression: output
---
╭───────────────────────────────────────────────────── Add Movie ──────────────────────────────────────────────────────╮
│test │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭───────────╭────────────────────────────────────── Add Movie - Test ───────────────────────────────────────╮──────────╮
│ ✔ Title│ New movie blah blah blah │ │
│=> ✔ Test │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ ╭───────────────────────────────╮ ▼ │ │ │
│ │ │/nfs │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ │ │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ Minimum│ │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ Qu│ │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ │ │ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ ╰───────────────────────────────╯ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│ │
│ ││ Add ││ Cancel ││ │
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,48 @@
---
source: src/ui/radarr_ui/library/add_movie_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Collection ▼ Number of Movies Root Folder Path Quality Profile Search on Add Monitored
=> Test Collection 1 /nfs/movies HD - 1080p Yes 🏷
╭ Test Collection ───────────────────────────────────────────────────────────────────────────────────────────────────────╮
│Overview: Collection blah blah blah │
│Root Folder Path: /nfs/movies │
│Quality Profile: HD - 1080p │
│Minimum Avai╭────────────────────────────────────── Add Movie - Test ───────────────────────────────────────╮ │
│Monitored: Y│ Collection blah blah blah │ │
│Search on Ad│ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ Movies ──│ │───────────│
│ ✔ Title │ ╭────────────────────────────────────────────╮ │ │
│=> ✔ Test │ ╭───────────────────────────────╮ ▼ │ │ │
│ │ │/nfs │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ │ │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ Minimum│ │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ Qu│ │ ▼ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ │ │───────────────────────────╮ │ │
│ │ │ │ │ │ │
│ │ │ │───────────────────────────╯ │ │
│ │ ╰───────────────────────────────╯ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│ │
│ ││ Add ││ Cancel ││ │
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,47 @@
---
source: src/ui/radarr_ui/library/add_movie_ui_tests.rs
expression: output
---
╭───────────────────────────────────────────────────── Add Movie ──────────────────────────────────────────────────────╮
│test │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭───────────╭────────────────────────────────────── Add Movie - Test ───────────────────────────────────────╮──────────╮
│ ✔ Title│ New movie blah blah blah │ │
│=> ✔ Test │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Root Folder: │/nfs ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Monitor: │Movie only ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Minimum Availability: │Announced ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Quality Profile: │HD - 1080p ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Tags: │alex │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│ │
│ ││ Add ││ Cancel ││ │
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -0,0 +1,48 @@
---
source: src/ui/radarr_ui/library/add_movie_ui_tests.rs
expression: output
---
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Collection ▼ Number of Movies Root Folder Path Quality Profile Search on Add Monitored
=> Test Collection 1 /nfs/movies HD - 1080p Yes 🏷
╭ Test Collection ───────────────────────────────────────────────────────────────────────────────────────────────────────╮
│Overview: Collection blah blah blah │
│Root Folder Path: /nfs/movies │
│Quality Profile: HD - 1080p │
│Minimum Avai╭────────────────────────────────────── Add Movie - Test ───────────────────────────────────────╮ │
│Monitored: Y│ Collection blah blah blah │ │
│Search on Ad│ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ Movies ──│ │───────────│
│ ✔ Title │ ╭────────────────────────────────────────────╮ │ │
│=> ✔ Test │ Root Folder: │/nfs ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Monitor: │Movie only ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Minimum Availability: │Announced ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Quality Profile: │HD - 1080p ▼ │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ ╭────────────────────────────────────────────╮ │ │
│ │ Tags: │alex │ │ │
│ │ ╰────────────────────────────────────────────╯ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │╭───────────────────────────────────────────────╮╭──────────────────────────────────────────────╮│ │
│ ││ Add ││ Cancel ││ │
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Some files were not shown because too many files have changed in this diff Show More