aboutsummaryrefslogtreecommitdiff
path: root/tests/test-pearl-format.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-03 07:07:52 -0500
committerCraig Jennings <c@cjennings.net>2026-06-03 07:07:52 -0500
commit6ef196e306320804b80a502dab29dbafd12285bc (patch)
treebcd067d1b7bc629ca049ba6c7a42cc87b57e8e0b /tests/test-pearl-format.el
parentf4cf700efd8bb44ca50f555e2ee04596fc690b91 (diff)
downloadpearl-6ef196e306320804b80a502dab29dbafd12285bc.tar.gz
pearl-6ef196e306320804b80a502dab29dbafd12285bc.zip
feat(render): open a fetched view folded to the issue headings
The header set #+STARTUP: show3levels, which opened a fresh view with each issue's Comments heading already unfolded. That's a level of detail past what you want when scanning a list. Drop to show2levels so a view opens at the parent plus the issue headings, with comments and bodies folded under each issue. pearl--restore-page-visibility re-reads #+STARTUP from the buffer after a repopulation, so the in-place rebuild path follows the new depth without any other change.
Diffstat (limited to 'tests/test-pearl-format.el')
-rw-r--r--tests/test-pearl-format.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/test-pearl-format.el b/tests/test-pearl-format.el
index ec0e1e0..ee15a2a 100644
--- a/tests/test-pearl-format.el
+++ b/tests/test-pearl-format.el
@@ -149,11 +149,13 @@ sort together (org-sort on the parent) instead of being orphan headings."
(should (< (string-match "^\\* My open issues$" out)
(string-match "^\\*\\* IN-PROGRESS" out))))))
-(ert-deftest test-pearl-build-org-content-startup-show3levels ()
- "The page opens folded to headings (parent, issues, Comments), bodies hidden."
+(ert-deftest test-pearl-build-org-content-startup-show2levels ()
+ "The page opens folded to the parent and issue headings; Comments (level 3)
+and all bodies stay folded, so a fresh view isn't a wall of open issues."
(test-pearl--with-default-mapping
(let ((out (pearl--build-org-content '())))
- (should (string-match-p "^#\\+STARTUP: show3levels$" out))
+ (should (string-match-p "^#\\+STARTUP: show2levels$" out))
+ (should-not (string-match-p "^#\\+STARTUP: show3levels$" out))
(should-not (string-match-p "^#\\+STARTUP: overview$" out)))))
(ert-deftest test-pearl-build-org-content-no-shared-file-id ()