germsvel / phoenix_test

MIT License
124 stars 18 forks source link

Suggestion: Wallaby Driver #73

Open arnodirlam opened 2 months ago

arnodirlam commented 2 months ago

Would it be possible to add a Driver implementation for Wallaby?

I envision that this could be used for UI tests that involve JavaScript of any sorts, so we could test JavaScript from PhoenixTest using all the same primitives.

Once we use JavaScript in a page, we could add a test tag (e.g. @tag :js). For tests without the tag, it'd use the LiveView or static driver, using much less time and resources for running the test.

In that world, we could write truly user-centric tests without having to care about implementation details such as where JavaScript is used, and easily switch browser-based testing on and off.

Thanks a lot for the great library and its approach!

germsvel commented 2 months ago

😄 you read my mind. Adding Wallaby as an option (probably through a js tag) is something I'd love to do. But it's probably a bigger lift, and I don't know when I'll have time to dig into it. But I think it would be very cool to have that work.