Help with failing test when using `searchTableColumns`

I'm hitting an error when using searchTableColumns in the below test assertions. If I use searchTable my test passes, but I was hoping to target the specific columns. My form schema contains a text input called email. I'm a little stumped by the error and why it's failing. Can anyone shine any light on this?
Livewire::test(ListCustomers::class)
->searchTableColumns(['email' => $email])
->assertCanSeeTableRecords($customers->where('email', $email))
->assertCanNotSeeTableRecords($customers->where('email', '<>', $email));
Livewire::test(ListCustomers::class)
->searchTableColumns(['email' => $email])
->assertCanSeeTableRecords($customers->where('email', $email))
->assertCanNotSeeTableRecords($customers->where('email', '<>', $email));
No description
2 Replies
Dennis Koch
Dennis Koch2w ago
What the table schema?
Aethyrion
AethyrionOP2w ago
Oops, sorry, wrong schema
$table
->columns([
Tables\Columns\TextColumn::make('first_name')->searchable()->sortable(),
Tables\Columns\TextColumn::make('last_name')->searchable()->sortable(),
Tables\Columns\TextColumn::make('email')->searchable()->sortable(),
Tables\Columns\IconColumn::make('active')->boolean()->alignCenter(),
])
$table
->columns([
Tables\Columns\TextColumn::make('first_name')->searchable()->sortable(),
Tables\Columns\TextColumn::make('last_name')->searchable()->sortable(),
Tables\Columns\TextColumn::make('email')->searchable()->sortable(),
Tables\Columns\IconColumn::make('active')->boolean()->alignCenter(),
])

Did you find this page helpful?