testing table action
Maybe I am being dumb but hopefully someone can help.
I have a simple Resource that has a table and it also has a custom page.
The custom page is listed in the
getPages()
function on the resource
I have a row action to open a new custom page.
This works fine in the browser. It opens the URL as expected.
I'm trying to write a simple test and I can't work out how. I am looking at the docs here https://filamentphp.com/docs/3.x/tables/testing#url and there should be a simple assertTableActionHasUrl
However when I use that in our test it fails because the Action isn't loading the current record in to the Action and I'm not sure how to proceed.
So the error is happening on the ->url(fn(Firm $record))
in the action...
Any advice ?0 Replies