소스 검색

fix(tests): update block property tests to use new property name

charlie 1 주 전
부모
커밋
aef1fb9486
1개의 변경된 파일7개의 추가작업 그리고 8개의 파일을 삭제
  1. 7 8
      clj-e2e/test/logseq/e2e/plugins_basic_test.clj

+ 7 - 8
clj-e2e/test/logseq/e2e/plugins_basic_test.clj

@@ -50,16 +50,15 @@
 (deftest block-properties-test
 (deftest block-properties-test
   (testing "block properties related apis"
   (testing "block properties related apis"
     (page/new-page "test-block-properties-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)
           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")]
           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")))
       (is (= ["Page"] (get props2 ":block/tags")))
       (ls-api-call! :editor.upsertBlockProperty uuid' "p2" "p2")
       (ls-api-call! :editor.upsertBlockProperty uuid' "p2" "p2")
       (ls-api-call! :editor.upsertBlockProperty uuid' "p3" true)
       (ls-api-call! :editor.upsertBlockProperty uuid' "p3" true)