Refactor org web platform and remove legacy code
All checks were successful
Build Org Website / build (push) Successful in 39s

This commit is contained in:
gitea-actions
2026-07-30 11:29:20 +01:00
parent dc1ca5c00e
commit fe8acac707
74 changed files with 2776 additions and 3386 deletions

View File

@@ -261,4 +261,31 @@
(result (z/org-html-add-body-classes output 'latex info)))
(should (string= output result))))))
;; ── standalone RPG export ────────────────────────────────────────────────────
(ert-deftest test/rpg-standalone-export-removes-normal-site-chrome ()
"The RPG final-output filter should return a dedicated viewport document."
(let* ((info (list :input-file (site-path "play/rpg.org")))
(output (concat
"<html><head><script src=\"search.js\"></script></head><body>"
"<div class=\"banner-header\">Normal site</div>"
z/rpg-standalone-start
"<main data-princess-lima-rpg>Game</main>"
"<script src=\"/assets/scripts/pages/princess-lima-game.js\"></script>"
z/rpg-standalone-end
"<footer>Normal footer</footer></body></html>"))
(result (z/render-rpg-standalone output 'html info)))
(should (string-match-p "class=\"princess-lima-page\"" result))
(should (string-match-p "data-princess-lima-rpg" result))
(should (string-match-p "princess-lima-game.js" result))
(should-not (string-match-p "banner-header" result))
(should-not (string-match-p "Normal footer" result))
(should-not (string-match-p "search.js" result))))
(ert-deftest test/rpg-standalone-export-ignores-other-pages ()
"Normal pages must retain their existing exported document."
(let* ((info (list :input-file (site-path "index.org")))
(output "<html><body><div class=\"banner-header\">Site</div></body></html>"))
(should (string= output (z/render-rpg-standalone output 'html info)))))
;;; build-site-tests.el ends here