diff --git a/lib/host/tests/blog.sx b/lib/host/tests/blog.sx index fec9036a..ddbba892 100644 --- a/lib/host/tests/blog.sx +++ b/lib/host/tests/blog.sx @@ -258,8 +258,11 @@ (contains? html "q=my%20q") (contains? html "exponential:1000:30000"))) ;; retries a dropped fetch (list true true true true true true)) -(host-bl-test "relate-options omits the load-more sentinel on a short last page" - (contains? (dream-resp-body (host-bl-app (host-bl-req "/alpha-post/relate-options"))) "rp-more") +;; a page that isn't full carries NO load-more sentinel. Past the end of the pool the last +;; page is empty (0 rows < limit) — deterministic regardless of how many posts the metamodel +;; has seeded (the `related` pool is every post, which grows as types/cards are added). +(host-bl-test "relate-options omits the load-more sentinel when the page isn't full" + (contains? (dream-resp-body (host-bl-app (host-bl-req "/alpha-post/relate-options?offset=100000"))) "rp-more") false) ;; -- relate / unrelate keep BOTH lists in sync by re-rendering the kind's editor. @@ -545,8 +548,11 @@ (let ((body (dream-resp-body (host-bl-app (host-bl-req "/particle/relate-options?kind=tagged"))))) (list (contains? body ">OCaml<") (contains? body ">P Article<"))) (list true false)) -(host-bl-test "related picker still offers all posts (kind defaults to related)" - (contains? (dream-resp-body (host-bl-app (host-bl-req "/particle/relate-options"))) ">P Doc<") +;; `related` (no declaration) is UNRESTRICTED — it offers every post, including type-defs +;; like pdoc ("P Doc"), unlike `tagged` which offers only tags. Found via a filter so the +;; assertion is robust to pagination (the pool is >1 page once the metamodel is seeded). +(host-bl-test "related picker offers any post, incl a type-def (kind defaults to related)" + (contains? (dream-resp-body (host-bl-app (host-bl-req "/particle/relate-options?q=doc"))) ">P Doc<") true) (host-bl-test "is-a-tag toggle marks a post a tag via /relate kind=is-a" (begin