FilamentF
Filament2y ago
Mavv

ComponentNotFoundException: Unable to find component (PHPUnit)

I wanted to start writing tests for filling out my forms using PHPUnit (no Pest). But I keep running into the same issue.

See here my testing code:
use App\Filament\Resources\MusicianResource;
use Livewire\Livewire;

    public function testFillForm()
    {
        Livewire::test(MusicianResource::class)
            ->fill([...]);
    }


I always get this error message:
Livewire\Exceptions\ComponentNotFoundException: Unable to find component: [App\Filament\Resources\MusicianResource]

I tried looking up the filament testing page and the Livewire testing page.
Solution
Thanks. The issue then is, that I was trying to test the whole resource, but one must always test the individual pages 👍
Was this page helpful?