Browse Source

fix: wait 1s after new-graph

Tienson Qin 6 months ago
parent
commit
118a1edf02
2 changed files with 9 additions and 3 deletions
  1. 5 2
      clj-e2e/dev/user.clj
  2. 4 1
      clj-e2e/src/logseq/e2e/graph.clj

+ 5 - 2
clj-e2e/dev/user.clj

@@ -5,6 +5,7 @@
             [logseq.e2e.commands-test]
             [logseq.e2e.config :as config]
             [logseq.e2e.fixtures :as fixtures]
+            [logseq.e2e.graph :as graph]
             [logseq.e2e.keyboard :as k]
             [logseq.e2e.multi-tabs-test]
             [logseq.e2e.outliner-test]
@@ -74,7 +75,9 @@
 
   (do
     (reset! config/*headless true)
-    (dotimes [i 10]
-      (run-outliner-test)))
+    (reset! config/*slow-mo 100)
+    (dotimes [i 5]
+      (run-multi-tabs-test)))
+
   ;;
   )

+ 4 - 1
clj-e2e/src/logseq/e2e/graph.clj

@@ -21,7 +21,10 @@
     (w/click "button#rtc-sync"))
   (w/click "button:text(\"Submit\")")
   (when enable-sync?
-    (w/wait-for "button.cloud.on.idle" {:timeout 20000})))
+    (w/wait-for "button.cloud.on.idle" {:timeout 20000}))
+  ;; new graph can blocks the ui because the db need to be created and restored,
+  ;; I have no idea why `search-and-click` failed to auto-wait sometimes.
+  (util/wait-timeout 1000))
 
 (defn wait-for-remote-graph
   [graph-name]