germsvel / phoenix_test

MIT License
144 stars 20 forks source link

Failing test for hidden input accompanying checkbox #67

Closed totaltrash closed 4 months ago

totaltrash commented 4 months ago

Hi @germsvel, i noticed an issue with some of my tests when i updated phoenix test to 0.2.11.

When submitting a form with a checkbox that has an accompanying hidden input (to populate the params when the checkbox is not checked), phoenix_test seems to grab the value in the hidden input (because it's the first input in the dom?) and ignores the later checkbox regardless of whether it is checked.

germsvel commented 4 months ago

Thanks for opening this @totaltrash! I'm not exactly sure how to push directly to your branch to add a fix with your tests (I think I might have to fork your repo and then push?). So instead I grabbed your tests and opened #68 to fix this.

Thanks for the tests! 🥳 It made it so much easier to fix the issue at hand.