Refactor org web platform and remove legacy code
All checks were successful
Build Org Website / build (push) Successful in 39s
All checks were successful
Build Org Website / build (push) Successful in 39s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user