Browse Source

fix: calc tests

Tienson Qin 7 tháng trước cách đây
mục cha
commit
531c9bf85d
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      clj-e2e/test/logseq/e2e/commands_test.clj

+ 3 - 3
clj-e2e/test/logseq/e2e/commands_test.clj

@@ -20,8 +20,7 @@
   (testing "/command trigger popup"
     (b/new-block "b2")
     (util/press-seq " /")
-    (w/wait-for ".ui__popover-content")
-    (is (some? (w/find-one-by-text "span" "Node reference")))
+    (w/wait-for "a.menu-link.chosen:has-text('Node reference')")
     (k/backspace)
     (w/wait-for-not-visible ".ui__popover-content")))
 
@@ -237,7 +236,8 @@
     (b/new-block "")
     (util/input-command "calculator")
     (util/input "1 + 2")
-    (is (some? (w/find-one-by-text "div.extensions__code-calc-output-line" "3")))))
+    (w/wait-for "div.extensions__code-calc-output-line")
+    (is (= "3" (util/get-text "div.extensions__code-calc-output-line")))))
 
 (deftest template-test
   (testing "template"