Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ImpactLab's avatar

ImpactLab wrote a reply+100 XP

1mo ago

How to test SelectColumn in a Filament table?

@kianaassenheimer I have got this working in a round-about way with updateTableColumnState:

$this->record->assign($user, MemberPosition::ANALYST);

$component = livewire(MembersTable::class, ['record' => $this->record]);

$component->call('updateTableColumnState', 'position', (string)$user->id, MemberPosition::QUALITY_ASSURANCE->value);

// Assert change has persisted
  	$pivot = $this->record->members()->where('user_id', $user->id)->first()->pivot;
    expect($pivot->position)->toBe(MemberPosition::QUALITY_ASSURANCE);