This commit is contained in:
rcmerci
2026-01-01 16:48:16 +08:00
parent 0f949b739c
commit 76224da1b6
3 changed files with 20 additions and 2 deletions

View File

@@ -18,6 +18,7 @@
(defn- input-e2ee-password
[]
(w/wait-for "input[type=\"password\"]" {:timeout 20000})
(w/click "input[type=\"password\"]")
(util/input "e2etest")
(w/click "button:text(\"Submit\")"))

View File

@@ -21,7 +21,7 @@
_# (prn :current-rtc-tx m# local-tx# remote-tx#)
tx# (max local-tx# remote-tx#)]
~@body
(loop [i# 5]
(loop [i# 15]
(when (zero? i#) (throw (ex-info "wait-tx-updated failed" {:old m# :new (get-rtc-tx)})))
(util/wait-timeout 500)
(w/wait-for "button.cloud.on.idle" {:timeout 35000})

View File

@@ -1,5 +1,7 @@
(ns logseq.e2e.rtc-extra-part2-test
(:require [clojure.test :refer [deftest testing is use-fixtures run-test]]
(:require [clojure.java.io :as io]
[clojure.test :refer [deftest testing is use-fixtures run-test]]
[jsonista.core :as json]
[logseq.e2e.block :as b]
[logseq.e2e.const :refer [*page1 *page2 *graph-name*]]
[logseq.e2e.fixtures :as fixtures]
@@ -135,3 +137,18 @@ wait for 5-10 seconds, will found that \"aaa/bbb\" became \"aaa/<encrypted-strin
(is (some? (.getAttribute (w/-query ".ls-block img") "src"))))
(rtc/validate-graphs-in-2-pw-pages))))
(deftest issue-683-paste-large-block-test
(testing "Copying and pasting a large block of text into sync-ed graph causes sync to fail"
(let [large-text (slurp (io/resource "large_text.txt"))]
(w/with-page @*page1
(w/eval-js (str "navigator.clipboard.writeText(" (json/write-value-as-string large-text) ")")))
(let [{:keys [remote-tx]}
(w/with-page @*page1
(rtc/with-wait-tx-updated
(b/new-block "")
(b/paste)))]
(w/with-page @*page2
(rtc/wait-tx-update-to remote-tx)))
(rtc/validate-graphs-in-2-pw-pages))))