Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude committed Nov 12, 2024
1 parent 29e34b4 commit 536e1fe
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ui_tests/playwright_tests.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,19 @@
(.waitForLoadState page "networkidle")
(p/let [selector (or (:selector @!opts) "div")
_ (prn :selector selector)
loc (.locator page selector)
loc (.locator page selector #js {:timeout 10000})
loc (.first loc #js {:timeout 10000})
visible? (.isVisible loc #js {:timeout 10000})]
_ (.waitFor loc #js {:state "visible"})
visible? (.isVisible loc)]
(is visible?))))
([page url link]
(p/let [txt (.innerText link)]
(println "Visiting" (str url "#/" txt))
(p/do (.click link)
(p/let [loc (.locator page "div")
loc (.first loc #js {:timeout 10000})
visible? (.isVisible loc #js {:timeout 10000})]
_ (.waitFor loc #js {:state "visible"})
visible? (.isVisible loc)]
(is visible?))))))

(deftest index-page-test
Expand Down

0 comments on commit 536e1fe

Please sign in to comment.