test(radarr): cover the updates popup empty state

Radarr was the only tree without a test rendering draw_updates_popup with no update text, leaving its loading branch unreachable from the suite. Forcing the guard true went undetected.
This commit is contained in:
Dark-Alex-17 committed 2026-09-10 00:53:07 -06:00
1 parent 7e8072133c
commit f7c67ad58b
2 files changed
+63

No files matched your search

@@ -0,0 +1,48 @@
---
source: src/ui/radarr_ui/system/system_details_ui_tests.rs
expression: output
---
╭ Updates ───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ │
│ Loading ... │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@@ -24,6 +24,7 @@ mod tests {
mod snapshot_tests {
use super::*;
use crate::models::ScrollableText;
use rstest::rstest;
#[rstest]
@@ -85,5 +86,19 @@ mod tests {
insta::assert_snapshot!(output);
}
#[test]
fn test_system_details_ui_renders_updates_loading_when_empty() {
let mut app = App::test_default_fully_populated();
app.is_loading = true;
app.push_navigation_stack(ActiveRadarrBlock::SystemUpdates.into());
app.data.radarr_data.updates = ScrollableText::with_string("".to_string());
let output = render_to_string_with_app(TerminalSize::Large, &mut app, |f, app| {
SystemDetailsUi::draw(f, app, f.area());
});
insta::assert_snapshot!(output);
}
}
}