test: Created snapshot tests for all Radarr UI modules

This commit is contained in:
2025-12-15 20:17:09 -07:00
parent 7084ca1be2
commit 316ed64315
273 changed files with 8859 additions and 2031 deletions
+5 -3
View File
@@ -22,6 +22,8 @@ mod tests {
}
mod snapshot_tests {
use crate::ui::ui_test_utils::test_utils::TerminalSize;
use super::*;
#[test]
@@ -30,7 +32,7 @@ mod tests {
app.is_loading = true;
app.push_navigation_stack(ActiveSonarrBlock::History.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| {
HistoryUi::draw(f, app, f.area());
});
@@ -43,7 +45,7 @@ mod tests {
app.push_navigation_stack(ActiveSonarrBlock::History.into());
app.data.sonarr_data.history = 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| {
HistoryUi::draw(f, app, f.area());
});
@@ -68,7 +70,7 @@ mod tests {
},
]);
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| {
HistoryUi::draw(f, app, f.area());
});
@@ -2,4 +2,4 @@
source: src/ui/sonarr_ui/history/history_ui_tests.rs
expression: output
---
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
@@ -2,7 +2,7 @@
source: src/ui/sonarr_ui/history/history_ui_tests.rs
expression: output
---
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Loading ...
@@ -2,7 +2,7 @@
source: src/ui/sonarr_ui/history/history_ui_tests.rs
expression: output
---
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Source Title Event Type Language Quality Date
=> Test.Series.S01E01 unknown 1970-01-01 00:00:00 UTC
Another.Series.S02E05 unknown 1970-01-01 00:00:00 UTC
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Source Title Event Type Language Quality Date
=> Test.Series.S01E01 unknown 1970-01-01 00:00:00 UTC
Another.Series.S02E05 unknown 1970-01-01 00:00:00 UTC