Compare commits
10 Commits
8ef291efd8
...
368f7505ff
| Author | SHA1 | Date | |
|---|---|---|---|
| 368f7505ff | |||
| 6a9fd0999c | |||
|
|
d8ac94d067 | ||
| 0532d59746 | |||
| e0fcbc71e1 | |||
| c072c57bbb | |||
| aadd6c8abf | |||
| 316ed64315 | |||
| 7084ca1be2 | |||
| 317daddb8e |
@@ -7,8 +7,5 @@ echo "Running pre-push hook:"
|
|||||||
echo "Executing: cargo fmt"
|
echo "Executing: cargo fmt"
|
||||||
cargo fmt
|
cargo fmt
|
||||||
|
|
||||||
echo "Executing: make lint"
|
echo "Executing: cargo clippy --all"
|
||||||
make lint
|
cargo clippy --all
|
||||||
|
|
||||||
echo "Executing: cargo test"
|
|
||||||
cargo test
|
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ echo "Running pre-push hook:"
|
|||||||
echo "Executing: cargo fmt --check"
|
echo "Executing: cargo fmt --check"
|
||||||
cargo fmt --check
|
cargo fmt --check
|
||||||
|
|
||||||
echo "Executing: make lint"
|
echo "Executing: cargo clippy --all"
|
||||||
make lint
|
cargo clippy --all
|
||||||
|
|
||||||
echo "Executing: cargo test"
|
echo "Executing: cargo test --all"
|
||||||
cargo test
|
cargo test --all
|
||||||
|
|||||||
+3
-1
@@ -91,4 +91,6 @@ name = "managarr"
|
|||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
lto = true
|
lto = true
|
||||||
codegen-units = 1
|
codegen-units = 3
|
||||||
|
opt-level = "s"
|
||||||
|
strip = true
|
||||||
|
|||||||
@@ -12,4 +12,3 @@ coverage:
|
|||||||
|
|
||||||
ignore:
|
ignore:
|
||||||
- "**/*_tests.rs"
|
- "**/*_tests.rs"
|
||||||
- "src/ui"
|
|
||||||
|
|||||||
@@ -53,11 +53,13 @@ doctest:
|
|||||||
proptest:
|
proptest:
|
||||||
@cargo test proptest
|
@cargo test proptest
|
||||||
|
|
||||||
|
alias test-snapshots := snapshot-tests
|
||||||
# Run all snapshot tests
|
# Run all snapshot tests
|
||||||
[group: 'test']
|
[group: 'test']
|
||||||
snapshot-tests:
|
snapshot-tests:
|
||||||
@cargo test snapshot
|
@cargo test snapshot
|
||||||
|
|
||||||
|
alias review := snapshot-review
|
||||||
# Review snapshot test changes
|
# Review snapshot test changes
|
||||||
[group: 'test']
|
[group: 'test']
|
||||||
@snapshot-review:
|
@snapshot-review:
|
||||||
@@ -65,6 +67,14 @@ snapshot-tests:
|
|||||||
cargo insta -h > /dev/null 2>&1 || cargo install cargo-insta
|
cargo insta -h > /dev/null 2>&1 || cargo install cargo-insta
|
||||||
cargo insta review
|
cargo insta review
|
||||||
|
|
||||||
|
alias clean-orphaned-snapshots := snapshot-delete-unreferenced
|
||||||
|
# Delete any unreferenced snapshots
|
||||||
|
[group: 'test']
|
||||||
|
@snapshot-delete-unreferenced:
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
cargo insta -h > /dev/null 2>&1 || cargo install cargo-insta
|
||||||
|
cargo insta test --unreferenced=delete
|
||||||
|
|
||||||
# Build and run the binary for the current system
|
# Build and run the binary for the current system
|
||||||
run:
|
run:
|
||||||
@cargo run
|
@cargo run
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ mod tests {
|
|||||||
assert_eq!(app.tick_until_poll, 400);
|
assert_eq!(app.tick_until_poll, 400);
|
||||||
assert_eq!(app.ticks_until_scroll, 4);
|
assert_eq!(app.ticks_until_scroll, 4);
|
||||||
assert_eq!(app.tick_count, 0);
|
assert_eq!(app.tick_count, 0);
|
||||||
|
assert_eq!(app.ui_scroll_tick_count, 0);
|
||||||
assert!(!app.is_loading);
|
assert!(!app.is_loading);
|
||||||
assert!(!app.is_routing);
|
assert!(!app.is_routing);
|
||||||
assert!(!app.should_refresh);
|
assert!(!app.should_refresh);
|
||||||
@@ -240,6 +241,27 @@ mod tests {
|
|||||||
assert_eq!(app.tick_count, 0);
|
assert_eq!(app.tick_count, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_on_ui_scroll_tick() {
|
||||||
|
let mut app = App {
|
||||||
|
ticks_until_scroll: 1,
|
||||||
|
..App::default()
|
||||||
|
};
|
||||||
|
|
||||||
|
assert_eq!(app.ui_scroll_tick_count, 0);
|
||||||
|
assert_eq!(app.tick_count, 0);
|
||||||
|
|
||||||
|
app.on_ui_scroll_tick();
|
||||||
|
|
||||||
|
assert_eq!(app.ui_scroll_tick_count, 1);
|
||||||
|
assert_eq!(app.tick_count, 0);
|
||||||
|
|
||||||
|
app.on_ui_scroll_tick();
|
||||||
|
|
||||||
|
assert_eq!(app.ui_scroll_tick_count, 0);
|
||||||
|
assert_eq!(app.tick_count, 0);
|
||||||
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_on_tick_first_render() {
|
async fn test_on_tick_first_render() {
|
||||||
let (sync_network_tx, mut sync_network_rx) = mpsc::channel::<NetworkEvent>(500);
|
let (sync_network_tx, mut sync_network_rx) = mpsc::channel::<NetworkEvent>(500);
|
||||||
|
|||||||
+34
-1
@@ -21,7 +21,6 @@ use crate::models::{HorizontallyScrollableText, Route, TabRoute, TabState};
|
|||||||
use crate::network::NetworkEvent;
|
use crate::network::NetworkEvent;
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
#[path = "app_tests.rs"]
|
|
||||||
mod app_tests;
|
mod app_tests;
|
||||||
pub mod context_clues;
|
pub mod context_clues;
|
||||||
pub mod key_binding;
|
pub mod key_binding;
|
||||||
@@ -40,6 +39,7 @@ pub struct App<'a> {
|
|||||||
pub tick_until_poll: u64,
|
pub tick_until_poll: u64,
|
||||||
pub ticks_until_scroll: u64,
|
pub ticks_until_scroll: u64,
|
||||||
pub tick_count: u64,
|
pub tick_count: u64,
|
||||||
|
pub ui_scroll_tick_count: u64,
|
||||||
pub is_routing: bool,
|
pub is_routing: bool,
|
||||||
pub is_loading: bool,
|
pub is_loading: bool,
|
||||||
pub should_refresh: bool,
|
pub should_refresh: bool,
|
||||||
@@ -146,6 +146,14 @@ impl App<'_> {
|
|||||||
self.tick_count = 0;
|
self.tick_count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn on_ui_scroll_tick(&mut self) {
|
||||||
|
if self.ui_scroll_tick_count == self.ticks_until_scroll {
|
||||||
|
self.ui_scroll_tick_count = 0;
|
||||||
|
} else {
|
||||||
|
self.ui_scroll_tick_count += 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub fn reset(&mut self) {
|
pub fn reset(&mut self) {
|
||||||
self.reset_tick_count();
|
self.reset_tick_count();
|
||||||
@@ -228,6 +236,7 @@ impl Default for App<'_> {
|
|||||||
tick_until_poll: 400,
|
tick_until_poll: 400,
|
||||||
ticks_until_scroll: 4,
|
ticks_until_scroll: 4,
|
||||||
tick_count: 0,
|
tick_count: 0,
|
||||||
|
ui_scroll_tick_count: 0,
|
||||||
is_loading: false,
|
is_loading: false,
|
||||||
is_routing: false,
|
is_routing: false,
|
||||||
should_refresh: false,
|
should_refresh: false,
|
||||||
@@ -259,6 +268,30 @@ impl App<'_> {
|
|||||||
..App::default()
|
..App::default()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn test_default_fully_populated() -> Self {
|
||||||
|
App {
|
||||||
|
data: Data {
|
||||||
|
radarr_data: RadarrData::test_default_fully_populated(),
|
||||||
|
sonarr_data: SonarrData::test_default_fully_populated(),
|
||||||
|
},
|
||||||
|
server_tabs: TabState::new(vec![
|
||||||
|
TabRoute {
|
||||||
|
title: "Radarr".to_owned(),
|
||||||
|
route: ActiveRadarrBlock::Movies.into(),
|
||||||
|
contextual_help: None,
|
||||||
|
config: Some(ServarrConfig::default()),
|
||||||
|
},
|
||||||
|
TabRoute {
|
||||||
|
title: "Sonarr".to_owned(),
|
||||||
|
route: ActiveSonarrBlock::Series.into(),
|
||||||
|
contextual_help: None,
|
||||||
|
config: Some(ServarrConfig::default()),
|
||||||
|
},
|
||||||
|
]),
|
||||||
|
..App::default()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
use anyhow::Result;
|
||||||
use std::sync::mpsc;
|
use std::sync::mpsc;
|
||||||
use std::sync::mpsc::Receiver;
|
use std::sync::mpsc::Receiver;
|
||||||
use std::thread;
|
use std::thread;
|
||||||
@@ -49,7 +50,10 @@ impl Events {
|
|||||||
Events { rx }
|
Events { rx }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn next(&self) -> Result<InputEvent<Key>, mpsc::RecvError> {
|
pub fn next(&self) -> Result<Option<InputEvent<Key>>> {
|
||||||
self.rx.recv()
|
match self.rx.try_recv() {
|
||||||
|
Ok(event) => Ok(Some(event)),
|
||||||
|
_ => Ok(None),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -130,7 +130,7 @@ pub fn handle_events(key: Key, app: &mut App<'_>) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn populate_keymapping_table(app: &mut App<'_>) {
|
pub fn populate_keymapping_table(app: &mut App<'_>) {
|
||||||
let context_clue_to_keybinding_item = |key: &KeyBinding, desc: &&str| {
|
let context_clue_to_keybinding_item = |key: &KeyBinding, desc: &&str| {
|
||||||
let (key, alt_key) = if key.alt.is_some() {
|
let (key, alt_key) = if key.alt.is_some() {
|
||||||
(key.key.to_string(), key.alt.as_ref().unwrap().to_string())
|
(key.key.to_string(), key.alt.as_ref().unwrap().to_string())
|
||||||
|
|||||||
+3
-2
@@ -249,7 +249,7 @@ async fn start_ui(
|
|||||||
terminal.draw(|f| ui(f, &mut app))?;
|
terminal.draw(|f| ui(f, &mut app))?;
|
||||||
|
|
||||||
match input_events.next()? {
|
match input_events.next()? {
|
||||||
InputEvent::KeyEvent(key) => {
|
Some(InputEvent::KeyEvent(key)) => {
|
||||||
if key == Key::Char('q') && !app.ignore_special_keys_for_textbox_input {
|
if key == Key::Char('q') && !app.ignore_special_keys_for_textbox_input {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -257,7 +257,8 @@ async fn start_ui(
|
|||||||
handlers::handle_events(key, &mut app);
|
handlers::handle_events(key, &mut app);
|
||||||
}
|
}
|
||||||
|
|
||||||
InputEvent::Tick => app.on_tick().await,
|
Some(InputEvent::Tick) => app.on_tick().await,
|
||||||
|
_ => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
#[macro_export]
|
||||||
|
macro_rules! sort_option {
|
||||||
|
($field:ident) => {
|
||||||
|
SortOption {
|
||||||
|
name: "Something",
|
||||||
|
cmp_fn: Some(|a, b| a.$field.cmp(&b.$field)),
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -5,7 +5,8 @@ pub mod radarr;
|
|||||||
pub mod sonarr;
|
pub mod sonarr;
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
#[path = "servarr_data_tests.rs"]
|
pub(in crate::models::servarr_data) mod data_test_utils;
|
||||||
|
#[cfg(test)]
|
||||||
mod servarr_data_tests;
|
mod servarr_data_tests;
|
||||||
|
|
||||||
#[derive(Clone, Copy, PartialEq, Eq, Debug, Default)]
|
#[derive(Clone, Copy, PartialEq, Eq, Debug, Default)]
|
||||||
|
|||||||
@@ -25,6 +25,23 @@ use bimap::BiMap;
|
|||||||
use chrono::{DateTime, Utc};
|
use chrono::{DateTime, Utc};
|
||||||
use serde_json::Number;
|
use serde_json::Number;
|
||||||
use strum::EnumIter;
|
use strum::EnumIter;
|
||||||
|
#[cfg(test)]
|
||||||
|
use {
|
||||||
|
crate::models::radarr_models::{MinimumAvailability, MovieMonitor},
|
||||||
|
crate::models::stateful_table::SortOption,
|
||||||
|
crate::network::radarr_network::radarr_network_test_utils::test_utils::root_folder,
|
||||||
|
crate::network::radarr_network::radarr_network_test_utils::test_utils::{
|
||||||
|
add_movie_search_result, blocklist_item, cast_credit, collection, collection_movie,
|
||||||
|
crew_credit, download_record, indexer, log_line, movie, movie_history_item,
|
||||||
|
quality_profile_map, tags_map, task, torrent_release, updates, usenet_release,
|
||||||
|
},
|
||||||
|
crate::network::servarr_test_utils::diskspace,
|
||||||
|
crate::network::servarr_test_utils::indexer_test_result,
|
||||||
|
crate::network::servarr_test_utils::queued_event,
|
||||||
|
crate::sort_option,
|
||||||
|
strum::IntoEnumIterator,
|
||||||
|
strum_macros::{Display, EnumString},
|
||||||
|
};
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
#[path = "radarr_data_tests.rs"]
|
#[path = "radarr_data_tests.rs"]
|
||||||
@@ -223,7 +240,163 @@ impl<'a> Default for RadarrData<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
impl RadarrData<'_> {
|
||||||
|
pub fn test_default_fully_populated() -> Self {
|
||||||
|
let quality_profile_name = "HD - 1080p".to_owned();
|
||||||
|
let mut add_movie_modal = AddMovieModal {
|
||||||
|
tags: "alex".into(),
|
||||||
|
..AddMovieModal::default()
|
||||||
|
};
|
||||||
|
add_movie_modal
|
||||||
|
.root_folder_list
|
||||||
|
.set_items(vec![root_folder()]);
|
||||||
|
add_movie_modal
|
||||||
|
.monitor_list
|
||||||
|
.set_items(MovieMonitor::iter().collect());
|
||||||
|
add_movie_modal
|
||||||
|
.minimum_availability_list
|
||||||
|
.set_items(MinimumAvailability::iter().collect());
|
||||||
|
add_movie_modal
|
||||||
|
.quality_profile_list
|
||||||
|
.set_items(vec![quality_profile_name.clone()]);
|
||||||
|
|
||||||
|
let mut add_movie_search_result_table = StatefulTable::default();
|
||||||
|
add_movie_search_result_table.set_items(vec![add_movie_search_result()]);
|
||||||
|
add_movie_search_result_table.sorting(vec![sort_option!(tmdb_id)]);
|
||||||
|
add_movie_search_result_table.search = Some("something".into());
|
||||||
|
add_movie_search_result_table.filter = Some("something".into());
|
||||||
|
|
||||||
|
let mut edit_movie_modal = EditMovieModal {
|
||||||
|
monitored: Some(true),
|
||||||
|
path: "/nfs/movies".into(),
|
||||||
|
tags: "alex".into(),
|
||||||
|
..EditMovieModal::default()
|
||||||
|
};
|
||||||
|
edit_movie_modal
|
||||||
|
.minimum_availability_list
|
||||||
|
.set_items(MinimumAvailability::iter().collect());
|
||||||
|
edit_movie_modal
|
||||||
|
.quality_profile_list
|
||||||
|
.set_items(vec![quality_profile_name.clone()]);
|
||||||
|
|
||||||
|
let mut edit_collection_modal = EditCollectionModal {
|
||||||
|
monitored: Some(true),
|
||||||
|
path: "/nfs/movies".into(),
|
||||||
|
search_on_add: Some(true),
|
||||||
|
..EditCollectionModal::default()
|
||||||
|
};
|
||||||
|
edit_collection_modal
|
||||||
|
.minimum_availability_list
|
||||||
|
.set_items(MinimumAvailability::iter().collect());
|
||||||
|
edit_collection_modal
|
||||||
|
.quality_profile_list
|
||||||
|
.set_items(vec![quality_profile_name.clone()]);
|
||||||
|
|
||||||
|
let edit_indexer_modal = EditIndexerModal {
|
||||||
|
name: "DrunkenSlug".into(),
|
||||||
|
enable_rss: Some(true),
|
||||||
|
enable_automatic_search: Some(true),
|
||||||
|
enable_interactive_search: Some(true),
|
||||||
|
url: "http://127.0.0.1:9696/1/".into(),
|
||||||
|
api_key: "someApiKey".into(),
|
||||||
|
seed_ratio: "ratio".into(),
|
||||||
|
tags: "25".into(),
|
||||||
|
priority: 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
let indexer_settings = IndexerSettings {
|
||||||
|
allow_hardcoded_subs: true,
|
||||||
|
availability_delay: 0,
|
||||||
|
id: 1,
|
||||||
|
maximum_size: 1234,
|
||||||
|
minimum_age: 12,
|
||||||
|
prefer_indexer_flags: true,
|
||||||
|
retention: 30,
|
||||||
|
rss_sync_interval: 60,
|
||||||
|
whitelisted_hardcoded_subs: "eng".into(),
|
||||||
|
};
|
||||||
|
|
||||||
|
let mut indexer_test_results = StatefulTable::default();
|
||||||
|
indexer_test_results.set_items(vec![indexer_test_result()]);
|
||||||
|
indexer_test_results.sorting(vec![sort_option!(name)]);
|
||||||
|
indexer_test_results.search = Some("something".into());
|
||||||
|
indexer_test_results.filter = Some("something".into());
|
||||||
|
|
||||||
|
let mut movie_details_modal = MovieDetailsModal {
|
||||||
|
movie_details: ScrollableText::with_string("Some information".to_owned()),
|
||||||
|
file_details: "Some file info".to_owned(),
|
||||||
|
audio_details: "Some audio info".to_owned(),
|
||||||
|
video_details: "Some video info".to_owned(),
|
||||||
|
..MovieDetailsModal::default()
|
||||||
|
};
|
||||||
|
movie_details_modal
|
||||||
|
.movie_history
|
||||||
|
.set_items(vec![movie_history_item()]);
|
||||||
|
movie_details_modal
|
||||||
|
.movie_cast
|
||||||
|
.set_items(vec![cast_credit()]);
|
||||||
|
movie_details_modal
|
||||||
|
.movie_crew
|
||||||
|
.set_items(vec![crew_credit()]);
|
||||||
|
movie_details_modal
|
||||||
|
.movie_releases
|
||||||
|
.set_items(vec![torrent_release(), usenet_release()]);
|
||||||
|
movie_details_modal
|
||||||
|
.movie_releases
|
||||||
|
.sorting(vec![sort_option!(indexer_id)]);
|
||||||
|
|
||||||
|
let mut radarr_data = RadarrData {
|
||||||
|
disk_space_vec: vec![diskspace()],
|
||||||
|
version: "1.2.3.4".to_owned(),
|
||||||
|
quality_profile_map: quality_profile_map(),
|
||||||
|
tags_map: tags_map(),
|
||||||
|
updates: updates(),
|
||||||
|
start_time: DateTime::from(DateTime::parse_from_rfc3339("2023-05-20T21:29:16Z").unwrap()),
|
||||||
|
add_movie_search: Some("test".into()),
|
||||||
|
add_movie_modal: Some(add_movie_modal),
|
||||||
|
add_searched_movies: Some(add_movie_search_result_table),
|
||||||
|
edit_movie_modal: Some(edit_movie_modal),
|
||||||
|
edit_collection_modal: Some(edit_collection_modal),
|
||||||
|
edit_indexer_modal: Some(edit_indexer_modal),
|
||||||
|
edit_root_folder: Some("/nfs/movies".into()),
|
||||||
|
indexer_settings: Some(indexer_settings),
|
||||||
|
indexer_test_errors: Some("error".into()),
|
||||||
|
indexer_test_all_results: Some(indexer_test_results),
|
||||||
|
movie_details_modal: Some(movie_details_modal),
|
||||||
|
delete_movie_files: true,
|
||||||
|
..RadarrData::default()
|
||||||
|
};
|
||||||
|
radarr_data.root_folders.set_items(vec![root_folder()]);
|
||||||
|
radarr_data.movies.set_items(vec![movie()]);
|
||||||
|
radarr_data.movies.sorting(vec![sort_option!(id)]);
|
||||||
|
radarr_data.movies.search = Some("Something".into());
|
||||||
|
radarr_data.movies.filter = Some("Something".into());
|
||||||
|
radarr_data.collections.set_items(vec![collection()]);
|
||||||
|
radarr_data.collections.sorting(vec![sort_option!(id)]);
|
||||||
|
radarr_data.collections.search = Some("Something".into());
|
||||||
|
radarr_data.collections.filter = Some("Something".into());
|
||||||
|
radarr_data
|
||||||
|
.collection_movies
|
||||||
|
.set_items(vec![collection_movie()]);
|
||||||
|
radarr_data.downloads.set_items(vec![download_record()]);
|
||||||
|
radarr_data.blocklist.set_items(vec![blocklist_item()]);
|
||||||
|
radarr_data.blocklist.sorting(vec![sort_option!(id)]);
|
||||||
|
radarr_data.indexers.set_items(vec![indexer()]);
|
||||||
|
radarr_data.indexers.sorting(vec![sort_option!(id)]);
|
||||||
|
radarr_data.indexers.search = Some("Something".into());
|
||||||
|
radarr_data.indexers.filter = Some("Something".into());
|
||||||
|
radarr_data.logs.set_items(vec![log_line().into()]);
|
||||||
|
radarr_data.log_details.set_items(vec![log_line().into()]);
|
||||||
|
radarr_data.tasks.set_items(vec![task()]);
|
||||||
|
radarr_data.queued_events.set_items(vec![queued_event()]);
|
||||||
|
|
||||||
|
radarr_data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, PartialEq, Eq, Debug, Default, EnumIter)]
|
#[derive(Clone, Copy, PartialEq, Eq, Debug, Default, EnumIter)]
|
||||||
|
#[cfg_attr(test, derive(Display, EnumString))]
|
||||||
pub enum ActiveRadarrBlock {
|
pub enum ActiveRadarrBlock {
|
||||||
AddMovieAlreadyInLibrary,
|
AddMovieAlreadyInLibrary,
|
||||||
AddMovieSearchInput,
|
AddMovieSearchInput,
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
use bimap::BiMap;
|
use super::modals::{AddSeriesModal, EditSeriesModal, SeasonDetailsModal};
|
||||||
use chrono::{DateTime, Utc};
|
|
||||||
use serde_json::Number;
|
|
||||||
use strum::EnumIter;
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
app::{
|
app::{
|
||||||
context_clues::{
|
context_clues::{
|
||||||
@@ -27,8 +23,30 @@ use crate::{
|
|||||||
},
|
},
|
||||||
network::sonarr_network::SonarrEvent,
|
network::sonarr_network::SonarrEvent,
|
||||||
};
|
};
|
||||||
|
use bimap::BiMap;
|
||||||
use super::modals::{AddSeriesModal, EditSeriesModal, SeasonDetailsModal};
|
use chrono::{DateTime, Utc};
|
||||||
|
use serde_json::Number;
|
||||||
|
use strum::EnumIter;
|
||||||
|
#[cfg(test)]
|
||||||
|
use {
|
||||||
|
super::modals::EpisodeDetailsModal,
|
||||||
|
crate::models::sonarr_models::{SeriesMonitor, SeriesType},
|
||||||
|
crate::models::stateful_table::SortOption,
|
||||||
|
crate::network::servarr_test_utils::diskspace,
|
||||||
|
crate::network::servarr_test_utils::indexer_test_result,
|
||||||
|
crate::network::servarr_test_utils::queued_event,
|
||||||
|
crate::network::sonarr_network::sonarr_network_test_utils::test_utils::{
|
||||||
|
add_series_search_result, blocklist_item, download_record, history_item, indexer,
|
||||||
|
indexer_settings, log_line, root_folder,
|
||||||
|
},
|
||||||
|
crate::network::sonarr_network::sonarr_network_test_utils::test_utils::{
|
||||||
|
episode, episode_file, language_profiles_map, quality_profile_map, season, series, tags_map,
|
||||||
|
task, torrent_release, updates, usenet_release,
|
||||||
|
},
|
||||||
|
crate::sort_option,
|
||||||
|
strum::IntoEnumIterator,
|
||||||
|
strum_macros::{Display, EnumString},
|
||||||
|
};
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
#[path = "sonarr_data_tests.rs"]
|
#[path = "sonarr_data_tests.rs"]
|
||||||
@@ -212,7 +230,164 @@ impl<'a> Default for SonarrData<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
impl SonarrData<'_> {
|
||||||
|
pub fn test_default_fully_populated() -> Self {
|
||||||
|
let quality_profile_name = "Bluray-1080p".to_owned();
|
||||||
|
let language_profile_name = "English".to_owned();
|
||||||
|
let mut add_searched_series = StatefulTable::default();
|
||||||
|
add_searched_series.set_items(vec![add_series_search_result()]);
|
||||||
|
|
||||||
|
let mut add_series_modal = AddSeriesModal {
|
||||||
|
use_season_folder: true,
|
||||||
|
tags: "alex".into(),
|
||||||
|
..AddSeriesModal::default()
|
||||||
|
};
|
||||||
|
add_series_modal
|
||||||
|
.root_folder_list
|
||||||
|
.set_items(vec![root_folder()]);
|
||||||
|
add_series_modal
|
||||||
|
.monitor_list
|
||||||
|
.set_items(SeriesMonitor::iter().collect());
|
||||||
|
add_series_modal
|
||||||
|
.quality_profile_list
|
||||||
|
.set_items(vec![quality_profile_name.clone()]);
|
||||||
|
add_series_modal
|
||||||
|
.language_profile_list
|
||||||
|
.set_items(vec![language_profile_name.clone()]);
|
||||||
|
add_series_modal
|
||||||
|
.series_type_list
|
||||||
|
.set_items(SeriesType::iter().collect());
|
||||||
|
|
||||||
|
let edit_indexer_modal = EditIndexerModal {
|
||||||
|
name: "DrunkenSlug".into(),
|
||||||
|
enable_rss: Some(true),
|
||||||
|
enable_automatic_search: Some(true),
|
||||||
|
enable_interactive_search: Some(true),
|
||||||
|
url: "http://127.0.0.1:9696/1/".into(),
|
||||||
|
api_key: "someApiKey".into(),
|
||||||
|
seed_ratio: "ratio".into(),
|
||||||
|
tags: "25".into(),
|
||||||
|
priority: 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
let mut edit_series_modal = EditSeriesModal {
|
||||||
|
monitored: Some(true),
|
||||||
|
use_season_folders: Some(true),
|
||||||
|
path: "/nfs/tv".into(),
|
||||||
|
tags: "alex".into(),
|
||||||
|
..EditSeriesModal::default()
|
||||||
|
};
|
||||||
|
edit_series_modal
|
||||||
|
.series_type_list
|
||||||
|
.set_items(SeriesType::iter().collect());
|
||||||
|
edit_series_modal
|
||||||
|
.quality_profile_list
|
||||||
|
.set_items(vec![quality_profile_name.clone()]);
|
||||||
|
edit_series_modal
|
||||||
|
.language_profile_list
|
||||||
|
.set_items(vec![language_profile_name.clone()]);
|
||||||
|
|
||||||
|
let mut indexer_test_all_results = StatefulTable::default();
|
||||||
|
indexer_test_all_results.set_items(vec![indexer_test_result()]);
|
||||||
|
|
||||||
|
let mut episode_details_modal = EpisodeDetailsModal {
|
||||||
|
episode_details: ScrollableText::with_string("Some episode details".into()),
|
||||||
|
file_details: "Some file details".to_owned(),
|
||||||
|
audio_details: "Some audio details".to_owned(),
|
||||||
|
video_details: "Some video details".to_owned(),
|
||||||
|
..EpisodeDetailsModal::default()
|
||||||
|
};
|
||||||
|
episode_details_modal
|
||||||
|
.episode_history
|
||||||
|
.set_items(vec![history_item()]);
|
||||||
|
episode_details_modal
|
||||||
|
.episode_releases
|
||||||
|
.set_items(vec![torrent_release(), usenet_release()]);
|
||||||
|
episode_details_modal
|
||||||
|
.episode_releases
|
||||||
|
.sorting(vec![sort_option!(indexer_id)]);
|
||||||
|
|
||||||
|
let mut season_details_modal = SeasonDetailsModal {
|
||||||
|
episode_details_modal: Some(episode_details_modal),
|
||||||
|
..SeasonDetailsModal::default()
|
||||||
|
};
|
||||||
|
season_details_modal.episodes.set_items(vec![episode()]);
|
||||||
|
season_details_modal.episodes.search = Some("episode search".into());
|
||||||
|
season_details_modal
|
||||||
|
.episode_files
|
||||||
|
.set_items(vec![episode_file()]);
|
||||||
|
season_details_modal
|
||||||
|
.season_history
|
||||||
|
.set_items(vec![history_item()]);
|
||||||
|
season_details_modal.season_history.search = Some("season history search".into());
|
||||||
|
season_details_modal.season_history.filter = Some("season history filter".into());
|
||||||
|
season_details_modal
|
||||||
|
.season_history
|
||||||
|
.sorting(vec![sort_option!(id)]);
|
||||||
|
season_details_modal
|
||||||
|
.season_releases
|
||||||
|
.set_items(vec![torrent_release(), usenet_release()]);
|
||||||
|
season_details_modal
|
||||||
|
.season_releases
|
||||||
|
.sorting(vec![sort_option!(indexer_id)]);
|
||||||
|
|
||||||
|
let mut series_history = StatefulTable::default();
|
||||||
|
series_history.set_items(vec![history_item()]);
|
||||||
|
series_history.sorting(vec![sort_option!(id)]);
|
||||||
|
series_history.search = Some("series history search".into());
|
||||||
|
series_history.filter = Some("series history filter".into());
|
||||||
|
|
||||||
|
let mut sonarr_data = SonarrData {
|
||||||
|
add_list_exclusion: true,
|
||||||
|
add_searched_series: Some(add_searched_series),
|
||||||
|
add_series_modal: Some(add_series_modal),
|
||||||
|
add_series_search: Some("something".into()),
|
||||||
|
delete_series_files: true,
|
||||||
|
disk_space_vec: vec![diskspace()],
|
||||||
|
edit_indexer_modal: Some(edit_indexer_modal),
|
||||||
|
edit_root_folder: Some("/nfs/tv".into()),
|
||||||
|
edit_series_modal: Some(edit_series_modal),
|
||||||
|
indexer_settings: Some(indexer_settings()),
|
||||||
|
indexer_test_all_results: Some(indexer_test_all_results),
|
||||||
|
indexer_test_errors: Some("error".to_string()),
|
||||||
|
language_profiles_map: language_profiles_map(),
|
||||||
|
quality_profile_map: quality_profile_map(),
|
||||||
|
season_details_modal: Some(season_details_modal),
|
||||||
|
series_history: Some(series_history),
|
||||||
|
start_time: DateTime::from(DateTime::parse_from_rfc3339("2023-05-20T21:29:16Z").unwrap()),
|
||||||
|
tags_map: tags_map(),
|
||||||
|
updates: updates(),
|
||||||
|
version: "1.2.3.4".to_owned(),
|
||||||
|
..SonarrData::default()
|
||||||
|
};
|
||||||
|
|
||||||
|
sonarr_data.blocklist.set_items(vec![blocklist_item()]);
|
||||||
|
sonarr_data.blocklist.sorting(vec![sort_option!(id)]);
|
||||||
|
sonarr_data.downloads.set_items(vec![download_record()]);
|
||||||
|
sonarr_data.history.set_items(vec![history_item()]);
|
||||||
|
sonarr_data.history.sorting(vec![sort_option!(id)]);
|
||||||
|
sonarr_data.history.search = Some("test search".into());
|
||||||
|
sonarr_data.history.filter = Some("test filter".into());
|
||||||
|
sonarr_data.indexers.set_items(vec![indexer()]);
|
||||||
|
sonarr_data.queued_events.set_items(vec![queued_event()]);
|
||||||
|
sonarr_data.root_folders.set_items(vec![root_folder()]);
|
||||||
|
sonarr_data.seasons.set_items(vec![season()]);
|
||||||
|
sonarr_data.seasons.search = Some("season search".into());
|
||||||
|
sonarr_data.series.set_items(vec![series()]);
|
||||||
|
sonarr_data.series.sorting(vec![sort_option!(id)]);
|
||||||
|
sonarr_data.series.search = Some("series search".into());
|
||||||
|
sonarr_data.series.filter = Some("series filter".into());
|
||||||
|
sonarr_data.logs.set_items(vec![log_line().into()]);
|
||||||
|
sonarr_data.log_details.set_items(vec![log_line().into()]);
|
||||||
|
sonarr_data.tasks.set_items(vec![task()]);
|
||||||
|
|
||||||
|
sonarr_data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, PartialEq, Eq, Debug, Default, EnumIter)]
|
#[derive(Clone, Copy, PartialEq, Eq, Debug, Default, EnumIter)]
|
||||||
|
#[cfg_attr(test, derive(Display, EnumString))]
|
||||||
pub enum ActiveSonarrBlock {
|
pub enum ActiveSonarrBlock {
|
||||||
AddRootFolderPrompt,
|
AddRootFolderPrompt,
|
||||||
AddSeriesAlreadyInLibrary,
|
AddSeriesAlreadyInLibrary,
|
||||||
|
|||||||
+2
-1
@@ -26,8 +26,9 @@ pub mod sonarr_network;
|
|||||||
mod utils;
|
mod utils;
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
#[path = "network_tests.rs"]
|
|
||||||
mod network_tests;
|
mod network_tests;
|
||||||
|
#[cfg(test)]
|
||||||
|
pub mod servarr_test_utils;
|
||||||
|
|
||||||
#[cfg_attr(test, automock)]
|
#[cfg_attr(test, automock)]
|
||||||
#[async_trait]
|
#[async_trait]
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ mod tests {
|
|||||||
"value": 9.9
|
"value": 9.9
|
||||||
},
|
},
|
||||||
"rottenTomatoes": {
|
"rottenTomatoes": {
|
||||||
"value": 9.9
|
"value": 99
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -122,7 +122,7 @@ mod tests {
|
|||||||
"value": 9.9
|
"value": 9.9
|
||||||
},
|
},
|
||||||
"rottenTomatoes": {
|
"rottenTomatoes": {
|
||||||
"value": 9.9
|
"value": 99
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -202,7 +202,7 @@ mod tests {
|
|||||||
"value": 9.9
|
"value": 9.9
|
||||||
},
|
},
|
||||||
"rottenTomatoes": {
|
"rottenTomatoes": {
|
||||||
"value": 9.9
|
"value": 99
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
@@ -231,7 +231,7 @@ mod tests {
|
|||||||
"value": 9.9
|
"value": 9.9
|
||||||
},
|
},
|
||||||
"rottenTomatoes": {
|
"rottenTomatoes": {
|
||||||
"value": 9.9
|
"value": 99
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
@@ -319,7 +319,7 @@ mod tests {
|
|||||||
"value": 9.9
|
"value": 9.9
|
||||||
},
|
},
|
||||||
"rottenTomatoes": {
|
"rottenTomatoes": {
|
||||||
"value": 9.9
|
"value": 99
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
@@ -348,7 +348,7 @@ mod tests {
|
|||||||
"value": 9.9
|
"value": 9.9
|
||||||
},
|
},
|
||||||
"rottenTomatoes": {
|
"rottenTomatoes": {
|
||||||
"value": 9.9
|
"value": 99
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
|
|||||||
@@ -604,7 +604,7 @@ mod tests {
|
|||||||
Description: Blah blah blah
|
Description: Blah blah blah
|
||||||
TMDB: 99%
|
TMDB: 99%
|
||||||
IMDB: 9.9
|
IMDB: 9.9
|
||||||
Rotten Tomatoes:
|
Rotten Tomatoes: 99%
|
||||||
Quality Profile: HD - 1080p
|
Quality Profile: HD - 1080p
|
||||||
Size: 3.30 GB
|
Size: 3.30 GB
|
||||||
Path: /nfs/movies
|
Path: /nfs/movies
|
||||||
@@ -921,7 +921,7 @@ mod tests {
|
|||||||
"value": 9.9
|
"value": 9.9
|
||||||
},
|
},
|
||||||
"rottenTomatoes": {
|
"rottenTomatoes": {
|
||||||
"value": 9.9
|
"value": 99
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|||||||
@@ -22,12 +22,10 @@ mod root_folders;
|
|||||||
mod system;
|
mod system;
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
#[path = "radarr_network_tests.rs"]
|
|
||||||
mod radarr_network_tests;
|
mod radarr_network_tests;
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
#[path = "radarr_network_test_utils.rs"]
|
pub mod radarr_network_test_utils;
|
||||||
mod radarr_network_test_utils;
|
|
||||||
|
|
||||||
#[derive(Debug, Eq, PartialEq, Clone)]
|
#[derive(Debug, Eq, PartialEq, Clone)]
|
||||||
pub enum RadarrEvent {
|
pub enum RadarrEvent {
|
||||||
|
|||||||
@@ -1,15 +1,18 @@
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
pub(in crate::network::radarr_network) mod test_utils {
|
pub mod test_utils {
|
||||||
use crate::models::HorizontallyScrollableText;
|
|
||||||
use crate::models::radarr_models::{
|
use crate::models::radarr_models::{
|
||||||
AddMovieSearchResult, BlocklistItem, BlocklistItemMovie, Collection, CollectionMovie, Credit,
|
AddMovieSearchResult, BlocklistItem, BlocklistItemMovie, Collection, CollectionMovie, Credit,
|
||||||
CreditType, DownloadRecord, DownloadsResponse, IndexerSettings, MediaInfo, MinimumAvailability,
|
CreditType, DownloadRecord, DownloadsResponse, IndexerSettings, MediaInfo, MinimumAvailability,
|
||||||
Movie, MovieCollection, MovieFile, MovieHistoryItem, RadarrRelease, Rating, RatingsList,
|
Movie, MovieCollection, MovieFile, MovieHistoryItem, RadarrRelease, RadarrTask, RadarrTaskName,
|
||||||
|
Rating, RatingsList,
|
||||||
};
|
};
|
||||||
use crate::models::servarr_models::{
|
use crate::models::servarr_models::{
|
||||||
Indexer, IndexerField, Language, Quality, QualityWrapper, RootFolder,
|
Indexer, IndexerField, Language, Quality, QualityWrapper, RootFolder,
|
||||||
};
|
};
|
||||||
|
use crate::models::{HorizontallyScrollableText, ScrollableText};
|
||||||
|
use bimap::BiMap;
|
||||||
use chrono::DateTime;
|
use chrono::DateTime;
|
||||||
|
use indoc::formatdoc;
|
||||||
use serde_json::{Number, Value, json};
|
use serde_json::{Number, Value, json};
|
||||||
|
|
||||||
pub const MOVIE_JSON: &str = r#"{
|
pub const MOVIE_JSON: &str = r#"{
|
||||||
@@ -42,7 +45,7 @@ pub(in crate::network::radarr_network) mod test_utils {
|
|||||||
"value": 9.9
|
"value": 9.9
|
||||||
},
|
},
|
||||||
"rottenTomatoes": {
|
"rottenTomatoes": {
|
||||||
"value": 9.9
|
"value": 99
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"movieFile": {
|
"movieFile": {
|
||||||
@@ -86,10 +89,10 @@ pub(in crate::network::radarr_network) mod test_utils {
|
|||||||
"value": 9.9
|
"value": 9.9
|
||||||
},
|
},
|
||||||
"tmdb": {
|
"tmdb": {
|
||||||
"value": 9.9
|
"value": 99
|
||||||
},
|
},
|
||||||
"rottenTomatoes": {
|
"rottenTomatoes": {
|
||||||
"value": 9.9
|
"value": 99
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -104,6 +107,25 @@ pub(in crate::network::radarr_network) mod test_utils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn log_line() -> &'static str {
|
||||||
|
"2025-12-15 16:14:45 UTC|INFO|DownloadDecisionMaker|Processing 545 releases"
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn task() -> RadarrTask {
|
||||||
|
RadarrTask {
|
||||||
|
name: "Backup".to_string(),
|
||||||
|
task_name: RadarrTaskName::Backup,
|
||||||
|
interval: 60,
|
||||||
|
last_execution: DateTime::from(DateTime::parse_from_rfc3339("2023-05-20T21:29:16Z").unwrap()),
|
||||||
|
last_duration: "00:00:17".to_string(),
|
||||||
|
next_execution: DateTime::from(DateTime::parse_from_rfc3339("2023-05-20T22:29:16Z").unwrap()),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn tags_map() -> BiMap<i64, String> {
|
||||||
|
BiMap::from_iter([(1, "alex".to_owned())])
|
||||||
|
}
|
||||||
|
|
||||||
pub fn genres() -> Vec<String> {
|
pub fn genres() -> Vec<String> {
|
||||||
vec!["cool".to_owned(), "family".to_owned(), "fun".to_owned()]
|
vec!["cool".to_owned(), "family".to_owned(), "fun".to_owned()]
|
||||||
}
|
}
|
||||||
@@ -114,11 +136,15 @@ pub(in crate::network::radarr_network) mod test_utils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn percentage_rating() -> Rating {
|
||||||
|
Rating { value: 99.into() }
|
||||||
|
}
|
||||||
|
|
||||||
pub fn ratings_list() -> RatingsList {
|
pub fn ratings_list() -> RatingsList {
|
||||||
RatingsList {
|
RatingsList {
|
||||||
imdb: Some(rating()),
|
imdb: Some(rating()),
|
||||||
tmdb: Some(rating()),
|
tmdb: Some(rating()),
|
||||||
rotten_tomatoes: Some(rating()),
|
rotten_tomatoes: Some(percentage_rating()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -392,4 +418,86 @@ pub(in crate::network::radarr_network) mod test_utils {
|
|||||||
"name": "HD - 1080p"
|
"name": "HD - 1080p"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn quality_profile_map() -> BiMap<i64, String> {
|
||||||
|
let quality_profile = quality_profile();
|
||||||
|
let id = quality_profile
|
||||||
|
.get("id")
|
||||||
|
.expect("A id must be set on a quality profile")
|
||||||
|
.as_i64()
|
||||||
|
.expect("'id' must be a string");
|
||||||
|
let name = quality_profile
|
||||||
|
.get("name")
|
||||||
|
.expect("A name must be set on a quality profile")
|
||||||
|
.as_str()
|
||||||
|
.expect("'name' must be a string")
|
||||||
|
.to_owned();
|
||||||
|
|
||||||
|
BiMap::from_iter(vec![(id, name)])
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn updates() -> ScrollableText {
|
||||||
|
let line_break = "-".repeat(200);
|
||||||
|
ScrollableText::with_string(formatdoc!(
|
||||||
|
"
|
||||||
|
The latest version of Radarr is already installed
|
||||||
|
|
||||||
|
4.3.2.1 - 2023-04-15 02:02:53 UTC (Currently Installed)
|
||||||
|
{line_break}
|
||||||
|
New:
|
||||||
|
* Cool new thing
|
||||||
|
Fixed:
|
||||||
|
* Some bugs killed
|
||||||
|
|
||||||
|
|
||||||
|
3.2.1.0 - 2023-04-15 02:02:53 UTC (Previously Installed)
|
||||||
|
{line_break}
|
||||||
|
New:
|
||||||
|
* Cool new thing (old)
|
||||||
|
* Other cool new thing (old)
|
||||||
|
|
||||||
|
|
||||||
|
2.1.0 - 2023-04-15 02:02:53 UTC
|
||||||
|
{line_break}
|
||||||
|
Fixed:
|
||||||
|
* Killed bug 1
|
||||||
|
* Fixed bug 2"
|
||||||
|
))
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn torrent_release() -> RadarrRelease {
|
||||||
|
RadarrRelease {
|
||||||
|
guid: "1234".to_string(),
|
||||||
|
protocol: "torrent".to_string(),
|
||||||
|
age: 12,
|
||||||
|
title: "Some movie release".into(),
|
||||||
|
indexer: "The Pirate Bay".to_string(),
|
||||||
|
indexer_id: 1,
|
||||||
|
size: 2468,
|
||||||
|
rejected: true,
|
||||||
|
rejections: Some(vec!["something interesting".into()]),
|
||||||
|
seeders: Some(25.into()),
|
||||||
|
leechers: Some(3.into()),
|
||||||
|
languages: Some(vec![language()]),
|
||||||
|
quality: quality_wrapper(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn usenet_release() -> RadarrRelease {
|
||||||
|
RadarrRelease {
|
||||||
|
guid: "1234".to_string(),
|
||||||
|
protocol: "usenet".to_string(),
|
||||||
|
age: 22,
|
||||||
|
title: "Some Other movie release".into(),
|
||||||
|
indexer: "The Pirate Bay".to_string(),
|
||||||
|
indexer_id: 2,
|
||||||
|
size: 1512,
|
||||||
|
rejected: true,
|
||||||
|
rejections: Some(vec!["Bad stuff happens in the middle of nowhere".into()]),
|
||||||
|
seeders: None,
|
||||||
|
leechers: None,
|
||||||
|
languages: Some(vec![language()]),
|
||||||
|
quality: quality_wrapper(),
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,9 +185,9 @@ impl Network<'_, '_> {
|
|||||||
.map(|update| {
|
.map(|update| {
|
||||||
let install_status = if update.installed_on.is_some() {
|
let install_status = if update.installed_on.is_some() {
|
||||||
if update.installed {
|
if update.installed {
|
||||||
"(Currently Installed)".to_owned()
|
" (Currently Installed)".to_owned()
|
||||||
} else {
|
} else {
|
||||||
"(Previously Installed)".to_owned()
|
" (Previously Installed)".to_owned()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String::new()
|
String::new()
|
||||||
@@ -201,7 +201,7 @@ impl Network<'_, '_> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let mut update_info = formatdoc!(
|
let mut update_info = formatdoc!(
|
||||||
"{} - {} {install_status}
|
"{} - {}{install_status}
|
||||||
{}",
|
{}",
|
||||||
update.version,
|
update.version,
|
||||||
update.release_date,
|
update.release_date,
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
use crate::models::HorizontallyScrollableText;
|
||||||
use crate::models::radarr_models::{RadarrSerdeable, RadarrTask, RadarrTaskName, SystemStatus};
|
use crate::models::radarr_models::{RadarrSerdeable, RadarrTask, RadarrTaskName, SystemStatus};
|
||||||
use crate::models::servarr_models::{
|
use crate::models::servarr_models::{
|
||||||
DiskSpace, HostConfig, LogResponse, QueueEvent, SecurityConfig, Update,
|
DiskSpace, HostConfig, LogResponse, QueueEvent, SecurityConfig, Update,
|
||||||
};
|
};
|
||||||
use crate::models::{HorizontallyScrollableText, ScrollableText};
|
|
||||||
use crate::network::network_tests::test_utils::{MockServarrApi, test_network};
|
use crate::network::network_tests::test_utils::{MockServarrApi, test_network};
|
||||||
use crate::network::radarr_network::RadarrEvent;
|
use crate::network::radarr_network::RadarrEvent;
|
||||||
|
use crate::network::radarr_network::radarr_network_test_utils::test_utils::updates;
|
||||||
use chrono::DateTime;
|
use chrono::DateTime;
|
||||||
use indoc::formatdoc;
|
|
||||||
use pretty_assertions::{assert_eq, assert_str_eq};
|
use pretty_assertions::{assert_eq, assert_str_eq};
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
|
|
||||||
@@ -297,32 +297,7 @@ mod tests {
|
|||||||
},
|
},
|
||||||
}]);
|
}]);
|
||||||
let response: Vec<Update> = serde_json::from_value(updates_json.clone()).unwrap();
|
let response: Vec<Update> = serde_json::from_value(updates_json.clone()).unwrap();
|
||||||
let line_break = "-".repeat(200);
|
let expected_text = updates();
|
||||||
let expected_text = ScrollableText::with_string(formatdoc!(
|
|
||||||
"
|
|
||||||
The latest version of Radarr is already installed
|
|
||||||
|
|
||||||
4.3.2.1 - 2023-04-15 02:02:53 UTC (Currently Installed)
|
|
||||||
{line_break}
|
|
||||||
New:
|
|
||||||
* Cool new thing
|
|
||||||
Fixed:
|
|
||||||
* Some bugs killed
|
|
||||||
|
|
||||||
|
|
||||||
3.2.1.0 - 2023-04-15 02:02:53 UTC (Previously Installed)
|
|
||||||
{line_break}
|
|
||||||
New:
|
|
||||||
* Cool new thing (old)
|
|
||||||
* Other cool new thing (old)
|
|
||||||
|
|
||||||
|
|
||||||
2.1.0 - 2023-04-15 02:02:53 UTC
|
|
||||||
{line_break}
|
|
||||||
Fixed:
|
|
||||||
* Killed bug 1
|
|
||||||
* Fixed bug 2"
|
|
||||||
));
|
|
||||||
let (async_server, app, _server) = MockServarrApi::get()
|
let (async_server, app, _server) = MockServarrApi::get()
|
||||||
.returns(updates_json)
|
.returns(updates_json)
|
||||||
.build_for(RadarrEvent::GetUpdates)
|
.build_for(RadarrEvent::GetUpdates)
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
use crate::models::servarr_data::modals::IndexerTestResultModalItem;
|
||||||
|
use crate::models::servarr_models::{DiskSpace, QueueEvent};
|
||||||
|
use chrono::DateTime;
|
||||||
|
|
||||||
|
pub fn diskspace() -> DiskSpace {
|
||||||
|
DiskSpace {
|
||||||
|
free_space: 6500,
|
||||||
|
total_space: 8675309,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn indexer_test_result() -> IndexerTestResultModalItem {
|
||||||
|
IndexerTestResultModalItem {
|
||||||
|
name: "DrunkenSlug".to_owned(),
|
||||||
|
is_valid: false,
|
||||||
|
validation_failures: "Some failure".into(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn queued_event() -> QueueEvent {
|
||||||
|
QueueEvent {
|
||||||
|
trigger: "manual".to_string(),
|
||||||
|
name: "Refresh Monitored Downloads".to_string(),
|
||||||
|
command_name: "Refresh Monitored Downloads".to_string(),
|
||||||
|
status: "completed".to_string(),
|
||||||
|
queued: DateTime::from(DateTime::parse_from_rfc3339("2023-05-20T21:25:16Z").unwrap()),
|
||||||
|
started: Some(DateTime::from(
|
||||||
|
DateTime::parse_from_rfc3339("2023-05-20T21:25:30Z").unwrap(),
|
||||||
|
)),
|
||||||
|
ended: Some(DateTime::from(
|
||||||
|
DateTime::parse_from_rfc3339("2023-05-20T21:28:33Z").unwrap(),
|
||||||
|
)),
|
||||||
|
duration: Some("00:03:03".to_owned()),
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -96,6 +96,7 @@ mod tests {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"seriesId": 2001,
|
"seriesId": 2001,
|
||||||
|
"seriesTitle": "Test Series",
|
||||||
"episodeIds": [42018],
|
"episodeIds": [42018],
|
||||||
"sourceTitle": "A Series",
|
"sourceTitle": "A Series",
|
||||||
"languages": [{ "id": 1, "name": "English" }],
|
"languages": [{ "id": 1, "name": "English" }],
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ mod tests {
|
|||||||
use crate::network::sonarr_network::SonarrEvent;
|
use crate::network::sonarr_network::SonarrEvent;
|
||||||
use crate::network::sonarr_network::library::episodes::get_episode_status;
|
use crate::network::sonarr_network::library::episodes::get_episode_status;
|
||||||
use crate::network::sonarr_network::sonarr_network_test_utils::test_utils::{
|
use crate::network::sonarr_network::sonarr_network_test_utils::test_utils::{
|
||||||
EPISODE_JSON, episode, episode_file, history_item, release,
|
EPISODE_JSON, episode, episode_file, history_item, torrent_release,
|
||||||
};
|
};
|
||||||
use indoc::formatdoc;
|
use indoc::formatdoc;
|
||||||
use mockito::Matcher;
|
use mockito::Matcher;
|
||||||
@@ -1124,9 +1124,9 @@ mod tests {
|
|||||||
.unwrap()
|
.unwrap()
|
||||||
.episode_releases
|
.episode_releases
|
||||||
.items,
|
.items,
|
||||||
vec![release()]
|
vec![torrent_release()]
|
||||||
);
|
);
|
||||||
assert_eq!(releases_vec, vec![release()]);
|
assert_eq!(releases_vec, vec![torrent_release()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
@@ -1179,9 +1179,9 @@ mod tests {
|
|||||||
.unwrap()
|
.unwrap()
|
||||||
.episode_releases
|
.episode_releases
|
||||||
.items,
|
.items,
|
||||||
vec![release()]
|
vec![torrent_release()]
|
||||||
);
|
);
|
||||||
assert_eq!(releases_vec, vec![release()]);
|
assert_eq!(releases_vec, vec![torrent_release()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ mod tests {
|
|||||||
use crate::network::network_tests::test_utils::{MockServarrApi, test_network};
|
use crate::network::network_tests::test_utils::{MockServarrApi, test_network};
|
||||||
use crate::network::sonarr_network::SonarrEvent;
|
use crate::network::sonarr_network::SonarrEvent;
|
||||||
use crate::network::sonarr_network::sonarr_network_test_utils::test_utils::{
|
use crate::network::sonarr_network::sonarr_network_test_utils::test_utils::{
|
||||||
SERIES_JSON, history_item, release, season, series,
|
SERIES_JSON, history_item, season, series, torrent_release,
|
||||||
};
|
};
|
||||||
use mockito::Matcher;
|
use mockito::Matcher;
|
||||||
use pretty_assertions::assert_eq;
|
use pretty_assertions::assert_eq;
|
||||||
@@ -101,16 +101,16 @@ mod tests {
|
|||||||
]);
|
]);
|
||||||
let expected_filtered_sonarr_release = SonarrRelease {
|
let expected_filtered_sonarr_release = SonarrRelease {
|
||||||
full_season: true,
|
full_season: true,
|
||||||
..release()
|
..torrent_release()
|
||||||
};
|
};
|
||||||
let expected_raw_sonarr_releases = vec![
|
let expected_raw_sonarr_releases = vec![
|
||||||
SonarrRelease {
|
SonarrRelease {
|
||||||
full_season: true,
|
full_season: true,
|
||||||
..release()
|
..torrent_release()
|
||||||
},
|
},
|
||||||
SonarrRelease {
|
SonarrRelease {
|
||||||
guid: "4567".to_owned(),
|
guid: "4567".to_owned(),
|
||||||
..release()
|
..torrent_release()
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
let (mock, app, _server) = MockServarrApi::get()
|
let (mock, app, _server) = MockServarrApi::get()
|
||||||
@@ -197,7 +197,7 @@ mod tests {
|
|||||||
]);
|
]);
|
||||||
let expected_sonarr_release = SonarrRelease {
|
let expected_sonarr_release = SonarrRelease {
|
||||||
full_season: true,
|
full_season: true,
|
||||||
..release()
|
..torrent_release()
|
||||||
};
|
};
|
||||||
let (mock, app, _server) = MockServarrApi::get()
|
let (mock, app, _server) = MockServarrApi::get()
|
||||||
.returns(release_json)
|
.returns(release_json)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ mod sonarr_network_tests;
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
#[path = "sonarr_network_test_utils.rs"]
|
#[path = "sonarr_network_test_utils.rs"]
|
||||||
mod sonarr_network_test_utils;
|
pub mod sonarr_network_test_utils;
|
||||||
|
|
||||||
mod blocklist;
|
mod blocklist;
|
||||||
mod downloads;
|
mod downloads;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
pub(in crate::network::sonarr_network) mod test_utils {
|
pub mod test_utils {
|
||||||
use crate::models::HorizontallyScrollableText;
|
|
||||||
use crate::models::servarr_models::{
|
use crate::models::servarr_models::{
|
||||||
Indexer, IndexerField, Language, Quality, QualityWrapper, RootFolder,
|
Indexer, IndexerField, Language, Quality, QualityWrapper, RootFolder,
|
||||||
};
|
};
|
||||||
@@ -8,9 +7,13 @@ pub(in crate::network::sonarr_network) mod test_utils {
|
|||||||
AddSeriesSearchResult, AddSeriesSearchResultStatistics, BlocklistItem, DownloadRecord,
|
AddSeriesSearchResult, AddSeriesSearchResultStatistics, BlocklistItem, DownloadRecord,
|
||||||
DownloadStatus, DownloadsResponse, Episode, EpisodeFile, IndexerSettings, MediaInfo, Rating,
|
DownloadStatus, DownloadsResponse, Episode, EpisodeFile, IndexerSettings, MediaInfo, Rating,
|
||||||
Season, SeasonStatistics, Series, SeriesStatistics, SeriesStatus, SeriesType,
|
Season, SeasonStatistics, Series, SeriesStatistics, SeriesStatus, SeriesType,
|
||||||
SonarrHistoryData, SonarrHistoryEventType, SonarrHistoryItem, SonarrRelease,
|
SonarrHistoryData, SonarrHistoryEventType, SonarrHistoryItem, SonarrRelease, SonarrTask,
|
||||||
|
SonarrTaskName,
|
||||||
};
|
};
|
||||||
|
use crate::models::{HorizontallyScrollableText, ScrollableText};
|
||||||
|
use bimap::BiMap;
|
||||||
use chrono::DateTime;
|
use chrono::DateTime;
|
||||||
|
use indoc::formatdoc;
|
||||||
use serde_json::{Number, Value, json};
|
use serde_json::{Number, Value, json};
|
||||||
|
|
||||||
pub const SERIES_JSON: &str = r#"{
|
pub const SERIES_JSON: &str = r#"{
|
||||||
@@ -22,6 +25,7 @@ pub(in crate::network::sonarr_network) mod test_utils {
|
|||||||
"seasons": [
|
"seasons": [
|
||||||
{
|
{
|
||||||
"seasonNumber": 1,
|
"seasonNumber": 1,
|
||||||
|
"title": "Season title",
|
||||||
"monitored": true,
|
"monitored": true,
|
||||||
"statistics": {
|
"statistics": {
|
||||||
"previousAiring": "2022-10-24T01:00:00Z",
|
"previousAiring": "2022-10-24T01:00:00Z",
|
||||||
@@ -120,7 +124,7 @@ pub(in crate::network::sonarr_network) mod test_utils {
|
|||||||
BlocklistItem {
|
BlocklistItem {
|
||||||
id: 1,
|
id: 1,
|
||||||
series_id: 1,
|
series_id: 1,
|
||||||
series_title: None,
|
series_title: Some("Test Series".to_owned()),
|
||||||
episode_ids: vec![Number::from(1)],
|
episode_ids: vec![Number::from(1)],
|
||||||
source_title: "Test Source Title".to_owned(),
|
source_title: "Test Source Title".to_owned(),
|
||||||
languages: vec![Some(language())],
|
languages: vec![Some(language())],
|
||||||
@@ -299,7 +303,7 @@ pub(in crate::network::sonarr_network) mod test_utils {
|
|||||||
|
|
||||||
pub fn season() -> Season {
|
pub fn season() -> Season {
|
||||||
Season {
|
Season {
|
||||||
title: None,
|
title: Some("Season title".to_owned()),
|
||||||
season_number: 1,
|
season_number: 1,
|
||||||
monitored: true,
|
monitored: true,
|
||||||
statistics: Some(season_statistics()),
|
statistics: Some(season_statistics()),
|
||||||
@@ -364,7 +368,7 @@ pub(in crate::network::sonarr_network) mod test_utils {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn release() -> SonarrRelease {
|
pub fn torrent_release() -> SonarrRelease {
|
||||||
SonarrRelease {
|
SonarrRelease {
|
||||||
guid: "1234".to_owned(),
|
guid: "1234".to_owned(),
|
||||||
protocol: "torrent".to_owned(),
|
protocol: "torrent".to_owned(),
|
||||||
@@ -383,6 +387,25 @@ pub(in crate::network::sonarr_network) mod test_utils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn usenet_release() -> SonarrRelease {
|
||||||
|
SonarrRelease {
|
||||||
|
guid: "1234".to_owned(),
|
||||||
|
protocol: "usenet".to_owned(),
|
||||||
|
age: 1,
|
||||||
|
title: HorizontallyScrollableText::from("Test Release"),
|
||||||
|
indexer: "DrunkenSlug".to_owned(),
|
||||||
|
indexer_id: 1,
|
||||||
|
size: 1234,
|
||||||
|
rejected: true,
|
||||||
|
rejections: Some(rejections()),
|
||||||
|
seeders: None,
|
||||||
|
leechers: None,
|
||||||
|
languages: Some(vec![Some(language())]),
|
||||||
|
quality: quality_wrapper(),
|
||||||
|
full_season: false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn root_folder() -> RootFolder {
|
pub fn root_folder() -> RootFolder {
|
||||||
RootFolder {
|
RootFolder {
|
||||||
id: 1,
|
id: 1,
|
||||||
@@ -399,4 +422,61 @@ pub(in crate::network::sonarr_network) mod test_utils {
|
|||||||
"label": "testing"
|
"label": "testing"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn log_line() -> &'static str {
|
||||||
|
"2025-12-16 16:40:59 UTC|INFO|ImportListSyncService|No list items to process"
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn language_profiles_map() -> BiMap<i64, String> {
|
||||||
|
let Language { id, name } = language();
|
||||||
|
|
||||||
|
BiMap::from_iter(vec![(id, name)])
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn quality_profile_map() -> BiMap<i64, String> {
|
||||||
|
BiMap::from_iter(vec![(6, quality().name)])
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn tags_map() -> BiMap<i64, String> {
|
||||||
|
BiMap::from_iter(vec![(1, "alex".to_owned())])
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn task() -> SonarrTask {
|
||||||
|
SonarrTask {
|
||||||
|
name: "Backup".to_owned(),
|
||||||
|
task_name: SonarrTaskName::Backup,
|
||||||
|
interval: 60,
|
||||||
|
last_execution: DateTime::from(DateTime::parse_from_rfc3339("2023-05-20T21:29:16Z").unwrap()),
|
||||||
|
next_execution: DateTime::from(DateTime::parse_from_rfc3339("2023-05-20T22:29:16Z").unwrap()),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn updates() -> ScrollableText {
|
||||||
|
let line_break = "-".repeat(200);
|
||||||
|
ScrollableText::with_string(formatdoc!(
|
||||||
|
"
|
||||||
|
The latest version of Sonarr is already installed
|
||||||
|
|
||||||
|
4.3.2.1 - 2023-04-15 02:02:53 UTC (Currently Installed)
|
||||||
|
{line_break}
|
||||||
|
New:
|
||||||
|
* Cool new thing
|
||||||
|
Fixed:
|
||||||
|
* Some bugs killed
|
||||||
|
|
||||||
|
|
||||||
|
3.2.1.0 - 2023-04-15 02:02:53 UTC (Previously Installed)
|
||||||
|
{line_break}
|
||||||
|
New:
|
||||||
|
* Cool new thing (old)
|
||||||
|
* Other cool new thing (old)
|
||||||
|
|
||||||
|
|
||||||
|
2.1.0 - 2023-04-15 02:02:53 UTC
|
||||||
|
{line_break}
|
||||||
|
Fixed:
|
||||||
|
* Killed bug 1
|
||||||
|
* Fixed bug 2"
|
||||||
|
))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -202,9 +202,9 @@ impl Network<'_, '_> {
|
|||||||
.map(|update| {
|
.map(|update| {
|
||||||
let install_status = if update.installed_on.is_some() {
|
let install_status = if update.installed_on.is_some() {
|
||||||
if update.installed {
|
if update.installed {
|
||||||
"(Currently Installed)".to_owned()
|
" (Currently Installed)".to_owned()
|
||||||
} else {
|
} else {
|
||||||
"(Previously Installed)".to_owned()
|
" (Previously Installed)".to_owned()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
String::new()
|
String::new()
|
||||||
@@ -218,7 +218,7 @@ impl Network<'_, '_> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let mut update_info = formatdoc!(
|
let mut update_info = formatdoc!(
|
||||||
"{} - {} {install_status}
|
"{} - {}{install_status}
|
||||||
{}",
|
{}",
|
||||||
update.version,
|
update.version,
|
||||||
update.release_date,
|
update.release_date,
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
use crate::models::HorizontallyScrollableText;
|
||||||
use crate::models::servarr_models::{
|
use crate::models::servarr_models::{
|
||||||
DiskSpace, HostConfig, LogResponse, QueueEvent, SecurityConfig, Update,
|
DiskSpace, HostConfig, LogResponse, QueueEvent, SecurityConfig, Update,
|
||||||
};
|
};
|
||||||
use crate::models::sonarr_models::{SonarrSerdeable, SonarrTask, SonarrTaskName, SystemStatus};
|
use crate::models::sonarr_models::{SonarrSerdeable, SonarrTask, SonarrTaskName, SystemStatus};
|
||||||
use crate::models::{HorizontallyScrollableText, ScrollableText};
|
|
||||||
use crate::network::network_tests::test_utils::{MockServarrApi, test_network};
|
use crate::network::network_tests::test_utils::{MockServarrApi, test_network};
|
||||||
use crate::network::sonarr_network::SonarrEvent;
|
use crate::network::sonarr_network::SonarrEvent;
|
||||||
|
use crate::network::sonarr_network::sonarr_network_test_utils::test_utils::updates;
|
||||||
use chrono::DateTime;
|
use chrono::DateTime;
|
||||||
use indoc::formatdoc;
|
|
||||||
use pretty_assertions::{assert_eq, assert_str_eq};
|
use pretty_assertions::{assert_eq, assert_str_eq};
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
|
|
||||||
@@ -359,32 +359,7 @@ mod tests {
|
|||||||
},
|
},
|
||||||
}]);
|
}]);
|
||||||
let response: Vec<Update> = serde_json::from_value(updates_json.clone()).unwrap();
|
let response: Vec<Update> = serde_json::from_value(updates_json.clone()).unwrap();
|
||||||
let line_break = "-".repeat(200);
|
let expected_text = updates();
|
||||||
let expected_text = ScrollableText::with_string(formatdoc!(
|
|
||||||
"
|
|
||||||
The latest version of Sonarr is already installed
|
|
||||||
|
|
||||||
4.3.2.1 - 2023-04-15 02:02:53 UTC (Currently Installed)
|
|
||||||
{line_break}
|
|
||||||
New:
|
|
||||||
* Cool new thing
|
|
||||||
Fixed:
|
|
||||||
* Some bugs killed
|
|
||||||
|
|
||||||
|
|
||||||
3.2.1.0 - 2023-04-15 02:02:53 UTC (Previously Installed)
|
|
||||||
{line_break}
|
|
||||||
New:
|
|
||||||
* Cool new thing (old)
|
|
||||||
* Other cool new thing (old)
|
|
||||||
|
|
||||||
|
|
||||||
2.1.0 - 2023-04-15 02:02:53 UTC
|
|
||||||
{line_break}
|
|
||||||
Fixed:
|
|
||||||
* Killed bug 1
|
|
||||||
* Fixed bug 2"
|
|
||||||
));
|
|
||||||
let (mock, app, _server) = MockServarrApi::get()
|
let (mock, app, _server) = MockServarrApi::get()
|
||||||
.returns(updates_json)
|
.returns(updates_json)
|
||||||
.build_for(SonarrEvent::GetUpdates)
|
.build_for(SonarrEvent::GetUpdates)
|
||||||
|
|||||||
+6
-5
@@ -35,6 +35,8 @@ pub mod theme;
|
|||||||
mod ui_property_tests;
|
mod ui_property_tests;
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
pub mod ui_test_utils;
|
pub mod ui_test_utils;
|
||||||
|
#[cfg(test)]
|
||||||
|
mod ui_tests;
|
||||||
mod utils;
|
mod utils;
|
||||||
mod widgets;
|
mod widgets;
|
||||||
|
|
||||||
@@ -50,6 +52,7 @@ pub trait DrawUi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn ui(f: &mut Frame<'_>, app: &mut App<'_>) {
|
pub fn ui(f: &mut Frame<'_>, app: &mut App<'_>) {
|
||||||
|
app.on_ui_scroll_tick();
|
||||||
f.render_widget(background_block(), f.area());
|
f.render_widget(background_block(), f.area());
|
||||||
let [header_area, context_area, table_area] = if !app.error.text.is_empty() {
|
let [header_area, context_area, table_area] = if !app.error.text.is_empty() {
|
||||||
let [header_area, error_area, context_area, table_area] = Layout::vertical([
|
let [header_area, error_area, context_area, table_area] = Layout::vertical([
|
||||||
@@ -122,11 +125,9 @@ fn draw_error(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
|||||||
.failure()
|
.failure()
|
||||||
.bold();
|
.bold();
|
||||||
|
|
||||||
app.error.scroll_left_or_reset(
|
app
|
||||||
area.width as usize,
|
.error
|
||||||
true,
|
.scroll_left_or_reset(area.width as usize, true, app.ui_scroll_tick_count == 0);
|
||||||
app.tick_count.is_multiple_of(app.ticks_until_scroll),
|
|
||||||
);
|
|
||||||
|
|
||||||
let paragraph = Paragraph::new(Text::from(app.error.to_string().failure()))
|
let paragraph = Paragraph::new(Text::from(app.error.to_string().failure()))
|
||||||
.block(block)
|
.block(block)
|
||||||
|
|||||||
@@ -3,9 +3,7 @@ mod tests {
|
|||||||
use strum::IntoEnumIterator;
|
use strum::IntoEnumIterator;
|
||||||
|
|
||||||
use crate::app::App;
|
use crate::app::App;
|
||||||
use crate::models::radarr_models::BlocklistItem;
|
|
||||||
use crate::models::servarr_data::radarr::radarr_data::{ActiveRadarrBlock, BLOCKLIST_BLOCKS};
|
use crate::models::servarr_data::radarr::radarr_data::{ActiveRadarrBlock, BLOCKLIST_BLOCKS};
|
||||||
use crate::models::stateful_table::StatefulTable;
|
|
||||||
use crate::ui::DrawUi;
|
use crate::ui::DrawUi;
|
||||||
use crate::ui::radarr_ui::blocklist::BlocklistUi;
|
use crate::ui::radarr_ui::blocklist::BlocklistUi;
|
||||||
use crate::ui::ui_test_utils::test_utils::render_to_string_with_app;
|
use crate::ui::ui_test_utils::test_utils::render_to_string_with_app;
|
||||||
@@ -21,13 +19,19 @@ mod tests {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mod snapshot_tests {
|
||||||
|
use crate::ui::ui_test_utils::test_utils::TerminalSize;
|
||||||
|
use rstest::rstest;
|
||||||
|
|
||||||
|
use super::*;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_blocklist_ui_renders_loading_state() {
|
fn test_blocklist_ui_renders_blocklist_tab_loading() {
|
||||||
let mut app = App::test_default();
|
let mut app = App::test_default();
|
||||||
app.is_loading = true;
|
app.is_loading = true;
|
||||||
app.push_navigation_stack(ActiveRadarrBlock::Blocklist.into());
|
app.push_navigation_stack(ActiveRadarrBlock::Blocklist.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| {
|
||||||
BlocklistUi::draw(f, app, f.area());
|
BlocklistUi::draw(f, app, f.area());
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -38,37 +42,32 @@ mod tests {
|
|||||||
fn test_blocklist_ui_renders_empty_blocklist() {
|
fn test_blocklist_ui_renders_empty_blocklist() {
|
||||||
let mut app = App::test_default();
|
let mut app = App::test_default();
|
||||||
app.push_navigation_stack(ActiveRadarrBlock::Blocklist.into());
|
app.push_navigation_stack(ActiveRadarrBlock::Blocklist.into());
|
||||||
app.data.radarr_data.blocklist = StatefulTable::default();
|
|
||||||
|
|
||||||
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| {
|
||||||
BlocklistUi::draw(f, app, f.area());
|
BlocklistUi::draw(f, app, f.area());
|
||||||
});
|
});
|
||||||
|
|
||||||
insta::assert_snapshot!(output);
|
insta::assert_snapshot!(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[rstest]
|
||||||
fn test_blocklist_ui_renders_with_blocklist_items() {
|
fn test_blocklist_ui_renders_blocklist_tab(
|
||||||
let mut app = App::test_default();
|
#[values(
|
||||||
app.push_navigation_stack(ActiveRadarrBlock::Blocklist.into());
|
ActiveRadarrBlock::Blocklist,
|
||||||
app.data.radarr_data.blocklist = StatefulTable::default();
|
ActiveRadarrBlock::BlocklistSortPrompt,
|
||||||
app.data.radarr_data.blocklist.set_items(vec![
|
ActiveRadarrBlock::DeleteBlocklistItemPrompt,
|
||||||
BlocklistItem {
|
ActiveRadarrBlock::BlocklistClearAllItemsPrompt
|
||||||
id: 1,
|
)]
|
||||||
source_title: "Test.Movie.2023.1080p".to_owned(),
|
active_radarr_block: ActiveRadarrBlock,
|
||||||
..BlocklistItem::default()
|
) {
|
||||||
},
|
let mut app = App::test_default_fully_populated();
|
||||||
BlocklistItem {
|
app.push_navigation_stack(active_radarr_block.into());
|
||||||
id: 2,
|
|
||||||
source_title: "Another.Movie.2023.720p".to_owned(),
|
|
||||||
..BlocklistItem::default()
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
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| {
|
||||||
BlocklistUi::draw(f, app, f.area());
|
BlocklistUi::draw(f, app, f.area());
|
||||||
});
|
});
|
||||||
|
|
||||||
insta::assert_snapshot!(output);
|
insta::assert_snapshot!(active_radarr_block.to_string(), output);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ fn draw_blocklist_table(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
|||||||
movie.title.scroll_left_or_reset(
|
movie.title.scroll_left_or_reset(
|
||||||
get_width_from_percentage(area, 20),
|
get_width_from_percentage(area, 20),
|
||||||
current_selection == *blocklist_item,
|
current_selection == *blocklist_item,
|
||||||
app.tick_count.is_multiple_of(app.ticks_until_scroll),
|
app.ui_scroll_tick_count == 0,
|
||||||
);
|
);
|
||||||
|
|
||||||
let languages_string = languages
|
let languages_string = languages
|
||||||
|
|||||||
-8
@@ -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
|
|
||||||
+7
@@ -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
|
||||||
+34
@@ -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 ││
|
||||||
|
│╰──────────────╯╰─────────────╯│
|
||||||
|
╰───────────────────────────────╯
|
||||||
+42
@@ -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 │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
╰───────────────────────────────╯
|
||||||
+38
@@ -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 ││
|
||||||
|
│╰────────────────────────────╯╰───────────────────────────╯│
|
||||||
|
╰───────────────────────────────────────────────────────────╯
|
||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
source: src/ui/radarr_ui/blocklist/blocklist_ui_tests.rs
|
source: src/ui/radarr_ui/blocklist/blocklist_ui_tests.rs
|
||||||
expression: output
|
expression: output
|
||||||
---
|
---
|
||||||
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
|
||||||
Loading ...
|
Loading ...
|
||||||
+1
-1
@@ -2,4 +2,4 @@
|
|||||||
source: src/ui/radarr_ui/blocklist/blocklist_ui_tests.rs
|
source: src/ui/radarr_ui/blocklist/blocklist_ui_tests.rs
|
||||||
expression: output
|
expression: output
|
||||||
---
|
---
|
||||||
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||||
@@ -90,7 +90,7 @@ pub fn draw_collection_details(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect)
|
|||||||
movie.title.scroll_left_or_reset(
|
movie.title.scroll_left_or_reset(
|
||||||
get_width_from_percentage(table_area, 20),
|
get_width_from_percentage(table_area, 20),
|
||||||
current_selection == *movie,
|
current_selection == *movie,
|
||||||
app.tick_count.is_multiple_of(app.ticks_until_scroll),
|
app.ui_scroll_tick_count == 0,
|
||||||
);
|
);
|
||||||
let (hours, minutes) = convert_runtime(movie.runtime);
|
let (hours, minutes) = convert_runtime(movie.runtime);
|
||||||
let imdb_rating = movie
|
let imdb_rating = movie
|
||||||
@@ -100,7 +100,7 @@ pub fn draw_collection_details(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect)
|
|||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
.value
|
.value
|
||||||
.as_f64()
|
.as_f64()
|
||||||
.unwrap();
|
.unwrap_or_default();
|
||||||
let rotten_tomatoes_rating = movie
|
let rotten_tomatoes_rating = movie
|
||||||
.ratings
|
.ratings
|
||||||
.rotten_tomatoes
|
.rotten_tomatoes
|
||||||
@@ -108,7 +108,7 @@ pub fn draw_collection_details(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect)
|
|||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
.value
|
.value
|
||||||
.as_u64()
|
.as_u64()
|
||||||
.unwrap();
|
.unwrap_or_default();
|
||||||
let imdb_rating = if imdb_rating == 0.0 {
|
let imdb_rating = if imdb_rating == 0.0 {
|
||||||
String::new()
|
String::new()
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use bimap::BiMap;
|
|
||||||
use strum::IntoEnumIterator;
|
use strum::IntoEnumIterator;
|
||||||
|
|
||||||
use crate::app::App;
|
use crate::app::App;
|
||||||
use crate::models::radarr_models::{Collection, CollectionMovie};
|
|
||||||
use crate::models::servarr_data::radarr::radarr_data::{
|
use crate::models::servarr_data::radarr::radarr_data::{
|
||||||
ActiveRadarrBlock, COLLECTION_DETAILS_BLOCKS,
|
ActiveRadarrBlock, COLLECTION_DETAILS_BLOCKS,
|
||||||
};
|
};
|
||||||
use crate::models::stateful_table::StatefulTable;
|
|
||||||
use crate::ui::DrawUi;
|
use crate::ui::DrawUi;
|
||||||
use crate::ui::radarr_ui::collections::collection_details_ui::CollectionDetailsUi;
|
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]
|
#[test]
|
||||||
fn test_collection_details_ui_accepts() {
|
fn test_collection_details_ui_accepts() {
|
||||||
@@ -39,27 +36,40 @@ mod tests {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
mod snapshot_tests {
|
||||||
fn test_collection_details_ui_renders_collection_details() {
|
use super::*;
|
||||||
let mut app = App::test_default();
|
use crate::models::stateful_table::StatefulTable;
|
||||||
app.push_navigation_stack(ActiveRadarrBlock::CollectionDetails.into());
|
use rstest::rstest;
|
||||||
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()
|
|
||||||
}]);
|
|
||||||
|
|
||||||
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
|
#[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());
|
||||||
|
|
||||||
|
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());
|
CollectionDetailsUi::draw(f, app, f.area());
|
||||||
});
|
});
|
||||||
|
|
||||||
insta::assert_snapshot!(output);
|
insta::assert_snapshot!(output);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ mod tests {
|
|||||||
use crate::models::stateful_table::StatefulTable;
|
use crate::models::stateful_table::StatefulTable;
|
||||||
use crate::ui::DrawUi;
|
use crate::ui::DrawUi;
|
||||||
use crate::ui::radarr_ui::collections::CollectionsUi;
|
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]
|
#[test]
|
||||||
fn test_collections_ui_accepts() {
|
fn test_collections_ui_accepts() {
|
||||||
@@ -28,29 +28,130 @@ mod tests {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mod snapshot_tests {
|
||||||
|
use super::*;
|
||||||
|
use crate::models::BlockSelectionState;
|
||||||
|
use crate::models::servarr_data::radarr::radarr_data::EDIT_COLLECTION_SELECTION_BLOCKS;
|
||||||
|
use rstest::rstest;
|
||||||
|
|
||||||
|
#[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();
|
||||||
|
}
|
||||||
|
|
||||||
|
if empty_profile_map {
|
||||||
|
app.data.radarr_data.quality_profile_map = Default::default();
|
||||||
|
}
|
||||||
|
|
||||||
|
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
|
||||||
|
CollectionsUi::draw(f, app, f.area());
|
||||||
|
});
|
||||||
|
|
||||||
|
insta::assert_snapshot!(
|
||||||
|
format!(
|
||||||
|
"is_loading_{is_loading}_empty_movies_{empty_movies}_empty_profile_{empty_profile_map}"
|
||||||
|
),
|
||||||
|
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!(format!("collections_tab_{active_radarr_block}"), output);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_collections_ui_renders_loading_state() {
|
fn test_radarr_ui_renders_collections_tab_empty() {
|
||||||
let mut app = App::test_default();
|
let mut app = App::test_default_fully_populated();
|
||||||
app.is_loading = true;
|
app.data.radarr_data.collections = StatefulTable::default();
|
||||||
app.push_navigation_stack(ActiveRadarrBlock::Collections.into());
|
app.push_navigation_stack(ActiveRadarrBlock::Collections.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| {
|
||||||
CollectionsUi::draw(f, app, f.area());
|
CollectionsUi::draw(f, app, f.area());
|
||||||
});
|
});
|
||||||
|
|
||||||
insta::assert_snapshot!(output);
|
insta::assert_snapshot!(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[rstest]
|
||||||
fn test_collections_ui_renders_empty_collections() {
|
#[case(
|
||||||
let mut app = App::test_default();
|
ActiveRadarrBlock::CollectionDetails,
|
||||||
app.push_navigation_stack(ActiveRadarrBlock::Collections.into());
|
ActiveRadarrBlock::EditCollectionPrompt
|
||||||
app.data.radarr_data.collections = StatefulTable::default();
|
)]
|
||||||
|
#[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(120, 30, &mut app, |f, app| {
|
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
|
||||||
CollectionsUi::draw(f, app, f.area());
|
CollectionsUi::draw(f, app, f.area());
|
||||||
});
|
});
|
||||||
|
|
||||||
insta::assert_snapshot!(output);
|
insta::assert_snapshot!(
|
||||||
|
format!(
|
||||||
|
"edit_collection_modal_{}_{}",
|
||||||
|
active_radarr_block.to_string(),
|
||||||
|
context_block.to_string()
|
||||||
|
),
|
||||||
|
output
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,15 @@
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use bimap::BiMap;
|
|
||||||
use strum::IntoEnumIterator;
|
use strum::IntoEnumIterator;
|
||||||
|
|
||||||
use crate::app::App;
|
use crate::app::App;
|
||||||
use crate::models::BlockSelectionState;
|
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::{
|
use crate::models::servarr_data::radarr::radarr_data::{
|
||||||
ActiveRadarrBlock, EDIT_COLLECTION_BLOCKS, EDIT_COLLECTION_SELECTION_BLOCKS,
|
ActiveRadarrBlock, EDIT_COLLECTION_BLOCKS, EDIT_COLLECTION_SELECTION_BLOCKS,
|
||||||
};
|
};
|
||||||
use crate::models::stateful_table::StatefulTable;
|
|
||||||
use crate::ui::DrawUi;
|
use crate::ui::DrawUi;
|
||||||
use crate::ui::radarr_ui::collections::edit_collection_ui::EditCollectionUi;
|
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]
|
#[test]
|
||||||
fn test_edit_collection_ui_accepts() {
|
fn test_edit_collection_ui_accepts() {
|
||||||
@@ -34,28 +30,88 @@ mod tests {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
mod snapshot_tests {
|
||||||
fn test_edit_collection_ui_renders_edit_collection_modal() {
|
use super::*;
|
||||||
let mut app = App::test_default();
|
use rstest::rstest;
|
||||||
app.push_navigation_stack(ActiveRadarrBlock::EditCollectionRootFolderPathInput.into());
|
|
||||||
app.data.radarr_data.quality_profile_map = BiMap::from_iter(vec![(1, "HD - 1080p".to_owned())]);
|
#[rstest]
|
||||||
app.data.radarr_data.collections = StatefulTable::default();
|
#[case(
|
||||||
app.data.radarr_data.collections.set_items(vec![Collection {
|
ActiveRadarrBlock::Collections,
|
||||||
id: 1,
|
ActiveRadarrBlock::EditCollectionPrompt
|
||||||
title: "Test Collection".into(),
|
)]
|
||||||
quality_profile_id: 1,
|
#[case(
|
||||||
root_folder_path: Some("/movies".to_owned()),
|
ActiveRadarrBlock::Collections,
|
||||||
..Collection::default()
|
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 =
|
app.data.radarr_data.selected_block =
|
||||||
BlockSelectionState::new(EDIT_COLLECTION_SELECTION_BLOCKS);
|
BlockSelectionState::new(EDIT_COLLECTION_SELECTION_BLOCKS);
|
||||||
app.data.radarr_data.edit_collection_modal =
|
|
||||||
Some(EditCollectionModal::from(&app.data.radarr_data));
|
|
||||||
|
|
||||||
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| {
|
||||||
EditCollectionUi::draw(f, app, f.area());
|
EditCollectionUi::draw(f, app, f.area());
|
||||||
});
|
});
|
||||||
|
|
||||||
insta::assert_snapshot!(output);
|
insta::assert_snapshot!(
|
||||||
|
format!(
|
||||||
|
"{}_{}",
|
||||||
|
active_radarr_block.to_string(),
|
||||||
|
context_block.to_string()
|
||||||
|
),
|
||||||
|
output
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ impl DrawUi for CollectionsUi {
|
|||||||
draw_collections(f, app, area);
|
draw_collections(f, app, area);
|
||||||
|
|
||||||
match route {
|
match route {
|
||||||
_ if CollectionDetailsUi::accepts(route) => CollectionDetailsUi::draw(f, app, area),
|
|
||||||
_ if EditCollectionUi::accepts(route) => EditCollectionUi::draw(f, app, area),
|
_ if EditCollectionUi::accepts(route) => EditCollectionUi::draw(f, app, area),
|
||||||
|
_ if CollectionDetailsUi::accepts(route) => CollectionDetailsUi::draw(f, app, area),
|
||||||
Route::Radarr(ActiveRadarrBlock::UpdateAllCollectionsPrompt, _) => {
|
Route::Radarr(ActiveRadarrBlock::UpdateAllCollectionsPrompt, _) => {
|
||||||
let confirmation_prompt = ConfirmationPrompt::new()
|
let confirmation_prompt = ConfirmationPrompt::new()
|
||||||
.title("Update All Collections")
|
.title("Update All Collections")
|
||||||
@@ -70,7 +70,7 @@ pub(super) fn draw_collections(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect)
|
|||||||
collection.title.scroll_left_or_reset(
|
collection.title.scroll_left_or_reset(
|
||||||
get_width_from_percentage(area, 25),
|
get_width_from_percentage(area, 25),
|
||||||
*collection == current_selection,
|
*collection == current_selection,
|
||||||
app.tick_count.is_multiple_of(app.ticks_until_scroll),
|
app.ui_scroll_tick_count == 0,
|
||||||
);
|
);
|
||||||
let monitored = if collection.monitored { "🏷" } else { "" };
|
let monitored = if collection.monitored { "🏷" } else { "" };
|
||||||
let search_on_add = if collection.search_on_add {
|
let search_on_add = if collection.search_on_add {
|
||||||
|
|||||||
-30
@@ -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 ──────────────────────────────────────────────────────────────────────────────│
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
│ │
|
|
||||||
╰────────────────────────────────────────────────────────────────────────────────────────╯
|
|
||||||
+48
@@ -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 │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
+48
@@ -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 │
|
||||||
|
│ │ │ │
|
||||||
|
│ │ │ │
|
||||||
|
│ │ │ │
|
||||||
|
│ │ │ │
|
||||||
|
│ │ │ │
|
||||||
|
│ │ │ │
|
||||||
|
│ │ │ │
|
||||||
|
│ │ │ │
|
||||||
|
│ │ │ │
|
||||||
|
│ │ │ │
|
||||||
|
│ │ │ │
|
||||||
|
│ │ │ │
|
||||||
|
│ │ │ │
|
||||||
|
│ │ │ │
|
||||||
|
│ │ │ │
|
||||||
|
│ ╰────────────────────────────────────────────────────────────────╯ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
+48
@@ -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 ────────────────────────────────────────────────────────────────────────────────────────────────────────────────│
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
+7
@@ -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 🏷
|
||||||
+42
@@ -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 │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
╰───────────────────────────────╯
|
||||||
+28
@@ -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 │
|
||||||
|
╰─────────────────────────────────────────────╯
|
||||||
+31
@@ -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│
|
||||||
|
│ │
|
||||||
|
╰───────────────────────────────────────╯
|
||||||
+28
@@ -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 │
|
||||||
|
╰─────────────────────────────────────────────╯
|
||||||
+31
@@ -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 │
|
||||||
|
│ │
|
||||||
|
╰───────────────────────────────────────╯
|
||||||
+38
@@ -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 ││
|
||||||
|
│╰────────────────────────────╯╰───────────────────────────╯│
|
||||||
|
╰───────────────────────────────────────────────────────────╯
|
||||||
+48
@@ -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 ││ │
|
||||||
|
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
|
||||||
|
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
+48
@@ -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 ││ │
|
||||||
|
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
|
||||||
|
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
+48
@@ -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 ││ │
|
||||||
|
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
|
||||||
|
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
+48
@@ -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 ││ │
|
||||||
|
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
|
||||||
|
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
+48
@@ -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 ││ │
|
||||||
|
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
|
||||||
|
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
+48
@@ -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 ││ │
|
||||||
|
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
|
||||||
|
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
+48
@@ -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 ││ │
|
||||||
|
│ │╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│ │
|
||||||
|
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────╯ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
│ │
|
||||||
|
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
source: src/ui/radarr_ui/collections/collections_ui_tests.rs
|
source: src/ui/radarr_ui/collections/collections_ui_tests.rs
|
||||||
expression: output
|
expression: output
|
||||||
---
|
---
|
||||||
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
|
||||||
Loading ...
|
Loading ...
|
||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
source: src/ui/radarr_ui/collections/collections_ui_tests.rs
|
source: src/ui/radarr_ui/collections/collections_ui_tests.rs
|
||||||
expression: output
|
expression: output
|
||||||
---
|
---
|
||||||
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
|
||||||
Loading ...
|
Loading ...
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
source: src/ui/radarr_ui/collections/collections_ui_tests.rs
|
||||||
|
expression: output
|
||||||
|
---
|
||||||
|
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
|
||||||
|
Loading ...
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
source: src/ui/radarr_ui/collections/collections_ui_tests.rs
|
||||||
|
expression: output
|
||||||
|
---
|
||||||
|
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||||
-28
@@ -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: │ │ │
|
|
||||||
│ ╰───╯ │
|
|
||||||
╰──────────────────────────────────────────────────────────────────────╯
|
|
||||||
+44
@@ -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 ││
|
||||||
|
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
|
||||||
|
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
+44
@@ -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 ││
|
||||||
|
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
|
||||||
|
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
+44
@@ -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 ││
|
||||||
|
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
|
||||||
|
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
+44
@@ -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 ││
|
||||||
|
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
|
||||||
|
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
+44
@@ -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 ││
|
||||||
|
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
|
||||||
|
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
+44
@@ -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 ││
|
||||||
|
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
|
||||||
|
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
+44
@@ -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 ││
|
||||||
|
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
|
||||||
|
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
+44
@@ -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 ││
|
||||||
|
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
|
||||||
|
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
+44
@@ -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 ││
|
||||||
|
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
|
||||||
|
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
+44
@@ -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 ││
|
||||||
|
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
|
||||||
|
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
+44
@@ -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 ││
|
||||||
|
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
|
||||||
|
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
+44
@@ -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 ││
|
||||||
|
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
|
||||||
|
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
+44
@@ -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 ││
|
||||||
|
│╰───────────────────────────────────────────────╯╰──────────────────────────────────────────────╯│
|
||||||
|
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
+44
@@ -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 strum::IntoEnumIterator;
|
||||||
|
|
||||||
use crate::app::App;
|
use crate::app::App;
|
||||||
use crate::models::radarr_models::DownloadRecord;
|
|
||||||
use crate::models::servarr_data::radarr::radarr_data::{ActiveRadarrBlock, DOWNLOADS_BLOCKS};
|
use crate::models::servarr_data::radarr::radarr_data::{ActiveRadarrBlock, DOWNLOADS_BLOCKS};
|
||||||
use crate::models::stateful_table::StatefulTable;
|
|
||||||
use crate::ui::DrawUi;
|
use crate::ui::DrawUi;
|
||||||
use crate::ui::radarr_ui::downloads::DownloadsUi;
|
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]
|
#[test]
|
||||||
fn test_downloads_ui_accepts() {
|
fn test_downloads_ui_accepts() {
|
||||||
@@ -21,62 +19,52 @@ mod tests {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mod snapshot_tests {
|
||||||
|
use super::*;
|
||||||
|
use rstest::rstest;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_downloads_ui_renders_loading_state() {
|
fn test_radarr_ui_renders_downloads_tab_loading() {
|
||||||
let mut app = App::test_default();
|
let mut app = App::test_default_fully_populated();
|
||||||
|
app.push_navigation_stack(ActiveRadarrBlock::Downloads.into());
|
||||||
app.is_loading = true;
|
app.is_loading = true;
|
||||||
app.push_navigation_stack(ActiveRadarrBlock::Downloads.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| {
|
||||||
DownloadsUi::draw(f, app, f.area());
|
DownloadsUi::draw(f, app, f.area());
|
||||||
});
|
});
|
||||||
|
|
||||||
insta::assert_snapshot!(output);
|
insta::assert_snapshot!(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[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());
|
||||||
|
|
||||||
|
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
|
||||||
|
DownloadsUi::draw(f, app, f.area());
|
||||||
|
});
|
||||||
|
|
||||||
|
insta::assert_snapshot!(active_radarr_block.to_string(), output);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_downloads_ui_renders_empty_downloads() {
|
fn test_radarr_ui_renders_downloads_tab_empty() {
|
||||||
let mut app = App::test_default();
|
let mut app = App::test_default();
|
||||||
app.push_navigation_stack(ActiveRadarrBlock::Downloads.into());
|
app.push_navigation_stack(ActiveRadarrBlock::Downloads.into());
|
||||||
app.data.radarr_data.downloads = StatefulTable::default();
|
|
||||||
|
|
||||||
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| {
|
||||||
DownloadsUi::draw(f, app, f.area());
|
DownloadsUi::draw(f, app, f.area());
|
||||||
});
|
});
|
||||||
|
|
||||||
insta::assert_snapshot!(output);
|
insta::assert_snapshot!(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[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()
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
let output = render_to_string_with_app(120, 30, &mut app, |f, app| {
|
|
||||||
DownloadsUi::draw(f, app, f.area());
|
|
||||||
});
|
|
||||||
|
|
||||||
insta::assert_snapshot!(output);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ fn draw_downloads(f: &mut Frame<'_>, app: &mut App<'_>, area: Rect) {
|
|||||||
output_path.as_ref().unwrap().scroll_left_or_reset(
|
output_path.as_ref().unwrap().scroll_left_or_reset(
|
||||||
get_width_from_percentage(area, 18),
|
get_width_from_percentage(area, 18),
|
||||||
current_selection == *download_record,
|
current_selection == *download_record,
|
||||||
app.tick_count.is_multiple_of(app.ticks_until_scroll),
|
app.ui_scroll_tick_count == 0,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
-8
@@ -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
|
|
||||||
+38
@@ -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 ││
|
||||||
|
│╰────────────────────────────╯╰───────────────────────────╯│
|
||||||
|
╰───────────────────────────────────────────────────────────╯
|
||||||
+7
@@ -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
|
||||||
+38
@@ -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 ││
|
||||||
|
│╰────────────────────────────╯╰───────────────────────────╯│
|
||||||
|
╰───────────────────────────────────────────────────────────╯
|
||||||
+1
-1
@@ -2,4 +2,4 @@
|
|||||||
source: src/ui/radarr_ui/downloads/downloads_ui_tests.rs
|
source: src/ui/radarr_ui/downloads/downloads_ui_tests.rs
|
||||||
expression: output
|
expression: output
|
||||||
---
|
---
|
||||||
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
source: src/ui/radarr_ui/downloads/downloads_ui_tests.rs
|
source: src/ui/radarr_ui/downloads/downloads_ui_tests.rs
|
||||||
expression: output
|
expression: output
|
||||||
---
|
---
|
||||||
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
|
||||||
Loading ...
|
Loading ...
|
||||||
@@ -4,16 +4,13 @@ mod tests {
|
|||||||
|
|
||||||
use crate::app::App;
|
use crate::app::App;
|
||||||
use crate::models::BlockSelectionState;
|
use crate::models::BlockSelectionState;
|
||||||
use crate::models::servarr_data::modals::EditIndexerModal;
|
|
||||||
use crate::models::servarr_data::radarr::radarr_data::{
|
use crate::models::servarr_data::radarr::radarr_data::{
|
||||||
ActiveRadarrBlock, EDIT_INDEXER_BLOCKS, EDIT_INDEXER_TORRENT_SELECTION_BLOCKS,
|
ActiveRadarrBlock, EDIT_INDEXER_BLOCKS, EDIT_INDEXER_TORRENT_SELECTION_BLOCKS,
|
||||||
};
|
};
|
||||||
use crate::models::servarr_models::{Indexer, IndexerField};
|
use crate::models::servarr_models::Indexer;
|
||||||
use crate::models::stateful_table::StatefulTable;
|
|
||||||
use crate::ui::DrawUi;
|
use crate::ui::DrawUi;
|
||||||
use crate::ui::radarr_ui::indexers::edit_indexer_ui::EditIndexerUi;
|
use crate::ui::radarr_ui::indexers::edit_indexer_ui::EditIndexerUi;
|
||||||
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};
|
||||||
use serde_json::json;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_edit_indexer_ui_accepts() {
|
fn test_edit_indexer_ui_accepts() {
|
||||||
@@ -26,40 +23,41 @@ mod tests {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mod snapshot_tests {
|
||||||
|
use super::*;
|
||||||
|
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;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_edit_indexer_ui_renders_edit_indexer_modal() {
|
fn test_edit_indexer_ui_renders_edit_indexer_modal_torrent() {
|
||||||
let mut app = App::test_default();
|
let mut app = App::test_default_fully_populated();
|
||||||
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 =
|
app.data.radarr_data.selected_block =
|
||||||
BlockSelectionState::new(EDIT_INDEXER_TORRENT_SELECTION_BLOCKS);
|
BlockSelectionState::new(EDIT_INDEXER_TORRENT_SELECTION_BLOCKS);
|
||||||
app.data.radarr_data.edit_indexer_modal = Some(EditIndexerModal::from(&app.data.radarr_data));
|
app.push_navigation_stack(ActiveRadarrBlock::EditIndexerPrompt.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| {
|
||||||
EditIndexerUi::draw(f, app, f.area());
|
EditIndexerUi::draw(f, app, f.area());
|
||||||
});
|
});
|
||||||
|
|
||||||
insta::assert_snapshot!(output);
|
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::app::App;
|
||||||
use crate::models::BlockSelectionState;
|
use crate::models::BlockSelectionState;
|
||||||
use crate::models::radarr_models::IndexerSettings;
|
|
||||||
use crate::models::servarr_data::radarr::radarr_data::{
|
use crate::models::servarr_data::radarr::radarr_data::{
|
||||||
ActiveRadarrBlock, INDEXER_SETTINGS_BLOCKS, INDEXER_SETTINGS_SELECTION_BLOCKS,
|
ActiveRadarrBlock, INDEXER_SETTINGS_BLOCKS, INDEXER_SETTINGS_SELECTION_BLOCKS,
|
||||||
};
|
};
|
||||||
use crate::ui::DrawUi;
|
use crate::ui::DrawUi;
|
||||||
use crate::ui::radarr_ui::indexers::indexer_settings_ui::IndexerSettingsUi;
|
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]
|
#[test]
|
||||||
fn test_indexer_settings_ui_accepts() {
|
fn test_indexer_settings_ui_accepts() {
|
||||||
@@ -23,18 +22,21 @@ mod tests {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mod snapshot_tests {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_indexer_settings_ui_renders_indexer_settings() {
|
fn test_indexer_settings_ui_renders_indexer_settings() {
|
||||||
let mut app = App::test_default();
|
let mut app = App::test_default_fully_populated();
|
||||||
app.push_navigation_stack(ActiveRadarrBlock::IndexerSettingsMinimumAgeInput.into());
|
app.push_navigation_stack(ActiveRadarrBlock::IndexerSettingsMinimumAgeInput.into());
|
||||||
app.data.radarr_data.selected_block =
|
app.data.radarr_data.selected_block =
|
||||||
BlockSelectionState::new(INDEXER_SETTINGS_SELECTION_BLOCKS);
|
BlockSelectionState::new(INDEXER_SETTINGS_SELECTION_BLOCKS);
|
||||||
app.data.radarr_data.indexer_settings = Some(IndexerSettings::default());
|
|
||||||
|
|
||||||
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| {
|
||||||
IndexerSettingsUi::draw(f, app, f.area());
|
IndexerSettingsUi::draw(f, app, f.area());
|
||||||
});
|
});
|
||||||
|
|
||||||
insta::assert_snapshot!(output);
|
insta::assert_snapshot!(output);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,11 +6,10 @@ mod tests {
|
|||||||
use crate::models::servarr_data::radarr::radarr_data::{
|
use crate::models::servarr_data::radarr::radarr_data::{
|
||||||
ActiveRadarrBlock, EDIT_INDEXER_BLOCKS, INDEXER_SETTINGS_BLOCKS, INDEXERS_BLOCKS,
|
ActiveRadarrBlock, EDIT_INDEXER_BLOCKS, INDEXER_SETTINGS_BLOCKS, INDEXERS_BLOCKS,
|
||||||
};
|
};
|
||||||
use crate::models::servarr_models::Indexer;
|
|
||||||
use crate::models::stateful_table::StatefulTable;
|
use crate::models::stateful_table::StatefulTable;
|
||||||
use crate::ui::DrawUi;
|
use crate::ui::DrawUi;
|
||||||
use crate::ui::radarr_ui::indexers::IndexersUi;
|
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]
|
#[test]
|
||||||
fn test_indexers_ui_accepts() {
|
fn test_indexers_ui_accepts() {
|
||||||
@@ -29,13 +28,16 @@ mod tests {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mod snapshot_tests {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_indexers_ui_renders_loading_state() {
|
fn test_indexers_ui_renders_indexers_tab_loading() {
|
||||||
let mut app = App::test_default();
|
let mut app = App::test_default_fully_populated();
|
||||||
app.is_loading = true;
|
app.is_loading = true;
|
||||||
app.push_navigation_stack(ActiveRadarrBlock::Indexers.into());
|
app.push_navigation_stack(ActiveRadarrBlock::Indexers.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| {
|
||||||
IndexersUi::draw(f, app, f.area());
|
IndexersUi::draw(f, app, f.area());
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -43,12 +45,12 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_indexers_ui_renders_empty_indexers() {
|
fn test_indexers_ui_renders_indexers_tab_empty_indexers() {
|
||||||
let mut app = App::test_default();
|
let mut app = App::test_default_fully_populated();
|
||||||
app.push_navigation_stack(ActiveRadarrBlock::Indexers.into());
|
app.push_navigation_stack(ActiveRadarrBlock::Indexers.into());
|
||||||
app.data.radarr_data.indexers = StatefulTable::default();
|
app.data.radarr_data.indexers = StatefulTable::default();
|
||||||
|
|
||||||
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| {
|
||||||
IndexersUi::draw(f, app, f.area());
|
IndexersUi::draw(f, app, f.area());
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -56,32 +58,67 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_indexers_ui_renders_with_indexers() {
|
fn test_indexers_ui_renders_indexers_tab() {
|
||||||
let mut app = App::test_default();
|
let mut app = App::test_default_fully_populated();
|
||||||
app.push_navigation_stack(ActiveRadarrBlock::Indexers.into());
|
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| {
|
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
|
||||||
IndexersUi::draw(f, app, f.area());
|
IndexersUi::draw(f, app, f.area());
|
||||||
});
|
});
|
||||||
|
|
||||||
insta::assert_snapshot!(output);
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
-27
@@ -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 │ │
|
|
||||||
│ ╰──────────────────╯╰───────────────────╯ │
|
|
||||||
╰──────────────────────────────────────────────────────────────────────────────────╯
|
|
||||||
+42
@@ -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 │ │
|
||||||
|
│ ╰───────────────────────────╯╰──────────────────────────╯ │
|
||||||
|
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
+42
@@ -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 │ │
|
||||||
|
│ ╰───────────────────────────╯╰──────────────────────────╯ │
|
||||||
|
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
-27
@@ -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 │ │
|
|
||||||
│ ╰──────────────────╯╰───────────────────╯ │
|
|
||||||
╰──────────────────────────────────────────────────────────────────────────────────╯
|
|
||||||
+42
@@ -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 │ │
|
||||||
|
│ ╰───────────────────────────╯╰──────────────────────────╯ │
|
||||||
|
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
-8
@@ -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
|
|
||||||
+38
@@ -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 ││
|
||||||
|
│╰────────────────────────────╯╰───────────────────────────╯│
|
||||||
|
╰───────────────────────────────────────────────────────────╯
|
||||||
+7
@@ -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
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user