mirror of
https://github.com/logseq/logseq.git
synced 2026-04-29 08:26:40 +00:00
enhance: import page and block embeds
One embed per block as that's what DB version supports. Fixes https://github.com/logseq/db-test/issues/198
This commit is contained in:
committed by
Tienson Qin
parent
8f2f40df8e
commit
507ff3ce29
@@ -429,6 +429,26 @@
|
||||
(:block/title (db-test/find-block-by-content @conn #"Learn Datalog")))
|
||||
"Imports full quote with various ast types"))
|
||||
|
||||
(testing "embeds"
|
||||
(is (= {:block/title ""}
|
||||
(-> (d/q '[:find [(pull ?b [*]) ...]
|
||||
:in $ ?title
|
||||
:where [?b :block/link ?l] [?b :block/page ?bp] [?bp :block/journal-day 20250612] [?l :block/title ?title]]
|
||||
@conn
|
||||
"page embed")
|
||||
first
|
||||
(select-keys [:block/title])))
|
||||
"Page embed linked correctly")
|
||||
(is (= {:block/title ""}
|
||||
(-> (d/q '[:find [(pull ?b [*]) ...]
|
||||
:in $ ?title
|
||||
:where [?b :block/link ?l] [?b :block/page ?bp] [?bp :block/journal-day 20250612] [?l :block/title ?title]]
|
||||
@conn
|
||||
"test block embed")
|
||||
first
|
||||
(select-keys [:block/title])))
|
||||
"Block embed linked correctly"))
|
||||
|
||||
(testing "tags convert to classes"
|
||||
(is (= :user.class/Quotes___life
|
||||
(:db/ident (db-test/find-page-by-title @conn "life")))
|
||||
|
||||
Reference in New Issue
Block a user