LiveSelect - Dynamic selection input component for LiveView

There’s tricks on how to inspect content that disappear automatically when focus is lost. The easiest I know of is this one.

Most of this test has little value because it’s not testing your code but a library that’s already tested. There’s already tests in the live select test suite that check that the dropdown is correctly filled with elements, that clicking on “x” removes tags, etc.

Your tests should test your own code :slight_smile:

You test it like any other input element: send the form’s data using render_submit or render_change and test that your view (or component) is reacting as you expect.

The only caveat is that the input value is sent with an hidden input, so you can’t use form to set the value, you have to do it in the render_submit call.