How to test modal footer actions

The problem I'm facing is how to test these actions using the Livewire/Filament testing utilities. When I try to use assertActionExists('markAsCompleted') directly after the main modal is mounted, I get errors like:

Failed asserting that an action with name [markAsCompleted] exists on the [App\Filament...] page.

What is the correct way to test actions defined within extraModalFooterActions of a Filament modal?

Action::make('edit')
    // ...
    ->extraModalFooterActions([
        Action::make('markAsCompleted')
            ->action(function () {
                // ...
            }),
    ])
Was this page helpful?