vendredi 20 novembre 2020

Assert that a Laravel Livewire component sees a flash message rather than a redirect

I have a Livewire sign in component which takes an email address and password. If the email/password is correct, it redirects - otherwise, it shows a flash message.

How can I test this?

  • assertSee doesn't feel write, as I'd have to hard-code the flash message
  • assertSeeLivewire doesn't seem to see the sign in component (even though it's the component being tested
  • there doesn't appear to be a method for assertSession or similar to detect a flash message

Aucun commentaire:

Enregistrer un commentaire