mirror of https://github.com/logseq/logseq
fix: more outdated :page type
parent
55f211be16
commit
04e32b33d2
|
@ -50,7 +50,7 @@
|
||||||
{:properties {:foo {:block/schema {:type :default}}
|
{:properties {:foo {:block/schema {:type :default}}
|
||||||
:foo2 {:block/schema {:type :default}}
|
:foo2 {:block/schema {:type :default}}
|
||||||
:number-many {:block/schema {:type :number :cardinality :many}}
|
:number-many {:block/schema {:type :number :cardinality :many}}
|
||||||
:page-many {:block/schema {:type :page :cardinality :many}}}
|
:page-many {:block/schema {:type :node :cardinality :many}}}
|
||||||
:pages-and-blocks
|
:pages-and-blocks
|
||||||
[{:page {:block/title "Page"
|
[{:page {:block/title "Page"
|
||||||
:build/properties {:foo "bar" :number-many #{5 10} :page-many #{[:page "Page A"]}}}}
|
:build/properties {:foo "bar" :number-many #{5 10} :page-many #{[:page "Page A"]}}}}
|
||||||
|
|
|
@ -20,17 +20,6 @@
|
||||||
|
|
||||||
(use-fixtures :each start-and-destroy-db)
|
(use-fixtures :each start-and-destroy-db)
|
||||||
|
|
||||||
;; (deftest get-db-property-values-test-with-pages
|
|
||||||
;; (let [opts {:redirect? false :create-first-block? false}
|
|
||||||
;; _ (test-helper/create-page! "page1" opts)
|
|
||||||
;; _ (test-helper/create-page! "page2" opts)
|
|
||||||
;; p1id (:block/uuid (db/get-page "page1"))
|
|
||||||
;; p2id (:block/uuid (db/get-page "page2"))]
|
|
||||||
;; (outliner-property/upsert-property! repo "property-1" {:type :page} {})
|
|
||||||
;; (outliner-property/set-block-property! repo fbid "property-1" p1id {})
|
|
||||||
;; (outliner-property/set-block-property! repo sbid "property-1" p2id {})
|
|
||||||
;; (is (= '("[[page1]]" "[[page2]]") (model/get-db-property-values repo "property-1")))))
|
|
||||||
|
|
||||||
(deftest get-all-classes-test
|
(deftest get-all-classes-test
|
||||||
(let [opts {:redirect? false :create-first-block? false :class? true}
|
(let [opts {:redirect? false :create-first-block? false :class? true}
|
||||||
_ (test-helper/create-page! "class1" opts)
|
_ (test-helper/create-page! "class1" opts)
|
||||||
|
@ -63,7 +52,7 @@
|
||||||
class1 (db/get-case-page "class1")
|
class1 (db/get-case-page "class1")
|
||||||
class2 (db/get-case-page "class2")
|
class2 (db/get-case-page "class2")
|
||||||
conn (db/get-db false)]
|
conn (db/get-db false)]
|
||||||
(outliner-property/upsert-property! conn :user.property/property-1 {:type :page} {})
|
(outliner-property/upsert-property! conn :user.property/property-1 {:type :node} {})
|
||||||
(outliner-property/class-add-property! conn (:db/id class1) :user.property/property-1)
|
(outliner-property/class-add-property! conn (:db/id class1) :user.property/property-1)
|
||||||
(outliner-property/class-add-property! conn (:db/id class2) :user.property/property-1)
|
(outliner-property/class-add-property! conn (:db/id class2) :user.property/property-1)
|
||||||
(let [property (db/entity :user.property/property-1)
|
(let [property (db/entity :user.property/property-1)
|
||||||
|
|
Loading…
Reference in New Issue