Patrick Daether
Patrick Daether
FFilament
Created by Patrick Daether on 9/15/2023 in #❓┊help
Testing tables with multiple panels
I'm testing a table in a project with multiple panels "admin" and "company". Example test is like this:
it('can list posts', function () {
$pages = Page::factory()->count(10)->create();

livewire(App\Filament\Company\Resources\PageResource\Pages\ListPages::class)
->assertCanSeeTableRecords($pages);
});
it('can list posts', function () {
$pages = Page::factory()->count(10)->create();

livewire(App\Filament\Company\Resources\PageResource\Pages\ListPages::class)
->assertCanSeeTableRecords($pages);
});
When executing the test I get the error Route [filament.admin.resources.pages.edit] not defined. It seems that it assumes that the table is used on the default panel 'admin', but it is on the 'company' panel. meaning the correct route would be filament.company.resources.pages.edit. Do I need to set the panel somewhere in the test or is this a bug?
3 replies