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?
But how would you set the active tab?
E.g
Solution:Jump to solution
Cheers I found it was actually possible to set the property and the hook event for
updatedActiveTab
is called very easy/cool:
```php
livewire(ListProducts::class)
->assertCountTableRecords(4)
->set('activeTab', 2)...3 Replies
Bump - primarily in need of a way of testing the activeTab which is set on the resource. So can't find a way of setting this?
IIRC when a tab is made active it's reflected in the page URL. Similarly for toggles. Can that be leveraged for your tests?
Solution
Cheers I found it was actually possible to set the property and the hook event for
updatedActiveTab
is called very easy/cool: