יָאללָה
יָאללָה
FFilament
Created by יָאללָה on 1/3/2024 in #❓┊help
Failed asserting that a table action with name [delete] is visible
Hey guys, writing tests for a Filament v3 dashboard that a colleague wrote. I have a ListMerchants component with a table() method which has an ActionGroup containing actions including a delete action:
DeleteAction::make('delete')
->label('Detach Business')
->color('danger')
->icon(false)
->requiresConfirmation()
DeleteAction::make('delete')
->label('Detach Business')
->color('danger')
->icon(false)
->requiresConfirmation()
My test:
$merchant = Merchant::factory()->create();

Livewire::test(MerchantResource\Pages\ListMerchants::class)
->callTableAction(DeleteAction::class, $merchant)
->assertHasNoErrors();
$merchant = Merchant::factory()->create();

Livewire::test(MerchantResource\Pages\ListMerchants::class)
->callTableAction(DeleteAction::class, $merchant)
->assertHasNoErrors();
Fails with: Failed asserting that a table action with name [delete] is visible on the [App\Filament\Resources\MerchantResource\Pages\ListMerchants] component for record... I've had a look through the docs and I've really no idea what I'm doing wrong here - any advice/pointers greatly appreciated!
1 replies