mirror of
https://github.com/logseq/logseq.git
synced 2026-02-01 14:43:56 +00:00
fix(tests): update block property tests to use new property name
This commit is contained in:
@@ -50,16 +50,15 @@
|
||||
(deftest block-properties-test
|
||||
(testing "block properties related apis"
|
||||
(page/new-page "test-block-properties-apis")
|
||||
(let [ret (ls-api-call! :editor.appendBlockInPage "test-block-properties-apis" "block-in-page-0" {:properties {:p1 1}})
|
||||
(let [ret (ls-api-call! :editor.appendBlockInPage "test-block-properties-apis" "block-in-page-0" {:properties {:new-p1 1}})
|
||||
uuid' (assert-api-ls-block! ret)
|
||||
prop1 (ls-api-call! :editor.getBlockProperty uuid' "p1")
|
||||
props1 (ls-api-call! :editor.getBlockProperties uuid' "p1")
|
||||
prop1 (ls-api-call! :editor.getBlockProperty uuid' "new-p1")
|
||||
props1 (ls-api-call! :editor.getBlockProperties uuid' "new-p1")
|
||||
props2 (ls-api-call! :editor.getPageProperties "test-block-properties-apis")]
|
||||
(w/wait-for ".property-k:text('p1')")
|
||||
;; FIXME: Assertions below fail
|
||||
;; (is (= 1 (get prop1 "value")))
|
||||
;; (is (= (get prop1 "ident") ":plugin.property._test_plugin/p1"))
|
||||
;; (is (= 1 (get props1 ":plugin.property._test_plugin/p1")))
|
||||
(w/wait-for ".property-k:text('new-p1')")
|
||||
(is (= 1 (get prop1 "value")))
|
||||
(is (= (get prop1 "ident") ":plugin.property._test_plugin/new-p1"))
|
||||
(is (= 1 (get props1 ":plugin.property._test_plugin/new-p1")))
|
||||
(is (= ["Page"] (get props2 ":block/tags")))
|
||||
(ls-api-call! :editor.upsertBlockProperty uuid' "p2" "p2")
|
||||
(ls-api-call! :editor.upsertBlockProperty uuid' "p3" true)
|
||||
|
||||
Reference in New Issue
Block a user