Closed cadebward closed 4 years ago
asserting on the HTML content is the way to go, like anything other content you care about asserting on the page. You could look into a library like Floki to use selector-based tests if you wanted to specifically test the content of say #flash-info
.
I know this is technically a feature request 🙈 , but would it make sense to have an
assert_flash
or maybe support forget_flash
for live flash?I've been looking through the code and I'm not 100% sure if its even possible in its current form. If it is, I'd be happy to submit a PR. Just thought I'd toss this out for discussion first.
Examples:
The alternative would be something like:
Which isn't the worst thing in the world. I think a helper like
assert_flash
orget_flash
would really help the LiveView testing story (which is already amazing).