diff --git a/tests/Feature/Livewire/DashboardTest.php b/tests/Feature/Livewire/DashboardTest.php index 05857a3a..89bca4af 100644 --- a/tests/Feature/Livewire/DashboardTest.php +++ b/tests/Feature/Livewire/DashboardTest.php @@ -347,14 +347,22 @@ public function test_it_keys_the_chart_on_its_data_so_a_range_change_replaces_it $this->assertNotSame($julyKey[1], $augustKey[1]); } - public function test_it_keys_each_chart_separately_when_their_payloads_match(): void + public function test_it_gives_concurrently_rendered_charts_distinct_keys(): void { + RouteArticle::factory()->create([ + 'approval_status' => ApprovalStatusEnum::APPROVED, + 'publish_status' => PublishStatusEnum::PUBLISHED, + 'decided_at' => Carbon::parse('2026-07-10 12:00:00'), + 'updated_at' => Carbon::parse('2026-07-10 12:00:00'), + ]); + $fragments = $this->islandFragments( Livewire::test(Dashboard::class)->call('applyRange', '2026-07-01', '2026-07-31') ); preg_match_all('/wire:key="(chart-[a-f0-9]+)"/', $fragments, $keys); + $this->assertCount(2, $keys[1]); $this->assertSame($keys[1], array_unique($keys[1])); }