Testing form data for a simple resource (Filament v3).
Gooday, I hope someone can help me.
I am writing a test to check the form data is valid on a resource created with the --simple option. The following code is an example and works as expected:
In the modal form the name field is disabled until a state has been chosen. I want to extend this code to check that the name field is disabled. If I use ->assertFormFieldIsEnabled('name') I get an error:
Filament\Resources\Pages\ListRecords::form(): Argument #1 ($form) must be of type Filament\Forms\Form, Filament\Infolists\Infolist given.
This code above is merely an example and my actual form has more fields which I'd like to check using the built-in form testing functions but not sure how to get around this error. Your help is appreciated.
0 Replies