mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
test(e2e): add logseq.e2e.settings
This commit is contained in:
15
clj-e2e/src/logseq/e2e/settings.clj
Normal file
15
clj-e2e/src/logseq/e2e/settings.clj
Normal file
@@ -0,0 +1,15 @@
|
||||
(ns logseq.e2e.settings
|
||||
(:require [logseq.e2e.assert :as assert]
|
||||
[logseq.e2e.keyboard :as k]
|
||||
[wally.main :as w]))
|
||||
|
||||
(defn developer-mode
|
||||
[]
|
||||
(w/click "button[title='More'] .ls-icon-dots")
|
||||
(w/click ".ls-icon-settings")
|
||||
(w/click "[data-id='advanced']")
|
||||
(let [q (.last (w/-query ".ui__toggle [aria-checked='false']"))]
|
||||
(when (.isVisible q)
|
||||
(w/click q)))
|
||||
(k/esc)
|
||||
(assert/assert-in-normal-mode?))
|
||||
@@ -6,6 +6,7 @@
|
||||
[logseq.e2e.fixtures :as fixtures :refer [*page1 *page2]]
|
||||
[logseq.e2e.graph :as graph]
|
||||
[logseq.e2e.rtc :as rtc]
|
||||
[logseq.e2e.settings :as settings]
|
||||
[logseq.e2e.util :as util]
|
||||
[wally.main :as w]
|
||||
[wally.repl :as repl]))
|
||||
@@ -20,8 +21,7 @@
|
||||
|
||||
(use-fixtures :once
|
||||
fixtures/open-2-pages
|
||||
;; cleanup-fixture
|
||||
)
|
||||
cleanup-fixture)
|
||||
|
||||
(defn- offline
|
||||
[]
|
||||
@@ -46,6 +46,7 @@
|
||||
(cp/prun!
|
||||
2
|
||||
#(w/with-page %
|
||||
(settings/developer-mode)
|
||||
(util/login-test-account))
|
||||
[@*page1 @*page2])
|
||||
(w/with-page @*page1
|
||||
@@ -68,8 +69,4 @@
|
||||
(online)
|
||||
(rtc/wait-tx-update-to @*latest-remote-tx)
|
||||
;; TODO: check blocks exist
|
||||
)))
|
||||
(testing "cleanup"
|
||||
(w/with-page @*page2
|
||||
(assert (some? @*graph-name))
|
||||
(graph/remove-remote-graph @*graph-name)))))
|
||||
)))))
|
||||
|
||||
Reference in New Issue
Block a user