Testing modal form in resource relation
I want to test creating an address which is a sub-resource of customers but the form opens in a modal rather than go to a dedicated form page. How can I test this? I've tried the below and this isn't working
13 Replies
Anyone able to point me in the right direction with this?
try
callMountedTableAction()
instead of callTableAction('create')
No bueno. I get the same error as in that screengrab
fillForm
has a second argument $form
which defaults to "form", as this is a relation manager form do I need to pass in a form name? Not sure what I'd pass in though or how I'd find the nameuse
setTableActionData
at the place of fillForm
Hmm, still the same. This is what the test looks like at the moment with these couple of updates:
It's weird because the error says that InfoList is being passed into form(), but I dd it out and it's an instance of Filament\Forms\Form which is what I expect
So I'm not sure where InfoList is coming from
Actually it is
best
Still getting that same error 😮💨
I'm not sure exactly what an InfoList is, but I'm not explicitly using one in anything I've set up so far
The form itself works fine if I were to create an address manually
Did you solve it?
Unfortunately not. I keep getting that same error about InfoList
Which I don’t understand why because I’m not using an info list anywhere
let me try that..
Any joy?