浏览代码

test(e2e,rtc): simplify rtc-outliner-test

rcmerci 4 月之前
父节点
当前提交
c14b7e8d30
共有 1 个文件被更改,包括 8 次插入18 次删除
  1. 8 18
      clj-e2e/test/logseq/e2e/rtc_extra_test.clj

+ 8 - 18
clj-e2e/test/logseq/e2e/rtc_extra_test.clj

@@ -215,24 +215,14 @@
                                (let [{:keys [_local-tx remote-tx]}
                                      (rtc/with-wait-tx-updated
                                        (test-fn))]
-                                 (reset! *latest-remote-tx remote-tx))))]
-
-      ;; testing while rtc connected
-      (let [*latest-remote-tx (atom nil)]
-        (new-logseq-page)
-        (test-fn-in-page2 *latest-remote-tx)
-        (w/with-page @*page1
-          (rtc/wait-tx-update-to @*latest-remote-tx))
-        (validate-2-graphs))
-
-      ;; testing while rtc off then on
-      (let [*latest-remote-tx (atom nil)]
-        (new-logseq-page)
-        (rtc/with-stop-restart-rtc
-          [@*page1]
-          [@*page1 (rtc/wait-tx-update-to @*latest-remote-tx)]
-          (test-fn-in-page2 *latest-remote-tx))
-        (validate-2-graphs)))))
+                                 (reset! *latest-remote-tx remote-tx))))
+          *latest-remote-tx (atom nil)]
+      (new-logseq-page)
+      (rtc/with-stop-restart-rtc
+        [@*page1]
+        [@*page1 (rtc/wait-tx-update-to @*latest-remote-tx)]
+        (test-fn-in-page2 *latest-remote-tx))
+      (validate-2-graphs))))
 
 (deftest rtc-outliner-conflict-update-test
   (let [title-prefix "rtc-outliner-conflict-update-test"]