Can't pass a tenant parameter to a feature pest test.

Hey, I'm trying to add tests to my app. I'm having trouble passing the tenant id (in my case it's int of 1).

Error:
Missing required parameter for [Route: filament.company.resources.seo-keywords.index] [URI: company/{tenant}/seo-keywords]


I've attached a screenshot of my test.

I'm following the docs on how to pass it, but it doesn't seem to work:

https://filamentphp.com/docs/3.x/panels/testing#filling-existing-data-1
Screenshot_2024-07-26_at_15.42.05.png
Solution
In your beforeEach you probably want to set the tenant:

beforeEach(function(){
  // ...
  Filament::setTenant(YourTenantModel::class);
});


Also please dont post screenshots of code. Post actual code 😅
Was this page helpful?