summaryrefslogtreecommitdiff
path: root/internal/tui/dashboard/model_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-06 18:26:39 +0200
committerPaul Buetow <paul@buetow.org>2026-03-06 18:26:39 +0200
commitbd076884619c8f4d9e76ef8bc67b3bfd8b83235a (patch)
tree74ae380bf616e1b3b298e0f5a8e790e6469f06c3 /internal/tui/dashboard/model_test.go
parentb566bc141e971ae2a7634c9d836f2ad8b0a62402 (diff)
refactor(tui): add dashboard viz mode registry (task 382)
Diffstat (limited to 'internal/tui/dashboard/model_test.go')
-rw-r--r--internal/tui/dashboard/model_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/tui/dashboard/model_test.go b/internal/tui/dashboard/model_test.go
index 934577d..e33271b 100644
--- a/internal/tui/dashboard/model_test.go
+++ b/internal/tui/dashboard/model_test.go
@@ -353,13 +353,13 @@ func TestBubbleVisualizationToggleForSyscallsTab(t *testing.T) {
next, _ := m.Update(tea.KeyPressMsg{Code: []rune{'v'}[0], Text: string([]rune{'v'})})
model := next.(Model)
- if !model.syscallsBubble {
+ if got := model.syscallsVizMode; got != tabVizModeBubbles {
t.Fatalf("expected syscalls bubble mode enabled")
}
next, _ = model.Update(tea.KeyPressMsg{Code: []rune{'v'}[0], Text: string([]rune{'v'})})
model = next.(Model)
- if model.syscallsBubble {
+ if got := model.syscallsVizMode; got != tabVizModeTable {
t.Fatalf("expected syscalls bubble mode toggled off")
}
}
@@ -390,7 +390,7 @@ func TestFilesBubbleRequiresDirectoryMode(t *testing.T) {
next, _ := m.Update(tea.KeyPressMsg{Code: []rune{'v'}[0], Text: string([]rune{'v'})})
model := next.(Model)
- if model.filesBubble {
+ if got := model.filesVizMode; got != tabVizModeTable {
t.Fatalf("expected files bubble mode to stay disabled without directory mode")
}
@@ -402,13 +402,13 @@ func TestFilesBubbleRequiresDirectoryMode(t *testing.T) {
next, _ = model.Update(tea.KeyPressMsg{Code: []rune{'v'}[0], Text: string([]rune{'v'})})
model = next.(Model)
- if !model.filesBubble {
+ if got := model.filesVizMode; got != tabVizModeBubbles {
t.Fatalf("expected files bubble mode enabled in directory mode")
}
next, _ = model.Update(tea.KeyPressMsg{Code: []rune{'d'}[0], Text: string([]rune{'d'})})
model = next.(Model)
- if model.filesBubble {
+ if got := model.filesVizMode; got != tabVizModeTable {
t.Fatalf("expected files bubble mode disabled when leaving directory mode")
}
}
@@ -421,7 +421,7 @@ func TestBubbleModeUsesJKForSelection(t *testing.T) {
m := NewModelWithConfig(nil, nil, 250, common.DefaultKeyMap())
m.activeTab = TabSyscalls
m.latest = &snap
- m.syscallsBubble = true
+ m.syscallsVizMode = tabVizModeBubbles
m.refreshBubbleData()
if len(m.syscallsChart.nodes) < 2 {
t.Fatalf("expected at least two syscall bubbles")