test(e2e): add tag-basic-test, fix assert-non-editor-mode

This commit is contained in:
rcmerci
2025-06-18 23:38:15 +08:00
parent 170b0a9a81
commit 665a5a3725
5 changed files with 38 additions and 2 deletions

View File

@@ -153,6 +153,10 @@
(util/input-command command)
(k/enter)
(assert/assert-editor-mode)
;; FIXME: cannot exit edit by k/esc???
;; (util/exit-edit)
(k/esc)
(b/new-block "temp fix")
(util/exit-edit)
(is (= command (util/get-text ".property-k")))
(is (= "Today" (util/get-text ".ls-datetime a.page-ref")))))))

View File

@@ -0,0 +1,26 @@
(ns logseq.e2e.tag-basic-test
(:require [clojure.test :refer [deftest testing is use-fixtures run-test run-tests]]
[logseq.e2e.block :as b]
[logseq.e2e.fixtures :as fixtures]
[logseq.e2e.keyboard :as k]
[logseq.e2e.util :as util]
[wally.main :as w]
[wally.repl :as repl]
[logseq.e2e.assert :as assert]))
(use-fixtures :once fixtures/open-page)
(use-fixtures :each
fixtures/new-logseq-page
fixtures/validate-graph)
(defn add-new-tags
[title-prefix]
(b/new-block (str title-prefix 1 " #" title-prefix "1"))
(k/esc)
(assert/assert-non-editor-mode)
(b/new-block (str title-prefix 2))
(util/set-tag (str title-prefix 2)))
(deftest new-tag-test
(add-new-tags "tag-test-"))