beforeEach(function () {
$this->actingAs(
User::create(['name' => 'user', 'email' => '[email protected]', 'password' => Hash::make('password')])
);
$panel = Panel::make()
->id('console')
->path('console')
->default(); // Where `app` is the ID of the panel you want to test.
Filament::setCurrentPanel($panel);
});
it('can render page', function () {
dd(Route::getRoutes());
});
In my Pest test, I expected to see some console routes, but there is none. Any idea what I might be missing?
I don't think you are looking for the right thing. Panels are not pages nor a resource. You register a panel within a page. And then the page has a panel component, the URL is to the Page, not to the Panel.
@nakov thanks, i do have some resources registered, but I cannot find their routes too, that was why I shortened it to my example, but you are right, the code I pasted most likely will have 0 routes with /console