mirror of
https://github.com/logseq/logseq.git
synced 2026-02-01 22:47:36 +00:00
fix: tests
This commit is contained in:
@@ -20,7 +20,8 @@
|
|||||||
[logseq.db.test.helper :as db-test]
|
[logseq.db.test.helper :as db-test]
|
||||||
[logseq.db.frontend.rules :as rules]
|
[logseq.db.frontend.rules :as rules]
|
||||||
[logseq.common.util.date-time :as date-time-util]
|
[logseq.common.util.date-time :as date-time-util]
|
||||||
[logseq.graph-parser.block :as gp-block]))
|
[logseq.graph-parser.block :as gp-block]
|
||||||
|
[logseq.db.frontend.content :as db-content]))
|
||||||
|
|
||||||
;; Helpers
|
;; Helpers
|
||||||
;; =======
|
;; =======
|
||||||
@@ -495,7 +496,7 @@
|
|||||||
(is (= 2
|
(is (= 2
|
||||||
(->> (find-block-by-content @conn #"replace with same start string")
|
(->> (find-block-by-content @conn #"replace with same start string")
|
||||||
:block/title
|
:block/title
|
||||||
(re-seq #"\[\[~\^\S+\]\]")
|
(re-seq db-content/id-ref-pattern)
|
||||||
distinct
|
distinct
|
||||||
count))
|
count))
|
||||||
"A block with ref names that start with same string has 2 distinct refs")
|
"A block with ref names that start with same string has 2 distinct refs")
|
||||||
@@ -503,7 +504,7 @@
|
|||||||
(is (= 1
|
(is (= 1
|
||||||
(->> (find-block-by-content @conn #"replace case insensitive")
|
(->> (find-block-by-content @conn #"replace case insensitive")
|
||||||
:block/title
|
:block/title
|
||||||
(re-seq #"\[\[~\^\S+\]\]")
|
(re-seq db-content/id-ref-pattern)
|
||||||
distinct
|
distinct
|
||||||
count))
|
count))
|
||||||
"A block with different case of same ref names has 1 distinct ref"))
|
"A block with different case of same ref names has 1 distinct ref"))
|
||||||
|
|||||||
@@ -377,7 +377,7 @@ These tasks are specific to database graphs. For these tasks there is a one time
|
|||||||
```sh
|
```sh
|
||||||
$ bb dev:db-query woot '[:find (pull ?b [*]) :where (block-content ?b "Dogma")]'
|
$ bb dev:db-query woot '[:find (pull ?b [*]) :where (block-content ?b "Dogma")]'
|
||||||
DB contains 833 datoms
|
DB contains 833 datoms
|
||||||
[{:block/tx-id 536870923, :block/link #:db{:id 100065}, :block/uuid #uuid "65565c26-f972-4400-bce4-a15df488784d", :block/updated-at 1700158508564, :block/order "a0", :block/refs [#:db{:id 100064}], :block/created-at 1700158502056, :block/format :markdown, :block/tags [#:db{:id 100064}], :block/title "Dogma #~^65565c2a-b1c5-4dc8-a0f0-81b786bc5c6d", :db/id 100090, :block/path-refs [#:db{:id 100051} #:db{:id 100064}], :block/parent #:db{:id 100051}, :block/page #:db{:id 100051}}]
|
[{:block/tx-id 536870923, :block/link #:db{:id 100065}, :block/uuid #uuid "65565c26-f972-4400-bce4-a15df488784d", :block/updated-at 1700158508564, :block/order "a0", :block/refs [#:db{:id 100064}], :block/created-at 1700158502056, :block/format :markdown, :block/tags [#:db{:id 100064}], :block/title "Dogma #[[65565c2a-b1c5-4dc8-a0f0-81b786bc5c6d]]", :db/id 100090, :block/path-refs [#:db{:id 100051} #:db{:id 100064}], :block/parent #:db{:id 100051}, :block/page #:db{:id 100051}}]
|
||||||
```
|
```
|
||||||
|
|
||||||
* `dev:db-transact` - Run a `d/transact!` against the queried results of a DB graph
|
* `dev:db-transact` - Run a `d/transact!` against the queried results of a DB graph
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
[frontend.modules.outliner.ui :as ui-outliner-tx]
|
[frontend.modules.outliner.ui :as ui-outliner-tx]
|
||||||
[frontend.modules.outliner.op :as outliner-op]
|
[frontend.modules.outliner.op :as outliner-op]
|
||||||
[frontend.handler.db-based.editor :as db-editor-handler]
|
[frontend.handler.db-based.editor :as db-editor-handler]
|
||||||
[logseq.db.frontend.content :as db-content]
|
|
||||||
[logseq.common.util.page-ref :as page-ref]
|
[logseq.common.util.page-ref :as page-ref]
|
||||||
[frontend.handler.notification :as notification]))
|
[frontend.handler.notification :as notification]))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user