ソースを参照

test(e2e): retry in new-block

rcmerci 7 ヶ月 前
コミット
e16d6c69f8
1 ファイル変更7 行追加2 行削除
  1. 7 2
      clj-e2e/src/logseq/e2e/block.clj

+ 7 - 2
clj-e2e/src/logseq/e2e/block.clj

@@ -21,8 +21,13 @@
         blocks-count (util/blocks-count)]
     (when-not editor (open-last-block))
     (assert/assert-editor-mode)
-    (k/enter)
-    (assert/assert-have-count ".ls-block" (inc blocks-count))
+    (try
+      (k/enter)
+      (assert/assert-have-count ".ls-block" (inc blocks-count))
+      (catch Exception _e
+        ;; retry once
+        (k/enter)
+        (assert/assert-have-count ".ls-block" (inc blocks-count))))
     (assert/assert-editor-mode)
     (save-block title)))