Level 80
Jun 21, 2022
1
Level 1
How to check pagination in testing laravel livewire
hello everyone, could u all help me. How to check the pagination in testing laravel livewire. this my code :
public function testViewAllMyProjecWithPaginationLivewire()
{
$component = Livewire::test(ShowMyProject::class);
$component->assertStatus(200)
->assertSee("paginator-page");
}
So I checked with method assertSee(), especially when I wanted to change the number of paginates in the render method. so that I don't change it directly in the livewire component. is there another best way to do testing on laravel livewire pagination?
Thanks, everyone.
Please or to participate in this conversation.