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
178 stars 23 forks source link

Issues with unchecking checkboxes and unselecting items from multiple select #102

Closed totaltrash closed 3 months ago

totaltrash commented 3 months ago

This commit has some failing tests for a number of issues, but they all relate to removing items from multiple selects or checkbox groups.

  1. Can't unselect options from a multiple select (maybe we need an unselect() helper)
  2. Can't uncheck checkboxes that aren't backed by a hidden input
  3. A form prefilled with one selected item in a multiple select has duplicate items (same for checkbox group)

I've had a quick go at an implementation to fix these issues, but I can't quite get my head around what you would need to do to remove items from a form in a session. I'll give it another crack soon, but any pointers would be awesome