|
|
@@ -377,7 +377,7 @@
|
|
|
"tagged block tag converts tag to page ref")
|
|
|
(is (= [(:db/id tag-page)] (map :db/id (:block/refs block)))
|
|
|
"tagged block has correct refs")
|
|
|
- (is (and tag-page (not (ldb/tag? tag-page)))
|
|
|
+ (is (and tag-page (not (ldb/class? tag-page)))
|
|
|
"tag page is not a class")
|
|
|
|
|
|
(is (= {:logseq.property/page-tags #{"Movie"}}
|
|
|
@@ -406,9 +406,9 @@
|
|
|
(:block/tags (readable-properties @conn block)))
|
|
|
"tagged block has configured tag imported as a class")
|
|
|
|
|
|
- (is (= "tag" (:block/type tag-page))
|
|
|
+ (is (= "class" (:block/type tag-page))
|
|
|
"configured tag page in :tag-classes is a class")
|
|
|
- (is (and another-tag-page (not (ldb/tag? another-tag-page)))
|
|
|
+ (is (and another-tag-page (not (ldb/class? another-tag-page)))
|
|
|
"unconfigured tag page is not a class")
|
|
|
|
|
|
(is (= {:block/tags [:user.class/Movie]}
|
|
|
@@ -445,7 +445,7 @@
|
|
|
(is (= #{:user.class/Property :user.class/Movie}
|
|
|
(->> @conn
|
|
|
(d/q '[:find [?ident ...]
|
|
|
- :where [?b :block/type "tag"] [?b :db/ident ?ident] (not [?b :logseq.property/built-in?])])
|
|
|
+ :where [?b :block/type "class"] [?b :db/ident ?ident] (not [?b :logseq.property/built-in?])])
|
|
|
set))
|
|
|
"All classes are correctly defined by :type")
|
|
|
|
|
|
@@ -467,7 +467,7 @@
|
|
|
"tagged block can have another property that references the same class it is tagged with,
|
|
|
without creating a duplicate class")
|
|
|
|
|
|
- (is (= "tag" (:block/type tag-page))
|
|
|
+ (is (= "class" (:block/type tag-page))
|
|
|
"configured tag page derived from :property-classes is a class")
|
|
|
(is (nil? (find-page-by-name @conn "type"))
|
|
|
"No page exists for configured property")
|
|
|
@@ -499,7 +499,7 @@
|
|
|
(is (= #{:user.class/Movie :user.class/CreativeWork :user.class/Thing}
|
|
|
(->> @conn
|
|
|
(d/q '[:find [?ident ...]
|
|
|
- :where [?b :block/type "tag"] [?b :db/ident ?ident] (not [?b :logseq.property/built-in?])])
|
|
|
+ :where [?b :block/type "class"] [?b :db/ident ?ident] (not [?b :logseq.property/built-in?])])
|
|
|
set))
|
|
|
"All classes are correctly defined by :type")
|
|
|
|