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

Check/uncheck with partial match via 'exact: false' #120

Closed ftes closed 2 months ago

ftes commented 2 months ago

Add exact option to check/3 and uncheck/3 to allow (un-)checking by substring match.

Related to #118.

To do

germsvel commented 2 months ago

Thanks for working on this.

Like I mentioned in #118, I think it makes sense for the default to be exact: true in these cases.

When asking, "what would a user expect to be the default here?", I think the user would typically write the test with exact matches.

That's different from assertions, where I think we're typically trying to do an inexact match (which is why the default there is false)

ftes commented 2 months ago

I think it makes sense for the default to be exact: true in these cases.

Agreed, closing this