summaryrefslogtreecommitdiff
path: root/internal/tui/dashboard/model_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-25 10:30:22 +0200
committerPaul Buetow <paul@buetow.org>2026-02-25 10:30:22 +0200
commitad32edac09cf18a7f6a4be57e9d4467ab05d409c (patch)
tree0a60be43d7acf2ce1475478d82abc31b05587250 /internal/tui/dashboard/model_test.go
parent7dfd9784af4704be02b7d96c97a6454b5de749dc (diff)
Wire grouped files mode into active tab rendering
Diffstat (limited to 'internal/tui/dashboard/model_test.go')
-rw-r--r--internal/tui/dashboard/model_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/internal/tui/dashboard/model_test.go b/internal/tui/dashboard/model_test.go
index c243018..c1b2e1d 100644
--- a/internal/tui/dashboard/model_test.go
+++ b/internal/tui/dashboard/model_test.go
@@ -291,3 +291,17 @@ func TestViewRendersTabBarAndHelp(t *testing.T) {
t.Fatalf("expected help bar text in view")
}
}
+
+func TestRenderActiveTabUsesDirectoryFilesViewWhenGrouped(t *testing.T) {
+ snap := statsengine.NewSnapshot(
+ nil, nil, nil, nil,
+ []statsengine.FileSnapshot{{Path: "/tmp/a.log", Accesses: 2}},
+ nil,
+ statsengine.HistogramSnapshot{},
+ statsengine.HistogramSnapshot{},
+ )
+ out := renderActiveTab(TabFiles, &snap, nil, 120, 30, 0, 0, true, 0, 0)
+ if !strings.Contains(out, "Directory") {
+ t.Fatalf("expected grouped directory files view header, got %q", out)
+ }
+}