Running devcard tests in CI

Hello Clojureverse! I’m wondering if anyone else here writes interactive UI-based tests using devcards as a harness. I write tests that load a component as a devcard and then using the react testing library and user event testing library fire fake events to interact with it like a user would, testing how the UI looks after each interaction.

These tests work great in the devcard UI, but as far as I can tell the only indication of whether they pass or not is visual – the little badges at the top of each testing block.

I’m working on getting these tests to run in CI, but having some issues. I’m using shadow-cljs to compile a build for CI (per these instructions) and then using karma to launch a browser and report the result, but I’m running up against some issues getting the devcard harness to load in the browser launched by karma.

Anyway, I’ll keep fiddling with it, but just thought I’d ask here to see if anyone else has gone down this road and figured it out already.

Have a look at this one GitHub - oliyh/kamera: UI testing via image comparison and devcards lib

Oh that’s interesting! A bit different than how I typically test front-end apps, but looks like a really cool project! Thanks for the tip.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.