Issue with Tenancy-enabled test

I am in the process of developing a test that uses a resource situated within a panel, which has tenancy functionality enabled. However, I'm encountering challenges in getting the test to function as expected.

Below is the PHP code snippet representing the test:
it('can see own chargers', function () {
    $user = User::factory()->create();
    $this->actingAs($user);

    $team = Team::factory()->create();
    $team->users()->attach($user);

    $chargers = Charger::factory()->count(10)->create();

    livewire(ChargerResource\Pages\ListChargers::class, [
        'tenant' => $team,
    ])->assertCanSeeTableRecords($chargers);
});


Upon execution, I'm confronted with the following error message:
FAILED  Tests\Feature\Filament\App\ChargerResourceTest > it can see own chargers                                                             ViewException   
Missing required parameter for [Route: filament.app.resources.chargers.view] [URI: app/{tenant}/chargers/{record}/overview] [Missing parameter: tenant].

Any assistance in resolving this issue would be greatly appreciated.
Was this page helpful?