cljfx

Jonathan Bennett 2023-12-07T10:45:47.864729Z

Can someone point me at a good example of a cljfx project that has a good test suite? I need to learn by example a bit on this since extensive test coverage is something I'm still learning how to do well

vlaaad 2023-12-07T10:46:21.057899Z

I haven’t seen one TBH

vlaaad 2023-12-07T10:46:51.666439Z

at least haven’t really seen testing the GUI bits

Jonathan Bennett 2023-12-07T10:53:02.143339Z

Hrm. Because I thought that was the point of the example in E18

vlaaad 2023-12-07T10:55:13.671009Z

maybe it’s just me, and others do test the GUI behavior, but I don’t really use effects/co-effects any more

vlaaad 2023-12-07T10:56:11.859399Z

IIRC I already mentioned this in some other discussion above…

vlaaad 2023-12-07T10:57:26.061119Z

though e18 does show a way that maybe could be used to do data-driven tests for GUI

vlaaad 2023-12-07T10:58:51.586949Z

BTW have you seen the hn reader app example?

vlaaad 2023-12-07T10:58:53.360089Z

https://github.com/cljfx/hn

vlaaad 2023-12-07T10:59:48.130809Z

Similar to e18, but also has github actions workflows to build the distributables for the desktop platforms.

Jonathan Bennett 2023-12-07T11:02:22.967099Z

Oooo! I need the github actions soon anyway! lol

Jonathan Bennett 2023-12-07T11:03:53.300129Z

It's probably fine. I'm testing the rest of it pretty extensively, so that should be fine.

thom 2023-12-07T21:20:55.940849Z

I’ve been meaning to expand and open source our wrapper for TestFX but don’t do cljfx regularly anymore. If you can make use of this you’re welcome. Just needs a reference to your app’s stage and can out the setup and tear down in a fixture.

thom 2023-12-07T21:22:22.442119Z

Only covers the basic interactions we needed, and adds some clojure.test assert expressions so you can say (is (visible? “[css selector]”)) etc in tests.

thom 2023-12-07T21:25:30.564839Z

At the very least it’d show you how to get hook into TestFX yourself. I seem to remember some faff compiling our own version of Monocle to get this working with newer JDKs.

Jonathan Bennett 2023-12-08T05:37:11.892139Z

Awesome, thank you. That's helpful too