Test Section header action

How can I test an action that's inside a Section header:
Section::make('Search')
->headerActions([
Action::make('csv_import')
->action(...)
])
->schema([
...
]),
Section::make('Search')
->headerActions([
Action::make('csv_import')
->action(...)
])
->schema([
...
]),
I have tried:
Livewire::actingAs($this->user)
->test(Search::class)
->assertActionVisible(TestAction::make('import_csv')->schemaComponent(''));
Livewire::actingAs($this->user)
->test(Search::class)
->assertActionVisible(TestAction::make('import_csv')->schemaComponent(''));
and I get the following error:
Failed asserting that an action with name [import_csv] is visible on the [App\Livewire\Search] component.
Failed asserting that an action with name [import_csv] is visible on the [App\Livewire\Search] component.
I have also tried with the schemaComponent being form, data, search but same error message. Any ideas? I see in the html the following too on my action:
{
"schemaComponent": "form"
}
{
"schemaComponent": "form"
}
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?