withPersonalOrganization()->create([ 'email' => 'admin@example.com', ]); $this->actingAs($user); } public function test_can_list_clients(): void { // Arrange $clients = Client::factory()->createMany(5); // Act $response = Livewire::test(ClientResource\Pages\ListClients::class); // Assert $response->assertSuccessful(); $response->assertCanSeeTableRecords($clients); } public function test_can_see_edit_page_of_client(): void { // Arrange $client = Client::factory()->create(); // Act $response = Livewire::test(ClientResource\Pages\EditClient::class, ['record' => $client->getKey()]); // Assert $response->assertSuccessful(); } }