germsvel / phoenix_test

PhoenixTest provides a unified way of writing feature tests -- regardless of whether you're testing LiveView pages or static (non-LiveView) pages.
https://hex.pm/packages/phoenix_test
MIT License
181 stars 23 forks source link

Only document `open_browser/1` #35

Closed sodapopcan closed 9 months ago

sodapopcan commented 9 months ago

This adds @doc false to open_browser/2 (only used for tests) so that mix docs doesn't error out on us.

germsvel commented 9 months ago

@sodapopcan thanks for catching this! I got too eager and deleted some of your code 😬

Wish a test would've failed, but it's the nature of open_browser that we only test the 2-arity function.

sodapopcan commented 9 months ago

@germsvel I agree about the lack of failing test. Unfortunately I think the only way around this is to introduce some like Mox or something similar. There is one that doesn't require a behaviour—I'd be happy to do the work if you are more comfortable with that. I'll also think on a different dep-free way.

germsvel commented 9 months ago

@sodapopcan thanks for the offer to do more work on this test. I think it's fine as it is. I wouldn't want to introduce Mox just for that. It was my oversight. Just the nature of having that escape hatch. Thanks for all the work!