mirror of
https://github.com/logseq/logseq.git
synced 2026-04-27 15:45:00 +00:00
fix: docs graph fails to import with both property*
options enabled
This commit is contained in:
@@ -603,14 +603,18 @@
|
||||
|
||||
(deftest-async export-files-with-property-parent-classes-option
|
||||
(p/let [file-graph-dir "test/resources/exporter-test-graph"
|
||||
files (mapv #(node-path/join file-graph-dir %) ["pages/CreativeWork.md" "pages/Movie.md" "pages/type.md"])
|
||||
files (mapv #(node-path/join file-graph-dir %) ["pages/CreativeWork.md" "pages/Movie.md" "pages/type.md"
|
||||
"pages/Whiteboard___Tool.md" "pages/Whiteboard___Arrow_head_toggle.md"])
|
||||
conn (db-test/create-conn)
|
||||
_ (import-files-to-db files conn {:property-parent-classes ["parent"]})]
|
||||
_ (import-files-to-db files conn {:property-parent-classes ["parent"]
|
||||
;; Also add this option to trigger some edge cases with namespace pages
|
||||
:property-classes ["type"]})]
|
||||
|
||||
(is (empty? (map :entity (:errors (db-validate/validate-db! @conn))))
|
||||
"Created graph has no validation errors")
|
||||
|
||||
(is (= #{:user.class/Movie :user.class/CreativeWork :user.class/Thing}
|
||||
(is (= #{:user.class/Movie :user.class/CreativeWork :user.class/Thing
|
||||
:user.class/Class :user.class/Tool :user.class/Whiteboard___Tool}
|
||||
(->> @conn
|
||||
(d/q '[:find [?ident ...]
|
||||
:where [?b :block/type "class"] [?b :db/ident ?ident] (not [?b :logseq.property/built-in?])])
|
||||
|
||||
Reference in New Issue
Block a user