© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•5mo ago•
4 replies
bwubs

Test extra item actions of repeater

How do I test an item action of a Repeater? I'm currently upgrading from v3 => v4 and this test assertions is failing, complaining that it can't find the action. Previsouly I was able to apply the form the action was part of. But it seems this is no longer possible?

Livewire::test(PhonebookForm::class, ['groupId' => $group->getKey()])
    ->assertFormFieldIsEnabled('phonebook')
    // This now fails
    ->assertActionExists(actions: 'delete-item') 
    ->assertActionExists(actions: 'delete-item', arguments: ['item' => "record-{$entry1->getKey()}"])
    ->assertActionDisabled(actions: 'delete-item', arguments: ['item' => "record-{$entry2->getKey()}"]);
Livewire::test(PhonebookForm::class, ['groupId' => $group->getKey()])
    ->assertFormFieldIsEnabled('phonebook')
    // This now fails
    ->assertActionExists(actions: 'delete-item') 
    ->assertActionExists(actions: 'delete-item', arguments: ['item' => "record-{$entry1->getKey()}"])
    ->assertActionDisabled(actions: 'delete-item', arguments: ['item' => "record-{$entry2->getKey()}"]);
Solution
Found it myself!
assertFormComponentActionExists
assertFormComponentActionExists
,
assertFormComponentActionEnabled
assertFormComponentActionEnabled
and
assertFormComponentActionDisabled
assertFormComponentActionDisabled
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Same repeater , different extra actions
FilamentFFilament / ❓┊help
2y ago
Call extra item action after add repeater item
FilamentFFilament / ❓┊help
3mo ago
Repeater Item Label
FilamentFFilament / ❓┊help
4mo ago
Repeater item id
FilamentFFilament / ❓┊help
2y ago