test: Created snapshot tests for all Radarr UI modules
This commit is contained in:
@@ -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::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());
|
||||
});
|
||||
|
||||
@@ -43,7 +45,7 @@ mod tests {
|
||||
app.push_navigation_stack(ActiveSonarrBlock::Downloads.into());
|
||||
app.data.sonarr_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());
|
||||
});
|
||||
|
||||
@@ -74,7 +76,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| {
|
||||
DownloadsUi::draw(f, app, f.area());
|
||||
});
|
||||
|
||||
|
||||
+1
-1
@@ -2,4 +2,4 @@
|
||||
source: src/ui/sonarr_ui/downloads/downloads_ui_tests.rs
|
||||
expression: output
|
||||
---
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
+3
-3
@@ -2,7 +2,7 @@
|
||||
source: src/ui/sonarr_ui/downloads/downloads_ui_tests.rs
|
||||
expression: output
|
||||
---
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
|
||||
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
|
||||
Loading ...
|
||||
|
||||
+4
-4
@@ -2,7 +2,7 @@
|
||||
source: src/ui/sonarr_ui/downloads/downloads_ui_tests.rs
|
||||
expression: output
|
||||
---
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
Title Percent Compl Size Output Path Indexer Download Client
|
||||
=> Test Series Download 50% 1.00 GB
|
||||
Another Series Download 100% 2.00 GB
|
||||
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
Title Percent Complete Size Output Path Indexer Download Client
|
||||
=> Test Series Download 50% 1.00 GB
|
||||
Another Series Download 100% 2.00 GB
|
||||
|
||||
Reference in New Issue
Block a user