mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
test(e2e,rtc): fix add-new-properties
This commit is contained in:
@@ -1,13 +1,19 @@
|
||||
(ns logseq.e2e.page
|
||||
(:require [logseq.e2e.assert :as assert]
|
||||
(:require [logseq.e2e.keyboard :as k]
|
||||
[logseq.e2e.util :as util]
|
||||
[wally.main :as w]
|
||||
[wally.selectors :as ws]))
|
||||
[wally.selectors :as ws])
|
||||
(:import (com.microsoft.playwright TimeoutError)))
|
||||
|
||||
(defn goto-page
|
||||
[page-name]
|
||||
(assert (string? page-name) page-name)
|
||||
(util/search-and-click page-name))
|
||||
(try
|
||||
(util/search-and-click page-name)
|
||||
(catch TimeoutError _e
|
||||
;; try one more time
|
||||
(k/esc)
|
||||
(util/search-and-click page-name))))
|
||||
|
||||
(defn new-page
|
||||
[title]
|
||||
|
||||
@@ -190,7 +190,9 @@
|
||||
(assert/assert-is-visible (w/get-by-text "Select a property type"))
|
||||
(w/click (loc/and "span" (util/get-by-text property-type true)))
|
||||
(case property-type
|
||||
"Text" (util/input "Text")
|
||||
"Text" (do
|
||||
(w/click (format ".property-pair:has-text('%s') > .ls-block" property-name))
|
||||
(util/input "Text"))
|
||||
"Number" (do (assert/assert-is-visible (format "input[placeholder='%s']" (str "Set " property-name)))
|
||||
(util/input "111")
|
||||
(w/click (w/get-by-text "New option:")))
|
||||
|
||||
Reference in New Issue
Block a user