Browse Source

fix: tests

Tienson Qin 6 tháng trước cách đây
mục cha
commit
c9177abc9a
1 tập tin đã thay đổi với 7 bổ sung1 xóa
  1. 7 1
      src/main/frontend/db/query_dsl.cljs

+ 7 - 1
src/main/frontend/db/query_dsl.cljs

@@ -732,7 +732,13 @@ Some bindings in this fn:
 
 (def db-block-attrs
   "Block attributes for db graph queries"
-  '[:db/id])
+  ;; '*' needed as we need to pull user properties and don't know their names in advance
+  (if util/node-test?
+    '[*
+      {:block/page [:db/id :block/name :block/title :block/journal-day]}
+      {:block/_parent ...}]
+    ;; db graphs needs :db/id only for query view
+    [:db/id]))
 
 (defn query
   "Runs a dsl query with query as a string. Primary use is from '/query' or '{{query }}'"