Testing table set activeTab and toggle all columns

Currently setting the toggle session manually but wondering if that's a way of making this dynamic?
session(['tables' => ['ListProducts_toggled_columns' => ['name' => true]]]);


But how would you set the active tab?
 $products = Collection::factory()->count(3)->create([
    'type' => 'Group'
]);

Collection::factory()->count(3)->create([
    'type' => 'Another Group'
])

livewire(ListProducts::class)
    ->assertCountTableRecords(3)
    ->assertCanSeeTableRecords($products)
    ->sortTable('name')


E.g
public function getTabs(): array
{
  return [
    Tab::make('Test')
     ->modifyQueryUsing(fn (Builder $query) => $query->where('type', 'Group'))
  ];
}
Solution
Cheers I found it was actually possible to set the property and the hook event for updatedActiveTab is called very easy/cool:
livewire(ListProducts::class)
        ->assertCountTableRecords(4)
        ->set('activeTab', 2)
        ->assertCountTableRecords(2)
Was this page helpful?