© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•15mo ago•
3 replies
Roland Barkóczi

test relationmanager CreateAction

Hello guys,

could somebody submit some example code how to test a relation manager create action?
- how to fill the form, how to submit the form?
Based on the documentation here:

i wrote this test, but it fails, cannot see the text:
$this->actingAs($user)
        ->get(EventResource::getUrl('view', ['tenant' => $tenant->slug, 'record' => $event->id]))
        ->assertSuccessful();

    livewire(EventResource\RelationManagers\AttendeeRelationManager::class,
        [
            'ownerRecord' => $event,
            'pageClass' => EventResource\Pages\ViewEvent::class,
        ])
        ->assertSuccessful()
        ->mountAction(CreateAction::class)
        ->assertSee('Create Attendee');
$this->actingAs($user)
        ->get(EventResource::getUrl('view', ['tenant' => $tenant->slug, 'record' => $event->id]))
        ->assertSuccessful();

    livewire(EventResource\RelationManagers\AttendeeRelationManager::class,
        [
            'ownerRecord' => $event,
            'pageClass' => EventResource\Pages\ViewEvent::class,
        ])
        ->assertSuccessful()
        ->mountAction(CreateAction::class)
        ->assertSee('Create Attendee');
Testing - Actions - Filament
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

Pass parameter from RelationManager createAction to form
FilamentFFilament / ❓┊help
2y ago
Cannot test a RelationManager
FilamentFFilament / ❓┊help
3y ago
CreateAction in RelationManager at table headerActions always use related resource form
FilamentFFilament / ❓┊help
4mo ago