Liking cljdoc? Tell your friends :D

CUIC

Concise UI testing with Clojure

Build Status Clojars Project

  • CI-ready - works on top of Chrome DevTools Protocol and supports headless execution out-of-the-box
  • No DSLs or implicit waits, just data and functions to manipulate that data
  • Designed to support the idiomatic REPL workflow
  • Seamless Cursive integration (see demo video)

Quick start

; Evaluate these forms in your REPL, form by form
(ns demo)

(require '[cuic.core :as c])
(require 'cuic.repl)

(cuic.repl/launch-dev-browser! {:window-size {:width 1500 :height 1000}})
(c/goto! "https://clojuredocs.org")

(def core-link
  (->> (c/q ".navbar li a")
       (filter c/visible?)
       (filter #(= "Core Library" (c/text-content %)))
       (first)
       (c/wait)))
(c/click! core-link)

(def test-lib-link
  (->> (c/q ".library-nav li a")
       (filter #(= "test" (c/text-content %)))
       (first)
       (c/wait)))
(c/click! test-lib-link)

(def test-var-names
  (->> (c/wait (c/q ".var-group"))
       (mapcat #(c/q % ".name"))
       (map c/inner-text)
       (sort)))

(do (println "Vars in clojure.test are:")
    (doseq [var-name test-var-names]
      (println " " var-name)))

Usage

WIP... See API docs here.

License

MIT

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close