mirror of
https://github.com/logseq/logseq.git
synced 2026-04-30 00:46:23 +00:00
refactor: separate og and db version (#12276)
separate og and new version apps remove file sync, tldraw, excalidraw and zotero
This commit is contained in:
@@ -577,11 +577,13 @@ prop-d:: [[nada]]"}])
|
||||
:file/content "bar"}])
|
||||
|
||||
(is (= ["page1"]
|
||||
(map #(get-in % [:block/page :block/name])
|
||||
(map (fn [result]
|
||||
(:block/title (db/entity (:db/id (:block/page result)))))
|
||||
(dsl-query "(page page1)"))))
|
||||
|
||||
(is (= []
|
||||
(map #(get-in % [:block/page :block/name])
|
||||
(map (fn [result]
|
||||
(:block/title (db/entity (:db/id (:block/page result)))))
|
||||
(dsl-query "(page nope)")))
|
||||
"Correctly returns no results"))
|
||||
|
||||
@@ -637,13 +639,14 @@ prop-d:: [[nada]]"}])
|
||||
(dsl-query "(or [[tag2]] [[page not exists]])")))
|
||||
"OR query with nonexistent page should return meaningful results")
|
||||
|
||||
(is (= (if js/process.env.DB_GRAPH #{"b1" "bar" "b3"} #{"b1" "foo:: bar" "b3"})
|
||||
(->> (dsl-query "(not [[page 2]])")
|
||||
(when js/process.env.DB_GRAPH
|
||||
(is (= #{"b1" "bar" "b3"}
|
||||
(->> (dsl-query "(not [[page 2]])")
|
||||
;; Only filter to page1 to get meaningful results
|
||||
(filter #(= "page1" (get-in % [:block/page :block/name])))
|
||||
(map testable-content)
|
||||
(set)))
|
||||
"NOT query")))
|
||||
(filter #(= "page1" (get-in % [:block/page :block/name])))
|
||||
(map testable-content)
|
||||
(set)))
|
||||
"NOT query"))))
|
||||
|
||||
(deftest nested-page-ref-queries
|
||||
(load-test-files (if js/process.env.DB_GRAPH
|
||||
|
||||
Reference in New Issue
Block a user