fix: simple queries without properties not importing

Also handle query title for simple queries. Also loosened page-tags to
allow for future logseq class importing. Fixes LOG-3243
This commit is contained in:
Gabriel Horner
2024-10-02 12:23:22 -04:00
parent 83c59128ad
commit 9531811b68
3 changed files with 47 additions and 22 deletions

View File

@@ -176,7 +176,7 @@
(is (= 18 (count (d/q '[:find ?b :where [?b :block/tags :logseq.class/Journal]] @conn))))
(is (= 4 (count (d/q '[:find ?b :where [?b :block/tags :logseq.class/Task]] @conn))))
(is (= 1 (count (d/q '[:find ?b :where [?b :block/tags :logseq.class/Query]] @conn))))
(is (= 2 (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 (= 8
@@ -300,7 +300,10 @@
:logseq.property/query "(property :prop-string)"
:block/tags [:logseq.class/Query]}
(readable-properties @conn (find-block-by-property @conn :logseq.property/query "(property :prop-string)")))
"query block has correct query properties"))
"query block has correct query properties")
(is (= "For example, here's a query with title text:"
(:block/title (find-block-by-content @conn #"query with title text")))
"Text around a query block is set as a query's title"))
(testing "db attributes"
(is (= true