mirror of
https://github.com/logseq/logseq.git
synced 2026-05-03 02:16:30 +00:00
fix: import doesn't fail if it has a page with new class name
fixes LOG-3039
This commit is contained in:
@@ -170,7 +170,7 @@
|
||||
(is (= 18 (count (d/q '[:find ?b :where [?b :block/type "journal"]] @conn))))
|
||||
|
||||
;; Don't count pages like url.md that have properties but no content
|
||||
(is (= 6
|
||||
(is (= 7
|
||||
(count (->> (d/q '[:find [(pull ?b [:block/title :block/type]) ...]
|
||||
:where [?b :block/title] [_ :block/page ?b]] @conn)
|
||||
(filter #(= "page" (:block/type %))))))
|
||||
@@ -346,6 +346,14 @@
|
||||
count))
|
||||
"A block with different case of same ref names has 1 distinct ref"))
|
||||
|
||||
(testing "imported concepts can have names of new-built concepts"
|
||||
(is (= #{:logseq.property/description :user.property/description}
|
||||
(set (d/q '[:find [?ident ...] :where [?b :db/ident ?ident] [?b :block/name "description"]] @conn)))
|
||||
"user description property is separate from built-in one")
|
||||
(is (= #{"page" "class"}
|
||||
(set (d/q '[:find [?type ...] :where [?b :block/type ?type] [?b :block/name "task"]] @conn)))
|
||||
"user page is separate from built-in class"))
|
||||
|
||||
(testing "multiline blocks"
|
||||
(is (= "|markdown| table|\n|some|thing|" (:block/title (find-block-by-content @conn #"markdown.*table"))))
|
||||
(is (= "multiline block\na 2nd\nand a 3rd" (:block/title (find-block-by-content @conn #"multiline block"))))
|
||||
|
||||
Reference in New Issue
Block a user