aboutsummaryrefslogtreecommitdiff
path: root/tests/test-integration-acceptance.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-25 21:22:27 -0500
committerCraig Jennings <c@cjennings.net>2026-05-25 21:22:27 -0500
commit60b51e1c996f1c8f152696946b9440f26ea9a956 (patch)
tree3154332cc2b7d5bb3e0eb71a812d9effc8c46633 /tests/test-integration-acceptance.el
parentf9841539b3adb192d0c15470fa9c31d6cbbdf447 (diff)
downloadpearl-60b51e1c996f1c8f152696946b9440f26ea9a956.tar.gz
pearl-60b51e1c996f1c8f152696946b9440f26ea9a956.zip
refactor(save): retire the immediate-push field setters for buffer-editors
The structured fields now reconcile at save (the previous commits), so the immediate-push setters are the duplicate path that made the package feel like it had two save models. I retired them. pearl-set-priority is deleted outright — priority is edited org-natively through the heading cookie. pearl-set-state, pearl-set-assignee, and pearl-set-labels become pearl-edit-state / -assignee / -labels: the same completing-read picker, but it writes the buffer representation (keyword/name/id, the assignee drawer, the labels drawer plus the live LINEAR-LABEL-IDS set) and marks the field dirty instead of pushing. The change goes out at the next pearl-save-issue / pearl-save-all. pearl-compose-current-description is renamed pearl-edit-description (its compose-and-push behavior is unchanged — v2 doesn't touch the compose buffers). The transient, the C-; L e keymap, the affordance preamble, and the README follow the new names, and the priority slots are dropped (no command — it's the org cookie). Deleting the setters left pearl--push-issue-field and pearl--priority-choices with no callers, so both are gone, along with the killed-buffer test that only exercised the removed helper. I filed a follow-up: the atomic savers' async commit callbacks need the same killed-buffer guard that helper carried. The setter command tests are rewritten to assert the buffer-write-and-no-push contract. The reconcile-and-push path they used to cover is exercised in test-pearl-save.
Diffstat (limited to 'tests/test-integration-acceptance.el')
-rw-r--r--tests/test-integration-acceptance.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/test-integration-acceptance.el b/tests/test-integration-acceptance.el
index f83c891..de5f0e7 100644
--- a/tests/test-integration-acceptance.el
+++ b/tests/test-integration-acceptance.el
@@ -37,7 +37,7 @@
;; - pearl-refresh-current-view -> --merge-query-result (in-place merge)
;; - pearl-sync-current-issue -> --sync-decision -> --update-issue-description-async
;; - pearl-add-comment -> --create-comment-async -> --append-comment-to-issue
-;; - pearl-set-priority -> --push-issue-field -> --update-issue-async
+;; - edit the priority cookie + pearl-save-issue -> --save-priority-field -> --update-issue-async
;;; Code:
@@ -77,6 +77,7 @@ because the description-update mutation contains both `IssueDescription' and
(pageInfo (hasNextPage . :json-false)
(endCursor . "c"))))))
('fetch-desc '((data (issue (description . "Original body.")
+ (priority . 2)
(updatedAt . "2026-05-24T00:00:00.000Z")))))
('comment-create '((data (commentCreate
(success . t)
@@ -189,11 +190,14 @@ because the description-update mutation contains both `IssueDescription' and
(goto-char (point-min))
(should (re-search-forward "^\\*\\*\\* Comments$" nil t))
(should (re-search-forward "looks good" nil t))
- ;; --- set priority from inside the subtree ---
+ ;; --- edit the priority cookie, then save (reconcile-on-save) ---
(goto-char (point-min))
(re-search-forward "First issue")
+ (org-back-to-heading t)
+ (let ((org-priority-highest ?A) (org-priority-lowest ?D))
+ (org-priority ?A)) ; [#B] (2) -> [#A] (1)
(setq test-integration--ops nil)
- (pearl-set-priority "Urgent")
+ (pearl-save-issue)
(should (memq 'issue-update test-integration--ops)))))
(provide 'test-integration-acceptance)