This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-19
Channels
- # alda (1)
- # announcements (2)
- # babashka (14)
- # beginners (30)
- # biff (12)
- # clerk (2)
- # clj-kondo (18)
- # clj-on-windows (1)
- # clojure (98)
- # clojure-europe (9)
- # clojure-gamedev (4)
- # clojurescript (39)
- # conjure (1)
- # data-science (1)
- # emacs (25)
- # events (1)
- # fulcro (1)
- # hyperfiddle (13)
- # lsp (3)
- # malli (1)
- # membrane (10)
- # off-topic (12)
- # reagent (7)
- # scittle (21)
- # shadow-cljs (10)
Hi š, great project you have here, Jacob! Are there some patterns for testing HTMX (or some specific for CLJ)? Maybe creating some intermediary tests that check EDN data (controller-level) and some fewer tests for the UI (e.g. using playwright)? Or even testing the hiccup response (hypermedia) itself? I will start to test on my own to see the possibilities and what works in practice, so exciting :D
Hey! I don't have any established patterns myself as I almost exclusively do manual testing (the only exception being some unit tests with clojure.test every once in a while). However I think testing the hiccup responses would be a good approach, and that's where I'd probably start. I wouldn't mind adding a section on testing to the docs--definitely let me know what you come up with!
Another option is to the the resulting html in the browser with for example https://www.cypress.io/
Yep, I liked Cypress until I saw playwright ahahaha I will try to publish a minimal wrapper for it soon, the REPL experience just works in the JVM in comparison with the approach that Cypress takes
Published the small Playwright wrapper https://clojurians.slack.com/archives/C06MAR553/p1680058915025819 \o/
@U5R6XUARE How is the library working for you? are you using it for testing biff apps? context: iām researching end to end testing in clojure š
No, not biff apps, but it should work the same ahahaha
Let me know of anything
@U5R6XUARE How do you define and run your tests?
@U03J3AZTZ6H https://github.com/pfeodrippe/wally-tests/blob/main/test/com/pfeodrippe/wally/book_of_clerk_test.clj You can do something like above, just a normal deftest