summaryrefslogtreecommitdiff
path: root/internal/tui/common/keys_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-25 10:17:40 +0200
committerPaul Buetow <paul@buetow.org>2026-02-25 10:17:40 +0200
commitfa93934f341c7356b63daaf0c27cbdbb6e22fad7 (patch)
treed1c61ab90ecbb6a7b141ed092221313ac4e34309 /internal/tui/common/keys_test.go
parent7ca1eeaa98a58471a2214a2274d20b71206af2a1 (diff)
Add dir-group key binding to shared TUI keymap
Diffstat (limited to 'internal/tui/common/keys_test.go')
-rw-r--r--internal/tui/common/keys_test.go31
1 files changed, 31 insertions, 0 deletions
diff --git a/internal/tui/common/keys_test.go b/internal/tui/common/keys_test.go
new file mode 100644
index 0000000..e8762c9
--- /dev/null
+++ b/internal/tui/common/keys_test.go
@@ -0,0 +1,31 @@
+package common
+
+import "testing"
+
+func TestDefaultKeyMapIncludesDirGroupBinding(t *testing.T) {
+ keys := DefaultKeyMap()
+ help := keys.DirGroup.Help()
+ if help.Key != "d" || help.Desc != "dir group" {
+ t.Fatalf("unexpected dir group binding help: key=%q desc=%q", help.Key, help.Desc)
+ }
+}
+
+func TestDashboardFullHelpIncludesDirGroupBinding(t *testing.T) {
+ keys := DefaultKeyMap()
+ groups := keys.DashboardFullHelp()
+ if len(groups) < 2 {
+ t.Fatalf("expected at least 2 help groups")
+ }
+
+ found := false
+ for _, binding := range groups[1] {
+ help := binding.Help()
+ if help.Key == "d" && help.Desc == "dir group" {
+ found = true
+ break
+ }
+ }
+ if !found {
+ t.Fatalf("expected dir group binding in dashboard full help controls")
+ }
+}