First of all, hi everyone!
I am a developer with py and js background in the process of learing Elixir (mandatory disclaimer).
I am writing tests for a Liveview project.
I have a form wich filters a list of items.
I would like to write a few tests to document the filtering behaviour.
I would like to assert that the number of elements on the page after the filters activation is correct.
First thing came to mind was has_element?/3 wich led me to element/3, and I saw that those functions raise an error if more that one element is returned.
Now, the questions:
Am I on the wrong path entirely? (In wanting to test the correct count of elements are rendered)
On IRC I was suggested to use an external lib to count the elements, I’d prefer not (if there’s a vanilla way)
I was wondering if an elements/3 is planned, or it’s a design decision to have that return only one element.