test: Wrote snapshot tests for all Sonarr UI
This commit is contained in:
@@ -6,9 +6,8 @@ pub mod test_utils {
|
||||
Movie, MovieCollection, MovieFile, MovieHistoryItem, RadarrRelease, RadarrTask, RadarrTaskName,
|
||||
Rating, RatingsList,
|
||||
};
|
||||
use crate::models::servarr_data::modals::IndexerTestResultModalItem;
|
||||
use crate::models::servarr_models::{
|
||||
DiskSpace, Indexer, IndexerField, Language, Quality, QualityWrapper, QueueEvent, RootFolder,
|
||||
Indexer, IndexerField, Language, Quality, QualityWrapper, RootFolder,
|
||||
};
|
||||
use crate::models::{HorizontallyScrollableText, ScrollableText};
|
||||
use bimap::BiMap;
|
||||
@@ -108,13 +107,6 @@ pub mod test_utils {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn diskspace() -> DiskSpace {
|
||||
DiskSpace {
|
||||
free_space: 6500,
|
||||
total_space: 8675309,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn log_line() -> &'static str {
|
||||
"2025-12-15 16:14:45 UTC|INFO|DownloadDecisionMaker|Processing 545 releases"
|
||||
}
|
||||
@@ -130,23 +122,6 @@ pub mod test_utils {
|
||||
}
|
||||
}
|
||||
|
||||
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()),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn tags_map() -> BiMap<i64, String> {
|
||||
BiMap::from_iter([(1, "alex".to_owned())])
|
||||
}
|
||||
@@ -490,14 +465,6 @@ pub mod test_utils {
|
||||
))
|
||||
}
|
||||
|
||||
pub fn indexer_test_result() -> IndexerTestResultModalItem {
|
||||
IndexerTestResultModalItem {
|
||||
name: "DrunkenSlug".to_owned(),
|
||||
is_valid: false,
|
||||
validation_failures: "Some failure".into(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn torrent_release() -> RadarrRelease {
|
||||
RadarrRelease {
|
||||
guid: "1234".to_string(),
|
||||
|
||||
Reference in New Issue
Block a user