© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•8mo ago•
4 replies
Exi

"reorderRecords" action not found when testing a reorderable table

Filament v4 (Beta 15)

My CategoriesResource table has reordering enabled:

Table::make()
    ->reorderable('sort_order');
Table::make()
    ->reorderable('sort_order');


In my test I try to assert the reorder action exists / trigger it:

livewire(ListCategories::class)
    ->assertCanSeeTableRecords($categories)
    ->callAction('reorderRecords');          // also tried TestAction::make('reorderRecords')->table()
livewire(ListCategories::class)
    ->assertCanSeeTableRecords($categories)
    ->callAction('reorderRecords');          // also tried TestAction::make('reorderRecords')->table()


but I get:

Action [reorderRecords] not found on table.
Action [reorderRecords] not found on table.


What’s the correct way to test (or at least assert the presence of) the reorder action produced by reorderable()?
Solution
livewire(ListCategories::class)
            ->tap(function (Testable $testable): void {
                /** @var ListCategories $livewire */
                $livewire = $testable->instance();

                $table = $livewire->getTable();

                expect($table)
                    ->isReorderAuthorized()->toBeTrue();
            });
livewire(ListCategories::class)
            ->tap(function (Testable $testable): void {
                /** @var ListCategories $livewire */
                $livewire = $testable->instance();

                $table = $livewire->getTable();

                expect($table)
                    ->isReorderAuthorized()->toBeTrue();
            });


works for me
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
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Reorderable Table not working
FilamentFFilament / ❓┊help
14mo ago
testing table action
FilamentFFilament / ❓┊help
2y ago
Table action testing
FilamentFFilament / ❓┊help
3y ago
Failing test when calling testing a table action
FilamentFFilament / ❓┊help
14mo ago