adnanerlansyah403's avatar

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.

0 likes
1 reply

Please or to participate in this conversation.