Skip to content

Commit

Permalink
Fix UI test
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude committed Nov 11, 2024
1 parent 728ae6e commit c7f16af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ jobs:
run: |
bb test:static-app :sha ${{ github.sha }} :skip-install true
bb test:static-app :skip-install true :url https://snapshots.nextjournal.com/clerk/book/${{ github.sha }}/book/index.html :index false :selector "span:has-text(\"Book of Clerk\")"
bb test:static-app :skip-install true :url https://snapshots.nextjournal.com/clerk-ssr/build/${{ github.sha }}/index.html :index false :selector "h1:has-text(\"Rule 30\")"
deploy:
needs: [build-and-upload-viewer-resources, test]
Expand Down
6 changes: 4 additions & 2 deletions ui_tests/playwright_tests.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,11 @@
(p/do (goto page url)
(.waitForLoadState page "networkidle")
(p/let [selector (or (:selector @!opts) "div")
_ (prn :selector selector)
loc (.locator page selector)
loc (.first loc #js {:timeout 10000})]
(is (.isVisible loc #js {:timeout 10000})))))
loc (.first loc #js {:timeout 10000})
visible? (.isVisible loc #js {:timeout 10000})]
(is visible?))))
([page url link]
(p/let [txt (.innerText link)]
(println "Visiting" (str url "#/" txt))
Expand Down

0 comments on commit c7f16af

Please sign in to comment.