Test form component's action
Is there a way of interacting with individual form components inside a form?
E.g how to call add action on a repeater?
mountFormComponentAction('data.categories', 'add')
Or testing a select's createOptionForm mountFormComponentAction('data.categories.record-183.language_id', 'editOption')
In v2 you could
Also is there a way of asserting that an action was called or is there a way to test notifications for an action. How do test the replicate action redirects to the newly created product in assertRedirect
?
This shows 'A notification was not sent'Solution:Jump to solution
CreateOptionForm
https://github.com/filamentphp/filament/discussions/10381#discussioncomment-7900957...
GitHub
How to test select createOptionUsing · filamentphp filament · Discu...
I searched the docs for how to test select createOptionUsing modal but i couldn't find any Forms\Components\Select::make('owner_id') ->relationship('owner', 'name') -...
3 Replies
Solution
CreateOptionForm
https://github.com/filamentphp/filament/discussions/10381#discussioncomment-7900957
GitHub
How to test select createOptionUsing · filamentphp filament · Discu...
I searched the docs for how to test select createOptionUsing modal but i couldn't find any Forms\Components\Select::make('owner_id') ->relationship('owner', 'name') -...
Cheers @Leandro Ferreira that's exactly what I needed.
Any ideas how to test the replicate action was successfully called and redirects?
Hum, possible but I need to try it