aboutsummaryrefslogtreecommitdiff
path: root/tests/test-pearl-output.el
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-pearl-output.el')
-rw-r--r--tests/test-pearl-output.el18
1 files changed, 10 insertions, 8 deletions
diff --git a/tests/test-pearl-output.el b/tests/test-pearl-output.el
index 55f7886..1035ff2 100644
--- a/tests/test-pearl-output.el
+++ b/tests/test-pearl-output.el
@@ -90,7 +90,7 @@ cookie cycling reaches Low regardless of the user's global `org-priority-lowest'
(ert-deftest test-pearl-build-org-content-grouped-sections-and-startup ()
"A grouped view folds to show3levels, emits a level-2 group heading per group
-in first-appearance order, and renders issues at level 3 under them."
+in Linear board order (state type rank), and renders issues at level 3 under them."
(let* ((issues '((:id "1" :identifier "SE-1" :title "One"
:state (:name "Started" :type "started") :priority 0)
(:id "2" :identifier "SE-2" :title "Two"
@@ -104,14 +104,16 @@ in first-appearance order, and renders issues at level 3 under them."
(should (string-match-p "^\\*\\* Backlog$" out))
;; Issues live at level 3 under the group headings.
(should (string-match-p "^\\*\\*\\* STARTED " out))
- ;; First-appearance order: SE-1 (Started) before SE-2 (Backlog).
- (should (< (string-match "^\\*\\* Started$" out)
- (string-match "^\\*\\* Backlog$" out)))
- ;; The group heading carries no LINEAR-ID, so save/merge skip it.
- (let ((started (string-match "^\\*\\* Started$" out))
+ ;; Board order: Backlog (backlog-type) sorts before Started (started-type),
+ ;; regardless of which appeared first in the input.
+ (should (< (string-match "^\\*\\* Backlog$" out)
+ (string-match "^\\*\\* Started$" out)))
+ ;; The first group heading carries no LINEAR-ID, so save/merge skip it: it
+ ;; sits ahead of the first issue drawer.
+ (let ((first-group (string-match "^\\*\\* Backlog$" out))
(next-id (string-match "LINEAR-ID:" out)))
- (should started)
- (should (< started next-id)))))
+ (should first-group)
+ (should (< first-group next-id)))))
(ert-deftest test-pearl-build-org-content-grouped-source-roundtrips ()
"A grouped view's source (with :group) reads back from the rendered header."