How to test non-default panel...?
I'm trying to test a non-default panel -- the edit tenant profile class, to be more specific -- and it seems like I'm missing something. It seems like the test environment isn't aware of the different panels that have been created.
Can anyone point to any examples of how to test functionality that belongs to a non-default panel...? π€
I don't think it matters, but the panel supports multiple tenants.
3 Replies
Solution
I found that I have to set the tenant:
Filament::setTenant($tenant);
@Travis i'm facing the same issue, but I don't have a
$tenant
, how do you derive it?
1. I have 2 panels that live on different URLs, i.e. /account
and /admin
2. I want to test /account/something
, but /admin
panel was called after /account
's, so the URL by Something::getUrl("index")
in my test is /admin/something
which doesn't exists
3. as you can see, I don't have $tenant
, so I'm not sure how make my test use /account/something
appreciate your help thank you!Hi @kbb ....I'm at work atm, so I'm not able to help you out. I will try to go back to my code/memory from early August to see if I can figure out something that can help you.
In the meantime, perhaps you can tell me if you're using the tenant functionality or not...?
I'll try to get to you today/tomorrow, but if you don't get anything from me by this weekend, feel free to ping me. I've got a lot on my plate right now. π