|
|
@@ -45,12 +45,12 @@
|
|
|
|
|
|
(defn- new-logseq-page
|
|
|
"new logseq page and switch to this page on both page1 and page2"
|
|
|
- []
|
|
|
+ [& [page-name]]
|
|
|
(let [*page-name (atom nil)
|
|
|
{:keys [_local-tx remote-tx]}
|
|
|
(w/with-page @*page1
|
|
|
(rtc/with-wait-tx-updated
|
|
|
- (reset! *page-name (fixtures/create-page))))]
|
|
|
+ (reset! *page-name (fixtures/create-page page-name))))]
|
|
|
(w/with-page @*page2
|
|
|
(rtc/wait-tx-update-to remote-tx)
|
|
|
(page/goto-page @*page-name))))
|
|
|
@@ -329,14 +329,7 @@ page2:
|
|
|
;; (validate-2-graphs)))
|
|
|
(testing "page rename"
|
|
|
(let [page-name (str prefix 3)]
|
|
|
- (let [*latest-remote-tx (atom nil)]
|
|
|
- (w/with-page @*page1
|
|
|
- (let [{:keys [_local-tx remote-tx]}
|
|
|
- (rtc/with-wait-tx-updated
|
|
|
- (page/new-page page-name))]
|
|
|
- (reset! *latest-remote-tx remote-tx)))
|
|
|
- (w/with-page @*page2
|
|
|
- (rtc/wait-tx-update-to @*latest-remote-tx)))
|
|
|
+ (new-logseq-page page-name)
|
|
|
(validate-2-graphs)
|
|
|
(rtc/with-stop-restart-rtc
|
|
|
[@*page1 @*page2]
|
|
|
@@ -347,3 +340,16 @@ page2:
|
|
|
(w/with-page @*page2
|
|
|
(page/rename-page page-name (str page-name "-rename2"))))
|
|
|
(validate-2-graphs)))))
|
|
|
+
|
|
|
+(deftest long-block-title-test
|
|
|
+ (testing "insert >4KB block/title"
|
|
|
+ (let [long-block-title (apply str (repeat 5000 "a"))
|
|
|
+ {:keys [_local-tx remote-tx]}
|
|
|
+ (w/with-page @*page1
|
|
|
+ (rtc/with-wait-tx-updated
|
|
|
+ (b/new-block long-block-title)))]
|
|
|
+ (w/with-page @*page2
|
|
|
+ (rtc/wait-tx-update-to remote-tx))
|
|
|
+ (validate-2-graphs)
|
|
|
+ (w/with-page @*page2
|
|
|
+ (assert/assert-is-visible (loc/filter ".block-title-wrap" :has-text long-block-title))))))
|