summaryrefslogtreecommitdiff
path: root/internal/tui/flamegraph/model_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/tui/flamegraph/model_test.go')
-rw-r--r--internal/tui/flamegraph/model_test.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/internal/tui/flamegraph/model_test.go b/internal/tui/flamegraph/model_test.go
index c2626cd..e864e88 100644
--- a/internal/tui/flamegraph/model_test.go
+++ b/internal/tui/flamegraph/model_test.go
@@ -987,12 +987,20 @@ func TestControlMetricToggleReconfiguresLiveTrieCountField(t *testing.T) {
}
m = pressFlameKey(t, m, tea.KeyPressMsg{Code: []rune{'b'}[0], Text: "b"})
- if got, want := m.countField, "count"; got != want {
+ if got, want := m.countField, "duration"; got != want {
t.Fatalf("expected model count field %q after second toggle, got %q", want, got)
}
- if got, want := liveTrie.CountField(), "count"; got != want {
+ if got, want := liveTrie.CountField(), "duration"; got != want {
t.Fatalf("expected live trie count field %q after second toggle, got %q", want, got)
}
+
+ m = pressFlameKey(t, m, tea.KeyPressMsg{Code: []rune{'b'}[0], Text: "b"})
+ if got, want := m.countField, "count"; got != want {
+ t.Fatalf("expected model count field %q after third toggle, got %q", want, got)
+ }
+ if got, want := liveTrie.CountField(), "count"; got != want {
+ t.Fatalf("expected live trie count field %q after third toggle, got %q", want, got)
+ }
}
func TestNewModelAlignsPresetIndexToLiveTrieFields(t *testing.T) {