mirror of
https://github.com/logseq/logseq.git
synced 2026-04-26 07:05:10 +00:00
refactor: add page outliner ops
The rule is to avoid calling worker modules from UI, all db transactions should go through apply-outliner-ops.
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
[clojure.test :refer [deftest is testing use-fixtures]]
|
||||
[frontend.test.helper :as test-helper]
|
||||
[datascript.core :as d]
|
||||
[frontend.handler.page :as page-handler]
|
||||
[frontend.db :as db]))
|
||||
|
||||
(def init-data (test-helper/initial-test-page-and-blocks))
|
||||
@@ -20,7 +19,7 @@
|
||||
(let [pages (map (fn [i] (str "Page " i)) (range 15))]
|
||||
;; create pages
|
||||
(doseq [page pages]
|
||||
(page-handler/create! page {:redirect? false :create-first-block? false :class? true})
|
||||
(test-helper/create-page! page {:redirect? false :create-first-block? false :class? true})
|
||||
(db-recent-handler/add-page-to-recent! (:db/id (db/get-page page)) false))
|
||||
(is (= (map :block/original-name (db-recent-handler/get-recent-pages)) (reverse pages)))
|
||||
(testing "Click existing recent item shouldn't update its position"
|
||||
|
||||
Reference in New Issue
Block a user