summaryrefslogtreecommitdiff
path: root/internal/tui/common/keys_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-06 18:08:19 +0200
committerPaul Buetow <paul@buetow.org>2026-03-06 18:08:19 +0200
commit99a6cf4787fd92a25a53acbc9c0bae8bca87cc96 (patch)
tree0c6f6506e944a0eed0fcefa7b9394681c5f178da /internal/tui/common/keys_test.go
parent1561987330cb898f5ff64383a9c78e7e6559f118 (diff)
feat(tui): add dashboard bubble viz and expand help shortcuts
Diffstat (limited to 'internal/tui/common/keys_test.go')
-rw-r--r--internal/tui/common/keys_test.go34
1 files changed, 34 insertions, 0 deletions
diff --git a/internal/tui/common/keys_test.go b/internal/tui/common/keys_test.go
index 4284faf..a2b5940 100644
--- a/internal/tui/common/keys_test.go
+++ b/internal/tui/common/keys_test.go
@@ -28,6 +28,16 @@ func TestDefaultKeyMapIncludesDirGroupBinding(t *testing.T) {
if flameHelp.Key != "1" || flameHelp.Desc != "flame" {
t.Fatalf("unexpected flame binding help: key=%q desc=%q", flameHelp.Key, flameHelp.Desc)
}
+
+ visualizeHelp := keys.Visualize.Help()
+ if visualizeHelp.Key != "v" || visualizeHelp.Desc != "viz" {
+ t.Fatalf("unexpected visualize binding help: key=%q desc=%q", visualizeHelp.Key, visualizeHelp.Desc)
+ }
+
+ metricHelp := keys.Metric.Help()
+ if metricHelp.Key != "b" || metricHelp.Desc != "metric" {
+ t.Fatalf("unexpected metric binding help: key=%q desc=%q", metricHelp.Key, metricHelp.Desc)
+ }
}
func TestDashboardFullHelpIncludesDirGroupBinding(t *testing.T) {
@@ -96,6 +106,30 @@ func TestDashboardFullHelpIncludesDirGroupBinding(t *testing.T) {
if !found {
t.Fatalf("expected select tid binding in dashboard full help controls")
}
+
+ found = false
+ for _, binding := range groups[1] {
+ help := binding.Help()
+ if help.Key == "v" && help.Desc == "viz" {
+ found = true
+ break
+ }
+ }
+ if !found {
+ t.Fatalf("expected viz binding in dashboard full help controls")
+ }
+
+ found = false
+ for _, binding := range groups[1] {
+ help := binding.Help()
+ if help.Key == "b" && help.Desc == "metric" {
+ found = true
+ break
+ }
+ }
+ if !found {
+ t.Fatalf("expected metric binding in dashboard full help controls")
+ }
}
func TestDashboardStatusHelpIncludesProbesBinding(t *testing.T) {