aboutsummaryrefslogtreecommitdiff
path: root/tests/test-integration-acceptance.el
Commit message (Collapse)AuthorAgeFilesLines
* feat(render): derive the #+TODO line and keywords from team workflow statesCraig Jennings2026-05-251-0/+4
| | | | | | | | The renderer wrote a fixed #+TODO line and mapped state names through a static defcustom, so a workspace's real states (Dev Review, PM Acceptance, ...) never showed up. Now the displayed issues' teams drive both. pearl--gather-header-states collects each team's full state set (cached via pearl--team-states, teams in first-seen order, states by position) plus every displayed issue's own state, so a failed team fetch still leaves its issues' states declared. pearl--build-org-content takes that list and derives the #+TODO via pearl--derive-todo-line. pearl--format-issue-as-org-entry renders each keyword with pearl--state-name-to-keyword instead of the static map -- slugify reproduces the old defaults, so standard states are unchanged -- and writes a :LINEAR-STATE-TYPE: drawer so a later merge scan can classify a retained heading. The team-states query gains type and position. The integration test stubs pearl--team-states so the render stays network-free. The merge-refresh header rebuild is the next commit. Until then a same-source refresh keeps the previous header.
* refactor(save): retire the immediate-push field setters for buffer-editorsCraig Jennings2026-05-251-3/+7
| | | | | | | | 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.
* test: add an end-to-end acceptance flowCraig Jennings2026-05-241-0/+200
Stubs the single GraphQL chokepoint and drives the full integration path against a temp active file: run a saved query, render with the source header, read the source back, refresh the same source with an in-place merge, switch sources while the buffer is dirty (the edit is preserved, not clobbered), then from inside a rendered issue subtree sync an edited description, add a comment, and set priority. Everything above the wire — filter compilation, normalization, sort, render, header round-trip, merge, the conflict gate, comment append, and the field setter — runs for real, so the query and org-representation layers are exercised together rather than in isolation. 388 tests green (384 unit + 4 integration).