FilamentF
Filament16mo ago
CGM

How do I create a test for filtersForm() on dashboard?

I'm having a difficult time creating a test to ensure one of my filters is providing the correct select list in the filtersForm() method on my dashboard.

How can I target this method?

class Dashboard extends \Filament\Pages\Dashboard
{
    use HasFiltersForm;

    public function filtersForm(Form $form): Form
    {
        return $form
            ->schema([
              // These are the form fields I want to test...
              // I just want to make sure a select list has the proper values.
            ]);
    }
}
Was this page helpful?