© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3mo ago•
2 replies
emmann

Testing Section header/footer Actions

Panels4️⃣v4TestingForm builder
Hello,

How do I test the schema/submit action for an action I defined in a Section's
headerActions
headerActions
or
footerActions
footerActions
within a panel page?

For a start, I have my schema set up like so:

Section::make('Prescriptions')
    ->id('prescriptions')
    ->schema([
      //...
    ])
    ->headerActions([
        Action::make('New Prescription')
            ->icon(Heroicon::Plus)
            ->slideOver()
            ->modalWidth(Width::ExtraLarge)
            ->action(fn ($data) => $this->addPrescription($data))
            ->databaseTransaction()
            ->schema(...)
Section::make('Prescriptions')
    ->id('prescriptions')
    ->schema([
      //...
    ])
    ->headerActions([
        Action::make('New Prescription')
            ->icon(Heroicon::Plus)
            ->slideOver()
            ->modalWidth(Width::ExtraLarge)
            ->action(fn ($data) => $this->addPrescription($data))
            ->databaseTransaction()
            ->schema(...)


I have a test that calls
// assettion fails
Livewire::test(Prescription::class)->assertActionExists('New Prescription')

// callMountedAction requires an array, I'm not sure what the array item shere should be
Livewire::test(Prescriptions::class)->callMountedAction('New Prescription');

// This still requires an array of $actions, I'm unsure where those actions should come from
Livewire::test(Prescriptions::class)->callInfolistAction('New Prescription');
// assettion fails
Livewire::test(Prescription::class)->assertActionExists('New Prescription')

// callMountedAction requires an array, I'm not sure what the array item shere should be
Livewire::test(Prescriptions::class)->callMountedAction('New Prescription');

// This still requires an array of $actions, I'm unsure where those actions should come from
Livewire::test(Prescriptions::class)->callInfolistAction('New Prescription');


Hoping someone can point out where I should start from.
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

Section has no footer actions?
FilamentFFilament / ❓┊help
2y ago
Move Header Actions to Footer
FilamentFFilament / ❓┊help
2y ago
How to test Header/Footer Actions in a Section Form Component
FilamentFFilament / ❓┊help
2y ago
Testing page footer actions in v4
FilamentFFilament / ❓┊help
6mo ago