summaryrefslogtreecommitdiff
path: root/internal/tui/tui_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-24 17:16:17 +0200
committerPaul Buetow <paul@buetow.org>2026-02-24 17:16:17 +0200
commit2ae0b33c9f196634eaa55bd6997d1feae9147385 (patch)
treeea4e0e705c693e44f29924014431186af635b7e5 /internal/tui/tui_test.go
parent92114c3b6bfe8a3d28487fcfb34fd291c573500c (diff)
tui: improve dashboard tab navigation and live updates
Diffstat (limited to 'internal/tui/tui_test.go')
-rw-r--r--internal/tui/tui_test.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/internal/tui/tui_test.go b/internal/tui/tui_test.go
index d62d283..fd7adfa 100644
--- a/internal/tui/tui_test.go
+++ b/internal/tui/tui_test.go
@@ -314,6 +314,21 @@ func TestHelpToggleDoesNotBreakExportModalInput(t *testing.T) {
}
}
+func TestExportModalStillAllowsDashboardStatsUpdates(t *testing.T) {
+ m := NewModel(-1, func(context.Context) error { return nil })
+ m.screen = ScreenDashboard
+ m.attaching = false
+ m.exporter = m.exporter.Open()
+
+ snap := &statsengine.Snapshot{TotalSyscalls: 99}
+ next, _ := m.Update(StatsTickMsg{Snap: snap})
+ updated := next.(Model)
+
+ if got := updated.dashboard.LatestSnapshot(); got != snap {
+ t.Fatalf("expected dashboard snapshot update while export modal visible")
+ }
+}
+
func TestDashboardTabKeysChangeActiveView(t *testing.T) {
m := NewModel(-1, func(context.Context) error { return nil })
m.screen = ScreenDashboard