F
Filament4w ago
dyo

Problem in running render test at ManageRelatedRecords class

This is my test code
$this->actingAs($this->user)
->livewire(ManageCampaignRef::class, [
'ownerRecord' => $this->sample_data,
'pageClass' => EditCampaign::class,
])
->assertCanSeeTableRecords($this->sample_data->campaign_ref);
$this->actingAs($this->user)
->livewire(ManageCampaignRef::class, [
'ownerRecord' => $this->sample_data,
'pageClass' => EditCampaign::class,
])
->assertCanSeeTableRecords($this->sample_data->campaign_ref);
And I got error when I run the test:
Unable to resolve dependency [Parameter #0 [ <required> string|int $record ]] in class Filament\Resources\Pages\ManageRelatedRecords
Unable to resolve dependency [Parameter #0 [ <required> string|int $record ]] in class Filament\Resources\Pages\ManageRelatedRecords
I already make sure that the global variable above is correct. $this->user is a model record user. $this->sample_data is a model record of campaign. What probably did I missed?
2 Replies
dyo
dyoOP4w ago
nice, that's solved my problem.. thanks a lot..
Want results from more Discord servers?
Add your server