aboutsummaryrefslogtreecommitdiff
path: root/tests/test-pearl-keymap.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-01 17:53:53 -0500
committerCraig Jennings <c@cjennings.net>2026-06-01 17:53:53 -0500
commitad1e0b8c33f909814b69458eb34cc792f032e844 (patch)
tree0db98b0d5ef8f50eb71b132d2928f0583b270176 /tests/test-pearl-keymap.el
parent6206fde5acfd48f9eba2ab231c1fe1d32717c98e (diff)
downloadpearl-ad1e0b8c33f909814b69458eb34cc792f032e844.tar.gz
pearl-ad1e0b8c33f909814b69458eb34cc792f032e844.zip
feat(views): reshape the keymap and transient around the view noun
I put the view operations under the verb a user would reach for. Create, edit, and delete local views are c v, e v, and k v. The fetch group gains run-local-view at f l and keeps run-linear-view at f v, with publish at f u and save-locally reserved at f d. Since f p already runs issues by project, publish and save-locally take u and d, which read as up and down and mirror the copy-up and copy-down lifecycle. The transient now has a Views column grouping create, edit, run-local, run-linear, publish, and delete, separate from the source-fetching commands. I updated the spec's keymap to the implemented letters so the two stay in sync. Phase 3 of the views spec. Keymap tests assert the new bindings. Suite, compile, and lint are green.
Diffstat (limited to 'tests/test-pearl-keymap.el')
-rw-r--r--tests/test-pearl-keymap.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/test-pearl-keymap.el b/tests/test-pearl-keymap.el
index f80a002..a02dd47 100644
--- a/tests/test-pearl-keymap.el
+++ b/tests/test-pearl-keymap.el
@@ -66,15 +66,15 @@ The lowercase `c' is no longer a direct command -- it is the create prefix."
(should (keymapp (lookup-key pearl-prefix-map (kbd "y"))))) ; copy
(ert-deftest test-pearl-prefix-map-fetch-group ()
- "The fetch group resolves each source command, including the unified pick-source."
+ "The fetch group resolves each source and view-run command."
(should (eq 'pearl-pick-source (lookup-key pearl-prefix-map (kbd "f s"))))
(should (eq 'pearl-list-issues (lookup-key pearl-prefix-map (kbd "f o"))))
(should (eq 'pearl-list-issues-by-project (lookup-key pearl-prefix-map (kbd "f p"))))
(should (eq 'pearl-list-issues-filtered (lookup-key pearl-prefix-map (kbd "f f"))))
(should (eq 'pearl-run-linear-view (lookup-key pearl-prefix-map (kbd "f v"))))
- (should (eq 'pearl-run-local-view (lookup-key pearl-prefix-map (kbd "f q"))))
+ (should (eq 'pearl-run-local-view (lookup-key pearl-prefix-map (kbd "f l"))))
(should (eq 'pearl-publish-local-view
- (lookup-key pearl-prefix-map (kbd "f S"))))
+ (lookup-key pearl-prefix-map (kbd "f u"))))
(should (eq 'pearl-publish-current-view
(lookup-key pearl-prefix-map (kbd "f P")))))
@@ -85,16 +85,18 @@ The lowercase `c' is no longer a direct command -- it is the create prefix."
(should (eq 'pearl-edit-assignee (lookup-key pearl-prefix-map (kbd "e a"))))
(should (eq 'pearl-edit-labels (lookup-key pearl-prefix-map (kbd "e l"))))
(should (eq 'pearl-edit-current-comment (lookup-key pearl-prefix-map (kbd "e c"))))
+ (should (eq 'pearl-edit-local-view (lookup-key pearl-prefix-map (kbd "e v"))))
;; priority has no edit command (org-native cookie); e p is unbound
(should-not (lookup-key pearl-prefix-map (kbd "e p"))))
(ert-deftest test-pearl-prefix-map-create-and-delete-groups ()
- "Create and delete groups resolve issue/comment under c and k."
+ "Create and delete groups resolve issue/comment plus the local-view slot."
(should (eq 'pearl-create-issue (lookup-key pearl-prefix-map (kbd "c t"))))
(should (eq 'pearl-create-comment (lookup-key pearl-prefix-map (kbd "c c"))))
+ (should (eq 'pearl-create-local-view (lookup-key pearl-prefix-map (kbd "c v"))))
(should (eq 'pearl-delete-current-issue (lookup-key pearl-prefix-map (kbd "k t"))))
(should (eq 'pearl-delete-current-comment (lookup-key pearl-prefix-map (kbd "k c"))))
- (should (eq 'pearl-delete-local-view (lookup-key pearl-prefix-map (kbd "k q")))))
+ (should (eq 'pearl-delete-local-view (lookup-key pearl-prefix-map (kbd "k v")))))
(ert-deftest test-pearl-prefix-map-open-and-copy-groups ()
"The open group resolves the two open actions; copy resolves copy-url."