How can one specify a fixed panel while creating a test case?

I need to write test cases to check all middleware and permissions in the project, however, I want to test separately for each panel, is there any way to do that?
2 Replies
LeandroFerreira
LeandroFerreira4mo ago
You can use this
$panel = filament()->getPanel('panel_id');
filament()->setCurrentPanel($panel);
$panel = filament()->getPanel('panel_id');
filament()->setCurrentPanel($panel);
03_dotuan
03_dotuan4mo ago
@Leandro Ferreira thank you very much, it worked