sycamore-rs / sycamore

A library for creating reactive web apps in Rust and WebAssembly
https://sycamore-rs.netlify.app
MIT License
2.77k stars 144 forks source link

Testing story #55

Open lukechu10 opened 3 years ago

lukechu10 commented 3 years ago

Make it easy to unit test components as well as integration and E2E tests. Scenarios should include but not limited to:

eiswind commented 1 year ago

Hopefully this one will get some love soon?

arctic-hen7 commented 1 year ago

@eiswind in the meantime, Fantoccinni works pretty well. If you run geckodriver or chromedriver and then host your app, you can run a test suite against it and make assertions about its state from the perspective of a user. The need to run three things at once (test suite, app, and driver) isn't ideal, but it works for now.

pythoneer commented 1 year ago

@arctic-hen7 oh i didn't know that. Wasn't there a problem with Fantoccinni in the past? I remember you need to do something special in Perseus to make it work – can't remember what the problem was though. Has this changed at some point (release/commit)?

arctic-hen7 commented 1 year ago

@pythoneer hmm, I remember something vaguely, but I don't think there are any issues on v0.3.6, certainly not in the v0.4.x beta for Perseus. Still, Fantoccini can be used with usual Sycamore pretty well. You just write asynchronous tests with Tokio, and then run them while both the driver and your app are live.