Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix formatting found elements with nested children (#9)
As part of its assertion error messages, PhoenixTest outputs HTML elements that match the query selector but do not contain the requested text. Currently it only works for elements that only contain one child, and breaks otherwise. It is sometimes useful to assert that a word will be present in a complex structure (maybe generated, like the modal popup from `PetalComponents`) without coupling the code too much to the internal DOM of the structure. Proposal: allow complex structures but not assuming only one child by default, and use `Floki.raw_html(content, pretty: true)` to render the error message.
- Loading branch information