Testing for Infolist actions (hintAction)
I have a
Filament\Infolists\Components\TextEntry
with a hintAction
. Are there any action test methods for these? I am using ->test(Resource\View::class, ...)
and assertActionExists
works for actions setup in getHeaderActions`. But this fails for those on the infolist components.4 Replies
Do you want to assert that the action exists on the TextEntry or test the action code itself?
Both! π
I'm not too familiar with testing on v3 yet, so maybe someone else can comment with more information. From a quick look though, I think one option is to manually dig into the infolist component to grab the TextEntry instance and perform assertions:
I think the same can be applied to mount and run the action
Thanks. I'll have to investigate a little more.