Feb 3, 2025
0
Level 2
How test list with them widgets ?
Hi everyone,
I have a case where I throw an error DivisionByZero cause I forgot a guard but because of this I d'like to test this.
But if I use this :
it('can render the page with empty list', function () {
Conversion::query()->delete();
$this->actingAs(User::factory()->create(['is_active' => 1]));
$this->get(ConversionResource::getUrl())->assertStatus(500);
})->only();
or
This one :
it('can render the page with empty list', function () {
Conversion::query()->delete();
$this->actingAs(User::factory()->create(['is_active' => 1]));
livewire(ListConversions::class)
->assertStatus(500);
})->only();
Both failed and assert status 200
Do you have any ideas ?
Thank you in advance
Please or to participate in this conversation.