FilamentF
Filament3y ago
*

Testing select field options

I've implemented some logic to update the query in a select field using modifyQueryUsing(closure)

Is there a way to test this logic?

Maybe using a closure with assertFormFieldExists()?
Like...

livewire(CreateUser::class)
    ->assertFormFieldExists('organisations', function (Select $input) {
        return /* some logic here */;
    });


I've attempted to get the options using the $input closure param above with no luck.

Note: My select is multiple() and has preload()

Any help and/or insight appreciated.
Was this page helpful?