Füge duplizierte Abschnitte direkt hinter dem Original ein.
CI Feature / test (push) Successful in 34s
Deploy Test / test (push) Successful in 30s
Deploy Test / deploy (push) Successful in 28s

Filament hängt eine Kopie sonst ans Seitenende; auf langen Seiten war sie dort
schwer zu finden. Gefunden in der Browserprüfung.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 5.5 committed 2026-11-17 21:10:22 +01:00
1 parent 4cad60259a
commit 6152451e2e
3 files changed
+54 -1

No files matched your search

+13
View File
@@ -133,6 +133,19 @@ public function test_editor_reorders_and_duplicates_sections(): void
$this->assertCount(5, array_unique(array_column($revision->sections, 'id')), 'Ein duplizierter Abschnitt erhält eine eigene Kennung.');
}
public function test_duplicate_action_places_the_copy_right_after_the_section(): void
{
$page = Page::query()->where('path', '/')->firstOrFail();
$component = Livewire::actingAs($this->editor(), 'staff')->test(EditPage::class, ['record' => $page->id]);
$keys = array_keys($component->get('data.sections'));
$component->callAction(TestAction::make('clone')->schemaComponent('sections')->arguments(['item' => $keys[1]]));
$this->assertSame(['heading', 'prose', 'prose', 'cards', 'call_to_action'], $this->widgetTypes($component->get('data.sections')));
$component->call('save')->assertHasNoFormErrors();
$this->assertSame(['heading', 'prose', 'prose', 'cards', 'call_to_action'], array_column($page->fresh()->latestRevision->blocks, 'type'));
}
public function test_layout_change_keeps_widgets_and_rejects_layouts_with_too_few_slots(): void
{
$page = Page::query()->where('path', '/')->firstOrFail();