Testing action error
Hello and thanks for anyone that helps me.
So I have a list page were i have a custom action
When testing this action i'm getting the error
The test is the following one
If i remove the
Action $action
parameter from the closure on the before method from the action the error doesn't appear anymore.
So how can i test an action that have a closure with the action itself?4 Replies
Anyone had this error before?
I think this is coming from
callAction()
which asserts opening the modal which won't happen because of your before()
. Try using mountAction()
@Dennis Koch thanks for the answer but i have tryied it and i have the same behaviour
even doing this
removing the before and adding the check on the action i have the same behaviour...it's something to do when i pass the Action parametter to the closure.
Solved the situation removing the
and adding
and removing the expectation
for an unknown reason for me the halt method is giving this error
Same issue here when halting the action and testing for this. @Dennis Koch those assertions prevent it reaching
assertActionHalted
.