How to handle macros in resource tests?

I'm writing a test for my resource. In this resource is a TextInput macro defined in AppServiceProvider. When I run my test, I get this error:
Illuminate\View\ViewException: Method Filament\Forms\Components\TextInput::myMacroFunctionName does not exist.
Illuminate\View\ViewException: Method Filament\Forms\Components\TextInput::myMacroFunctionName does not exist.
The test itself:
Livewire::actingAs($this->user)
->test(ViewMyResource::class, ['record' => $this->myResource->id])
Livewire::actingAs($this->user)
->test(ViewMyResource::class, ['record' => $this->myResource->id])
I'm assuming this is because the Livewire usage is separate from the app instance in the test and thus won't have the macro? Is there away to link this up?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server