How to test `headerActions`/`footerActions` from the Section component?
I use a section, like the one from documenatation, that contains and action in headerActions. How can I test it?
I tried using
callFormComponentAction
, but it didn't work.
https://filamentphp.com/docs/3.x/forms/layout/section#adding-actions-to-the-sections-headerSolution:Jump to solution
Yes, you can test, like all the other forms from inside the component. https://filamentphp.com/docs/3.x/forms/testing#actions
3 Replies
callTableAction
is a start to ensure the action is present on the page. But regarding the Importer
class, I have no clue except from testing each method of this class individually. Have you found something?Solution
Yes, you can test, like all the other forms from inside the component. https://filamentphp.com/docs/3.x/forms/testing#actions
My mistake was that I didn't properly called the component when I tested, because I used multiple forms in the same component.