This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-16
Channels
- # admin-announcements (3)
- # arachne (9)
- # beginners (10)
- # boot (56)
- # cider (4)
- # cljs-dev (5)
- # cljsjs (4)
- # cljsrn (3)
- # clojure (146)
- # clojure-austin (9)
- # clojure-greece (3)
- # clojure-poland (14)
- # clojure-russia (1)
- # clojure-uk (19)
- # clojurescript (46)
- # cursive (16)
- # datomic (21)
- # emacs (38)
- # events (2)
- # flambo (1)
- # garden (3)
- # hoplon (41)
- # jobs (1)
- # keechma (87)
- # off-topic (2)
- # om (62)
- # om-next (4)
- # other-languages (7)
- # pedestal (6)
- # protorepl (1)
- # reagent (3)
- # rethinkdb (1)
- # ring-swagger (1)
- # rum (3)
- # spacemacs (2)
- # specter (12)
- # test200 (2)
- # untangled (12)
I’m using webdriver + FF
(deftask tests-web
"Run all web tests"
[ w watch? bool "Watches the filesystem and reruns tests when changes are made."
W wip? bool "true to only run WIP tests. WIP tests will not run if false."]
(set-env! :source-paths #(into % ["test/hl"]))
(comp
(serve :port 8001
:handler 'app.handler/app
:reload false
:httpkit true)
(if watch?
(comp
(watch)
(speak))
identity)
(hoplon)
(cljs)
(target :dir #{"target_test"})
(test
:filters [(test-filter-for-wip wip?)])))
works pretty much like other tests...
@thedavidmeister: Cool! What is watch?
?
and (test-filter-for-wip wip?)
Would you mind sharing those?
watch is just in the definition of the task
boot tests-web -w -W
would only run WIP tests and watch
(defn test-filter-for-wip
[wip?]
(if wip?
'(:wip (meta %))
'(not (:wip (meta %)))))
i mostly use watch instead of the repl, so i get some basic tests for free as i dev
boot deps, if you’re interested
; Testing
[crisptrutski/boot-cljs-test "0.2.2-SNAPSHOT"]
[adzerk/boot-test "1.1.1"]
[org.clojure/test.check "0.9.0"]
[org.seleniumhq.selenium/selenium-java "2.52.0"]
[clj-webdriver "0.7.2”]]
@dm3: @thedavidmeister what do you use as the integration test DSL? something like https://github.com/xeqi/kerodon for example?
@onetom: that’s cool, i haven’t seen that
i’ve just been using the taxi api of clj-webdriver
(defn first-is-current?
[]
; Current is on the first input, item, item-list.
(is (attribute (element ".item-list") :data-current))
(is (= 1 (count (elements ".item-list[data-current]"))))
(is (attribute (element ".item") :data-current))
(is (= 1 (count (elements ".item[data-current]"))))
(is (attribute (element ".item label") :data-current))
(is (= 1 (count (elements ".item label[data-current]")))))
@micha: regarding ^ if you haven't read http://smuglispweeny.blogspot.ch/2008/02/cells-manifesto.html seems to have all of the evaluation strategies for cells
tilton uses his cells for IO and stuff, in places where i'd use queues
so i think he wants them to do everything
vs. javelin which is focused on UI
well, to the degree that strict eval is the only one you need with UI, and to do effects with minimal fanfare
I have a page (it’s quite common and general case) where I have a search/filter part and the results list part
I have my results list defined as defelem
accepting result-list errors and loading cells and the list element is rendering based on the values in those cells
I also have a search part defined as defelem
which has an attribute called search-criteria
- it’s a cell passed from external code and the search view puts the criteria from its UI fields when the user clicks search button
now the question is how should I make the changes in search-criteria
cell to call (search search-criteria results-list errors loading)
function which will fill the provided cells based on the criteria from search-criteria
cell?
just published a little example showing how to mount hoplon elements into existing markup, https://github.com/alandipert/embedded-hoplon-example
hey @alandipert does a thing like that obviate splint?
@raywillig: maybe in some situations. Unfortunately not ours lol