Open nie7321 opened 5 years ago
This fixes the error from #50 by wrapping the scoped callback with another callback to inject the action collector.
It is an imperfect solution -- since onComponent is called before the callback is evaluated in Laravel\Dusk\Browser, I cannot think of a nice way to get the correct action collector instance in place for a component's assert() method.
onComponent
assert()
I could copy-paste the method definition, but that seems kinda gross and brittle. Does anyone have any ideas?
Have almost same problem. I'd appreciate all the help I can get. Thanks!
This fixes the error from #50 by wrapping the scoped callback with another callback to inject the action collector.
It is an imperfect solution -- since
onComponent
is called before the callback is evaluated in Laravel\Dusk\Browser, I cannot think of a nice way to get the correct action collector instance in place for a component'sassert()
method.I could copy-paste the method definition, but that seems kinda gross and brittle. Does anyone have any ideas?