Pest testing Flux::toast #427
-
Hi all, Trying to update my Livewire based pest tests for Flux::toast, but not having much luck. Previously I had my own notifications implemented and could test these by using:
I can test that a toast was triggered via:
But I would like to ensure the right message was triggered
Unfortunately the above always fails. I've looked at the toast js file in the vendor directory, but not sure where I'm going wrong. Any help appreciated. Many thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
For anyone else struggling with this, after trial & error, this worked for me:
|
Beta Was this translation helpful? Give feedback.
-
Just a heads-up for other people coming here. If you have specified both some text and a heading, like for example Flux::toast(
heading: 'Error!',
text: 'The credentials provided do not match our records.',
variant: 'danger',
); Then the order on the items in the
Similarly for the See |
Beta Was this translation helpful? Give feedback.
For anyone else struggling with this, after trial & error, this worked for me: