Release v1.4.0 #146

Merged
myrmidex merged 71 commits from release/v1.4.0 into main 2026-08-15 00:36:54 +02:00
Showing only changes of commit 812c663529 - Show all commits

View file

@ -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]); $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( $fragments = $this->islandFragments(
Livewire::test(Dashboard::class)->call('applyRange', '2026-07-01', '2026-07-31') Livewire::test(Dashboard::class)->call('applyRange', '2026-07-01', '2026-07-31')
); );
preg_match_all('/wire:key="(chart-[a-f0-9]+)"/', $fragments, $keys); preg_match_all('/wire:key="(chart-[a-f0-9]+)"/', $fragments, $keys);
$this->assertCount(2, $keys[1]);
$this->assertSame($keys[1], array_unique($keys[1])); $this->assertSame($keys[1], array_unique($keys[1]));
} }