diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-27 19:19:35 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-27 19:19:35 -0500 |
| commit | a74334bc9a321ddbb9b2ba81266f264d3522cc8c (patch) | |
| tree | 72214b77d2b27b205f9450763fdfd00ee4166524 /tests/test-pearl-comments.el | |
| parent | 73f7656d02f916c361fc0da06d97d9bdaf9062a0 (diff) | |
| download | pearl-a74334bc9a321ddbb9b2ba81266f264d3522cc8c.tar.gz pearl-a74334bc9a321ddbb9b2ba81266f264d3522cc8c.zip | |
refactor: verb-align command names and prefixes, use issue not ticket
The keybinding prefixes now each name an action verb: f fetch, e edit, c create, k delete, o open, y copy. The url group is gone, its actions split into open and copy, and the direct lowercase c (new comment) is dropped so c can head the create group. Two commands carried non-verb names, so I renamed them: pearl-new-issue is now pearl-create-issue and pearl-add-comment is now pearl-create-comment. The old sync helper that already held the pearl-create-issue name moved to the private pearl--create-issue, where it belongs as internal plumbing.
I also swept "ticket" to "issue" across the labels, transient, docstrings, and README. Linear's own term is "issue" and the buffer mirrors Linear, so the command names already said "issue" while the labels said "ticket". Now they agree. The transient's per-entry keys still trail the keymap verbs, which stays its own task.
Diffstat (limited to 'tests/test-pearl-comments.el')
| -rw-r--r-- | tests/test-pearl-comments.el | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/test-pearl-comments.el b/tests/test-pearl-comments.el index 99b705a..323d7b7 100644 --- a/tests/test-pearl-comments.el +++ b/tests/test-pearl-comments.el @@ -23,7 +23,7 @@ ;; Comments subtree (ordered per `pearl-comment-sort-order'), including comments ;; in the issue render, the commentCreate helper (stubbed at the HTTP boundary), ;; the in-place append under the Comments subtree (creating it when absent), and the -;; `pearl-add-comment' command. +;; `pearl-create-comment' command. ;;; Code: @@ -165,9 +165,9 @@ (should (< (progn (re-search-forward "first") (point)) (progn (re-search-forward "second") (point))))))) -;;; pearl-add-comment +;;; pearl-create-comment -(ert-deftest test-pearl-add-comment-appends-returned-comment () +(ert-deftest test-pearl-create-comment-appends-returned-comment () "The command creates a comment and inserts the returned one in the buffer." (test-pearl--in-org "*** TODO [#B] Title\n:PROPERTIES:\n:LINEAR-ID: a\n:END:\nBody.\n" @@ -176,25 +176,25 @@ (funcall cb (list :id "c1" :author "Craig" :created-at "2026-05-23T14:00:00.000Z" :body body))))) (re-search-forward "Body.") - (pearl-add-comment "my new comment") + (pearl-create-comment "my new comment") (goto-char (point-min)) (should (re-search-forward "^\\*\\*\\* 💬 Comments 1/1$" nil t)) (should (re-search-forward "my new comment" nil t))))) -(ert-deftest test-pearl-add-comment-reports-failure () +(ert-deftest test-pearl-create-comment-reports-failure () "A failed create does not insert a Comments subtree." (test-pearl--in-org "*** TODO [#B] Title\n:PROPERTIES:\n:LINEAR-ID: a\n:END:\nBody.\n" (cl-letf (((symbol-function 'pearl--create-comment-async) (lambda (_id _body cb) (funcall cb nil)))) - (pearl-add-comment "x") + (pearl-create-comment "x") (goto-char (point-min)) (should-not (re-search-forward "^\\*\\*\\* Comments$" nil t))))) -(ert-deftest test-pearl-add-comment-not-on-issue-errors () +(ert-deftest test-pearl-create-comment-not-on-issue-errors () "Adding a comment outside a Linear issue heading signals a user error." (test-pearl--in-org "* Plain heading\nno id\n" - (should-error (pearl-add-comment "x") :type 'user-error))) + (should-error (pearl-create-comment "x") :type 'user-error))) (ert-deftest test-pearl-append-comment-targets-current-issue-not-sibling () "Appending adds under the current issue's Comments, not a later issue's subtree." |
