refactor: Mv creation of initial views blocks for db graph

to initial transact!. Db graph should have everything it needs with
initial transact. With views page in new db graphs, test was able to
catch a bug, views page wasn't marked as a built-in? when it is
This commit is contained in:
Gabriel Horner
2024-11-14 11:36:59 -05:00
parent 4798e2df41
commit cc126c009c
6 changed files with 50 additions and 39 deletions

View File

@@ -194,9 +194,9 @@
(is (= 3 (count (d/q '[:find ?b :where [?b :block/tags :logseq.class/Query]] @conn))))
;; Don't count pages like url.md that have properties but no content
(is (= 10
(is (= 9
(count (->> (d/q '[:find [(pull ?b [:block/title :block/type]) ...]
:where [?b :block/title] [_ :block/page ?b]] @conn)
:where [?b :block/title] [_ :block/page ?b] (not [?b :logseq.property/built-in?])] @conn)
(filter ldb/internal-page?))))
"Correct number of pages with block content")
(is (= 0 (->> @conn