mirror of
https://github.com/logseq/logseq.git
synced 2026-04-27 23:54:55 +00:00
enhance: import namespaces to db graph
Working for basic graph but failing on edge case for docs graph. Part of logseq/db-test#136 and part of LOG-3230
This commit is contained in:
@@ -163,7 +163,7 @@
|
||||
"Created graph has no validation errors")
|
||||
(is (= 0 (count @(:ignored-properties import-state))) "No ignored properties")))
|
||||
|
||||
(deftest-async export-basic-graph
|
||||
(deftest-async ^:focus export-basic-graph
|
||||
;; This graph will contain basic examples of different features to import
|
||||
(p/let [file-graph-dir "test/resources/exporter-test-graph"
|
||||
conn (db-test/create-conn)
|
||||
@@ -179,14 +179,14 @@
|
||||
|
||||
;; Counts
|
||||
;; Includes journals as property values e.g. :logseq.task/deadline
|
||||
(is (= 19 (count (d/q '[:find ?b :where [?b :block/type "journal"]] @conn))))
|
||||
(is (= 19 (count (d/q '[:find ?b :where [?b :block/tags :logseq.class/Journal]] @conn))))
|
||||
(is (= 20 (count (d/q '[:find ?b :where [?b :block/type "journal"]] @conn))))
|
||||
(is (= 20 (count (d/q '[:find ?b :where [?b :block/tags :logseq.class/Journal]] @conn))))
|
||||
|
||||
(is (= 4 (count (d/q '[:find ?b :where [?b :block/tags :logseq.class/Task]] @conn))))
|
||||
(is (= 3 (count (d/q '[:find ?b :where [?b :block/tags :logseq.class/Query]] @conn))))
|
||||
|
||||
;; Don't count pages like url.md that have properties but no content
|
||||
(is (= 8
|
||||
(is (= 9
|
||||
(count (->> (d/q '[:find [(pull ?b [:block/title :block/type]) ...]
|
||||
:where [?b :block/title] [_ :block/page ?b]] @conn)
|
||||
(filter ldb/internal-page?))))
|
||||
|
||||
Reference in New Issue
Block a user