Add TUI hardware banner and polish SAT summaries

This commit is contained in:
Mikhail Chusavitin
2026-03-15 14:27:01 +03:00
parent b483e2ce35
commit b8c235b5ac
12 changed files with 667 additions and 47 deletions

View File

@@ -179,6 +179,24 @@ func TestMainMenuAsyncActionsSetBusy(t *testing.T) {
}
}
func TestMainViewIncludesBanner(t *testing.T) {
t.Parallel()
m := newTestModel()
m.banner = "System: Test Server | S/N ABC123\nIP: 10.0.0.10"
view := m.View()
if !strings.Contains(view, "System: Test Server | S/N ABC123") {
t.Fatalf("view missing system banner:\n%s", view)
}
if !strings.Contains(view, "IP: 10.0.0.10") {
t.Fatalf("view missing ip banner:\n%s", view)
}
if !strings.Contains(view, "Select action") {
t.Fatalf("view missing menu subtitle:\n%s", view)
}
}
func TestEscapeNavigation(t *testing.T) {
t.Parallel()