fix: tags and refs on same page should have same uuid

Fixes identity issue in 1st section of
https://github.com/logseq/db-test/issues/7#issuecomment-2463162620
This commit is contained in:
Gabriel Horner
2024-11-14 17:21:06 -05:00
parent 181766df11
commit d4caacce3d
3 changed files with 32 additions and 24 deletions

View File

@@ -494,7 +494,11 @@
(d/q '[:find [?ident ...]
:where [?b :block/type "class"] [?b :db/ident ?ident] (not [?b :logseq.property/built-in?])])
count))
"Correct number of user classes")))
"Correct number of user classes")
(is (= [{:block/type "class"}]
(d/q '[:find [(pull ?b [:block/type]) ...] :where [?b :block/name "life"]] @conn))
"When a class is used and referenced on the same page, there should only be one instance of it")))
(deftest-async export-files-with-tag-classes-option
(p/let [file-graph-dir "test/resources/exporter-test-graph"