© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•16mo ago•
14 replies
Maxi

How to test modal actions?

I registered a modal action using the
registerModalActions()
registerModalActions()
function and when I mount the "parent" action and use the
assertSee()
assertSee()
function to check for the modal action's label I can find it just fine, but if I try to actuall call the modal action it says that no action with that name exists on my page, do I maybe have to load the action differently?

This is how I'm currently trying to access it:
it('can use modal action', function () {
// boilerplate
    livewire(PageResource::class)
       ->mountAction(ImportAction::class)
       ->assertActionExists('mymodalaction') // -> returns: Failed asserting that it exists
       ->assertSee('The label of my modal action'); // returns: true
})->only();
it('can use modal action', function () {
// boilerplate
    livewire(PageResource::class)
       ->mountAction(ImportAction::class)
       ->assertActionExists('mymodalaction') // -> returns: Failed asserting that it exists
       ->assertSee('The label of my modal action'); // returns: true
})->only();
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

How to test modal footer actions
FilamentFFilament / ❓┊help
9mo ago
how to test anonymous actions?
FilamentFFilament / ❓┊help
3y ago
Modal Actions
FilamentFFilament / ❓┊help
3y ago
Modal Test
FilamentFFilament / ❓┊help
3y ago