Fork me on GitHub
#biff
<
2023-03-19
>
pfeodrippe12:03:56

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

šŸ‘€ 2
Jacob O'Bryant18:03:24

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!

pfeodrippe19:03:42

Thanks, man!

šŸ‘Œ 2
rickheere06:03:09

Another option is to the the resulting html in the browser with for example https://www.cypress.io/

šŸ‘Œ 2
pfeodrippe22:03:31

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

rickheere12:03:48

Sounds great, I need to try it out

Olav Fosse15:11:38

@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 šŸ˜…

pfeodrippe19:11:31

No, not biff apps, but it should work the same ahahaha

pfeodrippe19:11:47

Let me know of anything

Olav Fosse19:11:26

@U5R6XUARE How do you define and run your tests?