Führe einen gemeinsamen Layoutvertrag ein und integriere die Premium-Widgets.
Layoutvertrag (ADR-38) in der bestehenden Registry: Jede Widget-Art erklärt zulässige Rasterbreiten (supportedUnits), Höhen aus einem gemeinsamen Vokabular (heights, gespeichert als settings.height), Darstellungsmodi und Verhalten bei wenig Platz. Unzulässige Breiten werden beim Speichern verständlich abgewiesen; Höhe „fill“ streckt den Handlungsaufruf auf die Abschnittszeile. Premium-Widgets nach Brand-UI-Kit v1.6: - hero Version 2: photo_split/editorial_solid, Höhen compact/normal/ large, Label, Überschriftenebene, Akzent, Bildfokus in Prozent, zwei Schaltflächen; nur 3 oder 4 Einheiten. Upgrade aus Version 1. - image_text Version 3: Fläche cream/clear/navy, Höhen compact/normal/ spacious, Label, zwei Schaltflächen, Bildfokus; 1 bis 4 Einheiten. Upgrade aus Version 2 (format entfällt, Fokus in Prozent). - Kit-CSS ersetzt das bisherige Hero- und Bild-und-Text-CSS; der Randlos-Mechanismus der Designiteration 1 entfällt. Editor: Reiter Inhalt/Medien/Darstellung aus der Registry, Auswahl- knöpfe mit Symbolen, Schieberegler für den Bildfokus und eine Live- Vorschau im Dialog mit demselben Renderer in wählbarer Platzbreite. Tests bewusst angepasst: Einstieg braucht jetzt 3 oder 4 Einheiten (vorher Mindestbreite 2), image_text ist Version 3, Klassen der neuen Ansichten; die Hero-/Bild-Tests der Designiteration 1 sind durch CmsPremiumWidgetsTest ersetzt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3cdb36e7a3
commit
0bfb53463a
38 files changed
+1755
-856
No files matched your search
@@ -7,12 +7,11 @@
|
||||
use App\Domain\Cms\PageService;
|
||||
use App\Domain\Cms\Widgets\WidgetRegistry;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Tests\TestCase;
|
||||
|
||||
/**
|
||||
* Designiteration 1: stabiler Website-Rahmen, Markenakzente und neue Widget-Varianten.
|
||||
* Alle Erweiterungen sind additiv: gespeicherte Widgets bleiben gültig und werden wie bisher dargestellt.
|
||||
* Designiteration 1: stabiler Website-Rahmen, Markenakzente und Karten-Varianten.
|
||||
* Einstieg und Bild und Text sind seit Kit v1.6 Premium-Widgets (Tests in CmsPremiumWidgetsTest).
|
||||
*/
|
||||
class CmsDesignIterationTest extends TestCase
|
||||
{
|
||||
@@ -65,91 +64,6 @@ public function test_footer_shows_legal_links_in_the_base_row_and_a_decorative_a
|
||||
$this->assertMatchesRegularExpression('#<svg class="brand-arc site-footer-arc"[^>]*aria-hidden="true"#', $html);
|
||||
}
|
||||
|
||||
public function test_hero_stored_before_this_iteration_renders_unchanged_content(): void
|
||||
{
|
||||
$html = $this->publish('/alt', [[
|
||||
'type' => 'hero', 'v' => 1, 'variant' => 'standard',
|
||||
'data' => ['heading' => 'Stark im Alltag', 'text' => 'Einstieg', 'cta_label' => 'Mehr', 'cta_url' => '/praevention', 'alt' => 'Bild'],
|
||||
'refs' => ['image' => 'cms/alt.jpg'],
|
||||
]]);
|
||||
|
||||
$this->assertStringContainsString('class="hero hero-standard hero-with-image"', $html);
|
||||
$this->assertStringContainsString('<h1>Stark im Alltag</h1>', $html);
|
||||
$this->assertStringContainsString('<p class="lede">Einstieg</p>', $html);
|
||||
$this->assertSame(1, substr_count($html, 'class="button button-brand"'));
|
||||
$this->assertStringNotContainsString('button-secondary', $html);
|
||||
$this->assertStringContainsString('alt="Bild" loading="eager" fetchpriority="high" decoding="async"', $html);
|
||||
$this->assertStringNotContainsString('section-bleed', $html);
|
||||
}
|
||||
|
||||
public function test_brand_stage_bleeds_only_when_it_is_alone_in_its_section_and_has_an_image(): void
|
||||
{
|
||||
$stage = fn (?string $image) => [
|
||||
'type' => 'hero', 'v' => 1, 'variant' => 'stage',
|
||||
'settings' => ['focus' => 'left', 'text_side' => 'left'],
|
||||
'data' => ['heading' => 'Bühne', 'alt' => $image ? 'Motiv' : null],
|
||||
'refs' => ['image' => $image],
|
||||
];
|
||||
|
||||
$html = $this->publish('/buehne', [
|
||||
$this->section('u4', [$stage('cms/buehne.jpg')], ['width' => 'full']),
|
||||
$this->section('u2_2', [$stage('cms/buehne.jpg'), ['type' => 'prose', 'v' => 1, 'data' => ['body' => '<p>Text</p>']]]),
|
||||
$this->section('u4', [$stage(null)]),
|
||||
]);
|
||||
|
||||
$this->assertSame(1, substr_count($html, 'section-bleed'));
|
||||
$this->assertMatchesRegularExpression('#class="page-section [^"]*section-bleed"#', $html);
|
||||
$this->assertStringContainsString('class="hero hero-stage hero-with-image hero-text-left" style="--hero-focus: 0% 50%"', $html);
|
||||
$this->assertStringContainsString('<div class="hero-media">', $html);
|
||||
// Nur das erste Bild der Seite wird sofort geladen.
|
||||
$this->assertSame(1, substr_count($html, 'fetchpriority="high"'));
|
||||
}
|
||||
|
||||
public function test_hero_renders_a_second_action_and_rejects_unsafe_targets(): void
|
||||
{
|
||||
$html = $this->publish('/zwei', [[
|
||||
'type' => 'hero', 'v' => 1, 'variant' => 'editorial',
|
||||
'data' => ['heading' => 'Konzept', 'cta_label' => 'Programme', 'cta_url' => '/programme', 'cta2_label' => 'Mitgliederbereich', 'cta2_url' => '/bereich'],
|
||||
]]);
|
||||
|
||||
$this->assertStringContainsString('class="hero hero-editorial"', $html);
|
||||
$this->assertStringContainsString('<a class="button button-brand" href="/programme">Programme</a>', $html);
|
||||
$this->assertStringContainsString('<a class="button button-secondary" href="/bereich">Mitgliederbereich</a>', $html);
|
||||
|
||||
try {
|
||||
app(WidgetRegistry::class)->normalize([[
|
||||
'type' => 'hero', 'v' => 1, 'variant' => 'stage',
|
||||
'data' => ['heading' => 'X', 'cta2_label' => 'Böse', 'cta2_url' => 'javascript:alert(1)'],
|
||||
]]);
|
||||
$this->fail('Unsicheres zweites Linkziel wurde angenommen.');
|
||||
} catch (ValidationException $exception) {
|
||||
$this->assertArrayHasKey('blocks.0.data.cta2_url', $exception->errors());
|
||||
}
|
||||
}
|
||||
|
||||
public function test_image_settings_are_enumerations_only(): void
|
||||
{
|
||||
$html = $this->publish('/format', [[
|
||||
'type' => 'image_text', 'v' => 2, 'variant' => 'image_left',
|
||||
'settings' => ['format' => 'portrait', 'focus' => 'top_right'],
|
||||
'data' => ['title' => 'Hochformat', 'body' => '<p>Text</p>', 'alt' => 'Motiv'],
|
||||
'refs' => ['image' => 'cms/hoch.jpg'],
|
||||
]]);
|
||||
|
||||
$this->assertStringContainsString('class="image-text image-text-left image-format-portrait" style="--image-focus: 100% 0%"', $html);
|
||||
|
||||
try {
|
||||
app(WidgetRegistry::class)->normalize([[
|
||||
'type' => 'image_text', 'v' => 2, 'variant' => 'image_left',
|
||||
'settings' => ['format' => 'panorama; color: red'],
|
||||
'data' => ['body' => '<p>Text</p>'],
|
||||
]]);
|
||||
$this->fail('Freier Einstellungswert wurde angenommen.');
|
||||
} catch (ValidationException $exception) {
|
||||
$this->assertArrayHasKey('blocks.0.settings.format', $exception->errors());
|
||||
}
|
||||
}
|
||||
|
||||
public function test_featured_cards_lead_with_the_first_card_and_link_the_whole_card(): void
|
||||
{
|
||||
$html = $this->publish('/karten', [[
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
use App\Models\User;
|
||||
use Filament\Actions\Testing\TestAction;
|
||||
use Filament\Facades\Filament;
|
||||
use Filament\Forms\Components\Slider;
|
||||
use Filament\Forms\Components\ToggleButtons;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Str;
|
||||
@@ -49,7 +51,7 @@ public function test_editor_creates_a_page_with_sections_and_registered_widgets_
|
||||
'seo_title' => 'Themenseite',
|
||||
'sections' => [
|
||||
$this->sectionState('u4', [
|
||||
['type' => 'hero', 'data' => ['variant' => 'highlight', 'data' => ['heading' => 'Stark im Alltag', 'text' => 'Einstieg']]],
|
||||
['type' => 'hero', 'data' => ['variant' => 'editorial_solid', 'data' => ['heading' => 'Stark im Alltag', 'text' => 'Einstieg']]],
|
||||
], ['background' => 'dark', 'divider' => 'accent']),
|
||||
$this->sectionState('u1_3', [
|
||||
['type' => 'cards', 'data' => ['variant' => 'compact', 'data' => ['items' => $this->keyed([['title' => 'Prävention', 'url' => '/praevention']])]]],
|
||||
@@ -76,8 +78,8 @@ public function test_editor_creates_a_page_with_sections_and_registered_widgets_
|
||||
$this->assertSame('wide', $sections[1]['style']['width']);
|
||||
$this->assertNull($sections[2]['slots'][1], 'Ein leerer Platz bleibt als Platz erhalten.');
|
||||
$this->assertSame(['hero', 'cards', 'image_text', 'catalog_cards'], array_column($blocks, 'type'), 'Die Rollback-Spalte enthält alle Widgets in Lesereihenfolge.');
|
||||
$this->assertSame(['highlight', 'compact', 'image_right', 'standard'], array_column($blocks, 'variant'));
|
||||
$this->assertSame(2, $blocks[2]['v']);
|
||||
$this->assertSame(['editorial_solid', 'compact', 'image_right', 'standard'], array_column($blocks, 'variant'));
|
||||
$this->assertSame(3, $blocks[2]['v']);
|
||||
$this->assertStringContainsString('<strong>Betonung</strong>', $blocks[2]['data']['body']);
|
||||
$this->assertSame([['title' => 'Prävention', 'text' => null, 'url' => '/praevention', 'image' => null]], $blocks[1]['data']['items']);
|
||||
$this->assertSame([['type' => 'composition', 'id' => $program->composition_id]], $blocks[3]['refs']['items']);
|
||||
@@ -164,7 +166,7 @@ public function test_publishing_with_an_invalid_draft_publishes_nothing(): void
|
||||
$component->set("data.sections.$sectionKey.layout", 'u1_3');
|
||||
$slotKeys = array_keys($component->get("data.sections.$sectionKey.slots"));
|
||||
$component->set("data.sections.$sectionKey.slots.{$slotKeys[0]}.widget", [
|
||||
(string) Str::uuid() => ['type' => 'hero', 'data' => ['variant' => 'standard', 'data' => ['heading' => 'Zu schmal']]],
|
||||
(string) Str::uuid() => ['type' => 'hero', 'data' => ['variant' => 'photo_split', 'data' => ['heading' => 'Zu schmal']]],
|
||||
]);
|
||||
|
||||
$component->callAction('publish')->assertNotified('Nicht gespeichert');
|
||||
@@ -231,7 +233,7 @@ public function test_widget_too_wide_for_its_slot_is_reported_at_the_section():
|
||||
'path' => '/raster-pruefung',
|
||||
'sections' => [
|
||||
$this->sectionState('u1_3', [
|
||||
['type' => 'hero', 'data' => ['variant' => 'standard', 'data' => ['heading' => 'Zu schmal']]],
|
||||
['type' => 'hero', 'data' => ['variant' => 'photo_split', 'data' => ['heading' => 'Zu schmal']]],
|
||||
null,
|
||||
], ['background' => 'accent', 'spacing' => 'large', 'divider' => 'line']),
|
||||
],
|
||||
@@ -275,7 +277,7 @@ public function test_errors_found_only_by_the_registry_are_announced_with_the_se
|
||||
$component = Livewire::actingAs($this->editor(), 'staff')->test(EditPage::class, ['record' => $page->id]);
|
||||
$state = $component->get('data.sections');
|
||||
$state[(string) Str::uuid()] = $this->sectionState('u4', [
|
||||
['type' => 'hero', 'data' => ['variant' => 'standard', 'data' => ['heading' => 'Mit Bild'], 'refs' => ['image' => 'cms/bild.jpg']]],
|
||||
['type' => 'hero', 'data' => ['variant' => 'photo_split', 'data' => ['heading' => 'Mit Bild'], 'refs' => ['image' => 'cms/bild.jpg']]],
|
||||
]);
|
||||
|
||||
$component->set('data.sections', $state)
|
||||
@@ -392,8 +394,8 @@ public function test_block_preview_uses_the_public_widget_view_with_unsaved_stat
|
||||
'refs' => ['image' => null, '_upload' => []],
|
||||
]);
|
||||
|
||||
$this->assertStringContainsString('image-text image-text-right', $html);
|
||||
$this->assertStringContainsString('<h2>Ungespeichert</h2>', $html);
|
||||
$this->assertStringContainsString('lf-bt lf-bt--cream lf-bt--image-right', $html);
|
||||
$this->assertStringContainsString('<h2 class="lf-bt__headline">Ungespeichert</h2>', $html);
|
||||
$this->assertStringContainsString('Vorschautext', $html);
|
||||
|
||||
$cards = WidgetEditor::renderPreview('cards', [
|
||||
@@ -415,7 +417,7 @@ public function test_editor_offers_every_registered_widget_layouts_and_section_d
|
||||
->assertSee('Einstieg (Hero)')
|
||||
->assertSee('Programm- und Modulkarten')
|
||||
->assertSee('Titel und Beschreibung kommen automatisch aus den Fachdaten')
|
||||
->assertSee('Braucht einen Platz ab 2 Rastereinheiten')
|
||||
->assertSee('Für Plätze mit 3 oder 4 Rastereinheiten')
|
||||
->assertSee('Gestaltung des Abschnitts')
|
||||
->assertSee('1 + 2 + 1')
|
||||
->assertSee('Widget einsetzen')
|
||||
@@ -487,42 +489,89 @@ public function test_navigation_rejects_script_addresses(): void
|
||||
$this->get('/praevention')->assertDontSee('javascript:alert(1)', false);
|
||||
}
|
||||
|
||||
public function test_editor_saves_brand_stage_with_settings_and_second_action(): void
|
||||
/**
|
||||
* Premium-Einstieg (Kit v1.6) über den Editor: Variante, Höhe, Überschriftenebene, Akzent, Label, Fokus und zwei
|
||||
* Schaltflächen werden gespeichert und öffentlich mit derselben Ansicht dargestellt.
|
||||
*/
|
||||
public function test_editor_saves_premium_hero_with_layout_settings(): void
|
||||
{
|
||||
Storage::fake('media_public');
|
||||
Storage::fake('cms_incoming');
|
||||
Storage::disk('media_public')->put('cms/buehne.jpg', 'bild');
|
||||
Storage::disk('media_public')->put('cms/park.jpg', 'bild');
|
||||
|
||||
Livewire::actingAs($this->editor(), 'staff')
|
||||
->test(CreatePage::class)
|
||||
->fillForm([
|
||||
'path' => '/markenbuehne',
|
||||
'path' => '/premium-einstieg',
|
||||
'sections' => [
|
||||
$this->sectionState('u4', [
|
||||
$this->sectionState('u3_1', [
|
||||
['type' => 'hero', 'data' => [
|
||||
'variant' => 'stage',
|
||||
'settings' => ['focus' => 'left', 'text_side' => 'left'],
|
||||
'data' => ['heading' => 'Bühne', 'cta_label' => 'Programme', 'cta_url' => '/programme', 'cta2_label' => 'Mitgliederbereich', 'cta2_url' => '/bereich', 'alt' => 'Motiv'],
|
||||
'refs' => ['image' => 'cms/buehne.jpg'],
|
||||
'variant' => 'photo_split',
|
||||
'settings' => ['height' => 'large', 'heading_level' => 'h3', 'accent' => 'rays'],
|
||||
'data' => ['eyebrow' => 'Stark im Alltag', 'heading' => 'Kinder stark im Alltag', 'text' => 'Beschreibung', 'cta_label' => 'Programme', 'cta_url' => '/programme', 'cta2_label' => 'Mitgliederbereich', 'cta2_url' => '/bereich', 'alt' => 'Lara und Felix', 'focus_x' => 72, 'focus_y' => 40],
|
||||
'refs' => ['image' => 'cms/park.jpg'],
|
||||
]],
|
||||
], ['width' => 'full']),
|
||||
['type' => 'call_to_action', 'data' => ['settings' => ['height' => 'fill'], 'data' => ['heading' => 'Daneben', 'label' => 'Los', 'url' => '/bereich']]],
|
||||
], ['width' => 'wide']),
|
||||
],
|
||||
])
|
||||
->call('create')
|
||||
->assertHasNoFormErrors();
|
||||
|
||||
$page = Page::query()->where('path', '/markenbuehne')->firstOrFail();
|
||||
$widget = $page->latestRevision->sections[0]['slots'][0];
|
||||
$this->assertSame('stage', $widget['variant']);
|
||||
$this->assertSame(['focus' => 'left', 'text_side' => 'left'], $widget['settings']);
|
||||
$this->assertSame('/bereich', $widget['data']['cta2_url']);
|
||||
$page = Page::query()->where('path', '/premium-einstieg')->firstOrFail();
|
||||
$hero = $page->latestRevision->sections[0]['slots'][0];
|
||||
$this->assertSame(2, $hero['v']);
|
||||
$this->assertSame('photo_split', $hero['variant']);
|
||||
$this->assertSame(['height' => 'large', 'heading_level' => 'h3', 'accent' => 'rays'], $hero['settings']);
|
||||
$this->assertSame([72, 40], [$hero['data']['focus_x'], $hero['data']['focus_y']]);
|
||||
$this->assertSame('fill', $page->latestRevision->sections[0]['slots'][1]['settings']['height']);
|
||||
|
||||
app(PageService::class)->publish($page, $page->latestRevision);
|
||||
$this->get('/markenbuehne')
|
||||
$this->get('/premium-einstieg')
|
||||
->assertOk()
|
||||
->assertSee('section-bleed', false)
|
||||
->assertSee('hero hero-stage hero-with-image hero-text-left', false)
|
||||
->assertSee('<a class="button button-secondary" href="/bereich">Mitgliederbereich</a>', false);
|
||||
->assertSee('lf-hero lf-hero--photo-split lf-hero--height-large lf-hero--accent-rays', false)
|
||||
->assertSee('--lf-hero-focus-x: 72%; --lf-hero-focus-y: 40%', false)
|
||||
->assertSee('<h1 class="lf-hero__title">Kinder stark im Alltag</h1>', false)
|
||||
->assertSee('<p class="lf-hero__eyebrow">Stark im Alltag</p>', false)
|
||||
->assertSee('<a class="lf-hero__button lf-hero__button--secondary" href="/bereich">Mitgliederbereich</a>', false)
|
||||
->assertSee('widget-call-to-action widget-variant-standard widget-height-fill', false);
|
||||
}
|
||||
|
||||
public function test_widget_dialog_groups_content_media_and_display_with_live_preview(): void
|
||||
{
|
||||
$page = Page::query()->where('path', '/')->firstOrFail();
|
||||
$component = Livewire::actingAs($this->editor(), 'staff')->test(EditPage::class, ['record' => $page->id]);
|
||||
$state = $component->get('data.sections');
|
||||
$state[(string) Str::uuid()] = $this->sectionState('u4', [
|
||||
['type' => 'image_text', 'data' => ['variant' => 'image_left', 'settings' => ['height' => 'spacious', 'surface' => 'navy'], 'data' => ['title' => 'Vorschau im Dialog', 'body' => '<p>Text</p>'], 'refs' => []]],
|
||||
]);
|
||||
$component->set('data.sections', $state);
|
||||
|
||||
$sectionKey = array_key_last($component->get('data.sections'));
|
||||
$slotKey = array_key_first($component->get("data.sections.$sectionKey.slots"));
|
||||
$itemKey = array_key_first($component->get("data.sections.$sectionKey.slots.$slotKey.widget"));
|
||||
|
||||
// Modalinhalte rendert Livewire im Test nicht als HTML; geprüft werden die Felder des geöffneten Dialogs.
|
||||
$component->mountAction(TestAction::make('edit')->schemaComponent("sections.$sectionKey.slots.$slotKey.widget")->arguments(['item' => $itemKey]))
|
||||
->assertFormFieldExists('variant', fn ($field) => $field instanceof ToggleButtons && array_keys($field->getOptions()) === ['image_left', 'image_right'])
|
||||
->assertFormFieldExists('settings.height', fn ($field) => $field instanceof ToggleButtons && array_keys($field->getOptions()) === ['compact', 'normal', 'spacious'])
|
||||
->assertFormFieldExists('settings.surface')
|
||||
->assertFormFieldExists('settings.heading_level')
|
||||
->assertFormFieldExists('data.eyebrow')
|
||||
->assertFormFieldExists('data.cta2_url')
|
||||
->assertFormFieldExists('refs.image')
|
||||
->assertFormFieldExists('data.focus_x', fn ($field) => $field instanceof Slider)
|
||||
->assertFormFieldExists('data.focus_y', fn ($field) => $field instanceof Slider)
|
||||
->assertFormFieldExists('_preview_width', fn ($field) => array_keys($field->getOptions()) === [390, 310, 640, 960, 1300]);
|
||||
|
||||
// Die Live-Vorschau des Dialogs rendert den ungespeicherten Zustand mit der öffentlichen Ansicht.
|
||||
$html = view('filament.cms.widget-live-preview', [
|
||||
'html' => WidgetEditor::renderPreview('image_text', $component->get("data.sections.$sectionKey.slots.$slotKey.widget.$itemKey.data")),
|
||||
'stylesheets' => '',
|
||||
'width' => 1300,
|
||||
])->render();
|
||||
$this->assertStringContainsString('Vorschau bei 1300 px Platzbreite', $html);
|
||||
$this->assertStringContainsString('lf-bt lf-bt--navy lf-bt--image-left lf-bt--height-spacious', htmlspecialchars_decode($html));
|
||||
}
|
||||
|
||||
private function editor(): User
|
||||
|
||||
@@ -0,0 +1,203 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Domain\Cms\Page;
|
||||
use App\Domain\Cms\PageService;
|
||||
use App\Domain\Cms\Sections\SectionLayouts;
|
||||
use App\Domain\Cms\Widgets\WidgetRegistry;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Tests\TestCase;
|
||||
|
||||
/**
|
||||
* Premium-Widgets nach Brand-UI-Kit v1.6 und gemeinsamer Layoutvertrag (ADR-38).
|
||||
* Gespeicherte Daten früherer Versionen bleiben lesbar und speicherbar.
|
||||
*/
|
||||
class CmsPremiumWidgetsTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
/**
|
||||
* @param list<array<string, mixed>> $content
|
||||
*/
|
||||
private function publish(string $path, array $content): string
|
||||
{
|
||||
$page = Page::query()->create(['path' => $path]);
|
||||
$service = app(PageService::class);
|
||||
$service->publish($page, $service->saveRevision($page, $content, null, null, null));
|
||||
|
||||
return $this->get($path)->assertOk()->getContent();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list<array<string, mixed>|null> $slots
|
||||
* @param array<string, string> $style
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
private function section(string $layout, array $slots, array $style = []): array
|
||||
{
|
||||
return ['layout' => $layout, 'style' => $style, 'slots' => $slots];
|
||||
}
|
||||
|
||||
public function test_hero_from_design_iteration_one_is_upgraded_and_stays_savable(): void
|
||||
{
|
||||
$registry = app(WidgetRegistry::class);
|
||||
|
||||
$standard = $registry->upcast(['type' => 'hero', 'v' => 1, 'variant' => 'stage', 'settings' => ['focus' => 'top_right', 'text_side' => 'left'], 'data' => ['heading' => 'Alt', 'cta2_label' => 'Zwei', 'cta2_url' => '/b']]);
|
||||
$this->assertSame(2, $standard['v']);
|
||||
$this->assertSame('photo_split', $standard['variant']);
|
||||
$this->assertSame([], $standard['settings'], 'Nicht mehr vorhandene Einstellungen werden entfernt.');
|
||||
$this->assertSame([100, 0], [$standard['data']['focus_x'], $standard['data']['focus_y']]);
|
||||
$this->assertSame('/b', $standard['data']['cta2_url']);
|
||||
|
||||
$highlight = $registry->upcast(['type' => 'hero', 'v' => 1, 'variant' => 'highlight', 'data' => ['heading' => 'Alt']]);
|
||||
$this->assertSame('editorial_solid', $highlight['variant']);
|
||||
$this->assertSame('editorial_solid', $registry->upcast(['type' => 'hero', 'v' => 1, 'variant' => 'editorial', 'data' => ['heading' => 'Alt']])['variant']);
|
||||
|
||||
// Szenario „bestehende Seite unverändert speichern“: gespeicherte v1-Hülle geht ohne Fehler durch die Prüfung.
|
||||
$saved = $registry->normalize([['type' => 'hero', 'v' => 1, 'variant' => 'stage', 'settings' => ['focus' => 'left', 'text_side' => 'right'], 'data' => ['heading' => 'Alt', 'alt' => 'Bild'], 'refs' => ['image' => 'cms/alt.jpg']]]);
|
||||
$this->assertSame(['photo_split', 2, [0, 50]], [$saved[0]['variant'], $saved[0]['v'], [$saved[0]['data']['focus_x'], $saved[0]['data']['focus_y']]]);
|
||||
}
|
||||
|
||||
public function test_image_text_from_design_iteration_one_is_upgraded_and_stays_savable(): void
|
||||
{
|
||||
$saved = app(WidgetRegistry::class)->normalize([[
|
||||
'type' => 'image_text', 'v' => 2, 'variant' => 'image_left',
|
||||
'settings' => ['format' => 'portrait', 'focus' => 'bottom'],
|
||||
'data' => ['title' => 'Alt', 'body' => '<p>Text</p>', 'alt' => 'Bild'], 'refs' => ['image' => 'cms/alt.jpg'],
|
||||
]])[0];
|
||||
|
||||
$this->assertSame(3, $saved['v']);
|
||||
$this->assertSame([], $saved['settings']);
|
||||
$this->assertSame([50, 100], [$saved['data']['focus_x'], $saved['data']['focus_y']]);
|
||||
$this->assertSame('image_left', $saved['variant']);
|
||||
}
|
||||
|
||||
public function test_premium_hero_renders_variants_heights_and_accents(): void
|
||||
{
|
||||
$html = $this->publish('/einstiege', [
|
||||
$this->section('u4', [[
|
||||
'type' => 'hero', 'v' => 2, 'variant' => 'photo_split', 'settings' => ['height' => 'compact', 'accent' => 'none'],
|
||||
'data' => ['eyebrow' => '<script>alert(1)</script>', 'heading' => 'Erster Einstieg', 'alt' => 'Lara und Felix', 'focus_x' => 30, 'focus_y' => 70],
|
||||
'refs' => ['image' => 'cms/park.jpg'],
|
||||
]]),
|
||||
$this->section('u3_1', [[
|
||||
'type' => 'hero', 'v' => 2, 'variant' => 'editorial_solid', 'settings' => ['height' => 'large', 'heading_level' => 'h3', 'accent' => 'rays'],
|
||||
'data' => ['heading' => 'Zweiter Einstieg', 'cta_label' => 'Konzept', 'cta_url' => '/konzept'],
|
||||
], null]),
|
||||
]);
|
||||
|
||||
$this->assertStringContainsString('class="lf-hero lf-hero--photo-split lf-hero--height-compact lf-hero--accent-none"', $html);
|
||||
$this->assertStringContainsString('style="--lf-hero-focus-x: 30%; --lf-hero-focus-y: 70%"', $html);
|
||||
$this->assertStringContainsString('alt="Lara und Felix" loading="eager" fetchpriority="high" decoding="async"', $html);
|
||||
$this->assertStringContainsString('<script>alert(1)</script>', $html);
|
||||
$this->assertStringNotContainsString('<script>alert(1)</script>', $html);
|
||||
$this->assertSame(1, substr_count($html, '<h1'), 'Genau eine Hauptüberschrift je Seite.');
|
||||
$this->assertStringContainsString('<h1 class="lf-hero__title">Erster Einstieg</h1>', $html);
|
||||
$this->assertStringContainsString('<h3 class="lf-hero__title">Zweiter Einstieg</h3>', $html);
|
||||
$this->assertStringContainsString('lf-hero--editorial-solid lf-hero--height-large lf-hero--accent-rays', $html);
|
||||
$this->assertStringContainsString('brand-rays lf-hero__rays', $html);
|
||||
$this->assertSame(1, substr_count($html, 'lf-hero__title-accent'), 'Ohne Akzent keine Unterstreichung.');
|
||||
$this->assertStringContainsString('widget-hero widget-variant-photo-split widget-height-compact', $html);
|
||||
}
|
||||
|
||||
public function test_hero_rejects_unsafe_links_and_out_of_range_focus(): void
|
||||
{
|
||||
$cases = [
|
||||
'blocks.0.data.cta2_url' => ['heading' => 'X', 'cta2_label' => 'Böse', 'cta2_url' => 'javascript:alert(1)'],
|
||||
'blocks.0.data.focus_x' => ['heading' => 'X', 'focus_x' => 150],
|
||||
];
|
||||
|
||||
foreach ($cases as $key => $data) {
|
||||
try {
|
||||
app(WidgetRegistry::class)->normalize([['type' => 'hero', 'v' => 2, 'data' => $data]]);
|
||||
$this->fail("$key wurde angenommen.");
|
||||
} catch (ValidationException $exception) {
|
||||
$this->assertArrayHasKey($key, $exception->errors());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function test_premium_image_text_renders_surface_height_side_and_sanitized_body(): void
|
||||
{
|
||||
$html = $this->publish('/bild-text', [
|
||||
['type' => 'heading', 'v' => 1, 'data' => ['heading' => 'Seite']],
|
||||
$this->section('u4', [[
|
||||
'type' => 'image_text', 'v' => 3, 'variant' => 'image_left',
|
||||
'settings' => ['surface' => 'navy', 'height' => 'spacious', 'heading_level' => 'h3'],
|
||||
'data' => ['eyebrow' => 'Unser Ansatz', 'title' => 'Geschichten', 'body' => '<p>Text</p><script>alert(1)</script>', 'alt' => 'Park', 'cta_label' => 'Mehr', 'cta_url' => '/konzept', 'cta2_label' => 'Themen', 'cta2_url' => 'https://example.org/themen', 'focus_x' => 10, 'focus_y' => 90],
|
||||
'refs' => ['image' => 'cms/park.jpg'],
|
||||
]]),
|
||||
$this->section('u4', [['type' => 'image_text', 'v' => 3, 'data' => ['body' => '<p>Ohne Bild</p>']]]),
|
||||
]);
|
||||
|
||||
$this->assertStringContainsString('class="lf-bt lf-bt--navy lf-bt--image-left lf-bt--height-spacious"', $html);
|
||||
$this->assertStringContainsString('style="--bt-focus-x: 10%; --bt-focus-y: 90%"', $html);
|
||||
$this->assertStringContainsString('<h3 class="lf-bt__headline">Geschichten</h3>', $html);
|
||||
$this->assertStringContainsString('<p class="lf-bt__eyebrow">Unser Ansatz</p>', $html);
|
||||
$this->assertStringNotContainsString('<script>alert(1)</script>', $html);
|
||||
$this->assertStringContainsString('<a class="lf-bt__button" href="/konzept">Mehr <span aria-hidden="true">→</span></a>', $html);
|
||||
$this->assertStringContainsString('<a class="lf-bt__button lf-bt__button--secondary" href="https://example.org/themen">Themen</a>', $html);
|
||||
$this->assertStringContainsString('lf-bt lf-bt--cream lf-bt--image-left lf-bt--height-normal lf-bt--without-image', $html);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gemeinsamer Layoutvertrag für alle Bestandswidgets: In jeder zulässigen Platzbreite wird gerendert; nicht
|
||||
* zulässige Breiten werden beim Speichern mit verständlicher Meldung abgewiesen.
|
||||
*/
|
||||
public function test_every_widget_renders_in_each_supported_width_and_rejects_the_others(): void
|
||||
{
|
||||
$samples = [
|
||||
'heading' => ['heading' => 'Überschrift mit einem sehr langen Wort Gewaltpräventionsfortbildungsmaßnahme'],
|
||||
'prose' => ['body' => 'Fließtext mit einer langen Adresse https://example.org/'.str_repeat('a', 80)],
|
||||
'cards' => ['items' => [['title' => 'Karte mit langem Titel für schmale Plätze', 'text' => 'Beschreibung', 'url' => '/a']]],
|
||||
'call_to_action' => ['heading' => 'Aufruf', 'text' => 'Text', 'label' => 'Eine ausgesprochen lange Schaltflächenbeschriftung zum Prüfen', 'url' => '/a'],
|
||||
'faq' => ['items' => [['question' => 'Frage?', 'answer' => 'Antwort.']]],
|
||||
'hero' => ['heading' => 'Einstieg mit einer langen Überschrift, die umbrechen muss'],
|
||||
'image_text' => ['title' => 'Bild und Text', 'body' => '<p>Text</p>'],
|
||||
];
|
||||
$registry = app(WidgetRegistry::class);
|
||||
$layouts = ['u4' => [4], 'u3_1' => [3, 1], 'u2_2' => [2, 2], 'u1_1_1_1' => [1, 1, 1, 1]];
|
||||
$path = 0;
|
||||
|
||||
foreach ($samples as $type => $data) {
|
||||
$widgetType = $registry->get($type);
|
||||
$widget = ['type' => $type, 'v' => $widgetType->version(), 'data' => $data];
|
||||
|
||||
foreach ($layouts as $layout => $units) {
|
||||
$slots = array_fill(0, count($units), null);
|
||||
$slots[0] = $widget;
|
||||
|
||||
if ($widgetType->supportsUnits($units[0])) {
|
||||
$html = $this->publish('/raster-'.(++$path), [$this->section($layout, $slots)]);
|
||||
$this->assertStringContainsString('widget-'.str_replace('_', '-', $type), $html, "$type in $layout");
|
||||
$this->assertStringContainsString('data-units="'.$units[0].'"', $html, "$type in $layout");
|
||||
} else {
|
||||
try {
|
||||
app(PageService::class)->saveRevision(Page::query()->create(['path' => '/abgewiesen-'.(++$path)]), [$this->section($layout, $slots)], null, null, null);
|
||||
$this->fail("$type in $layout ({$units[0]} Einheiten) wurde angenommen.");
|
||||
} catch (ValidationException $exception) {
|
||||
$this->assertStringContainsString($widgetType->unitsLabel().' Rastereinheiten', $exception->errors()['sections.0.slots.0.units'][0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->assertSame(['u4', 'u2_2', 'u1_3', 'u3_1', 'u1_2_1', 'u1_1_1_1'], array_keys(SectionLayouts::UNITS));
|
||||
}
|
||||
|
||||
public function test_fill_height_marks_the_widget_and_defaults_to_content_height(): void
|
||||
{
|
||||
$html = $this->publish('/fuellen', [
|
||||
$this->section('u2_2', [
|
||||
['type' => 'call_to_action', 'v' => 1, 'settings' => ['height' => 'fill'], 'data' => ['heading' => 'Gleich hoch', 'label' => 'Los', 'url' => '/a']],
|
||||
['type' => 'call_to_action', 'v' => 1, 'data' => ['heading' => 'Nach Inhalt', 'label' => 'Los', 'url' => '/b']],
|
||||
]),
|
||||
]);
|
||||
|
||||
$this->assertStringContainsString('widget-call-to-action widget-variant-standard widget-height-fill', $html);
|
||||
$this->assertStringContainsString('widget-call-to-action widget-variant-standard widget-height-auto', $html);
|
||||
$this->assertStringNotContainsString('widget-prose widget-variant-standard widget-height', $html);
|
||||
}
|
||||
}
|
||||
@@ -140,7 +140,8 @@ public function test_new_revisions_are_stored_as_widget_envelopes(): void
|
||||
$this->assertSame(['id', 'type', 'v', 'variant', 'settings', 'data', 'refs'], array_keys($revision->blocks[0]));
|
||||
$this->assertSame('prose', $revision->blocks[0]['type']);
|
||||
$this->assertSame(['body' => 'Altes Eingabeformat'], $revision->blocks[0]['data']);
|
||||
$this->assertSame('highlight', $revision->blocks[1]['variant']);
|
||||
// Gespeichert wird immer die aktuelle Version: hero v1 „highlight“ wird zu v2 „editorial_solid“.
|
||||
$this->assertSame([2, 'editorial_solid'], [$revision->blocks[1]['v'], $revision->blocks[1]['variant']]);
|
||||
$this->assertNull($page->fresh()->published_revision_id, 'Speichern veröffentlicht nicht.');
|
||||
}
|
||||
|
||||
@@ -156,11 +157,11 @@ public function test_reference_widgets_render_their_variants(): void
|
||||
|
||||
$this->get('/varianten')
|
||||
->assertOk()
|
||||
->assertSee('hero hero-highlight', false)
|
||||
->assertSee('<h1>Stark im Alltag</h1>', false)
|
||||
->assertSee('class="button button-brand" href="/praevention"', false)
|
||||
->assertSee('image-text image-text-right', false)
|
||||
->assertSee('<h2>Bild rechts</h2>', false)
|
||||
->assertSee('lf-hero lf-hero--editorial-solid lf-hero--height-normal', false)
|
||||
->assertSee('<h1 class="lf-hero__title">Stark im Alltag</h1>', false)
|
||||
->assertSee('class="lf-hero__button lf-hero__button--primary" href="/praevention"', false)
|
||||
->assertSee('lf-bt lf-bt--cream lf-bt--image-right lf-bt--height-normal', false)
|
||||
->assertSee('<h2 class="lf-bt__headline">Bild rechts</h2>', false)
|
||||
->assertSee('<em>betont</em>', false)
|
||||
->assertSee(route('media.public', ['path' => 'cms/beispiel.jpg']), false)
|
||||
->assertSee('cards cards-compact', false);
|
||||
|
||||
@@ -108,20 +108,31 @@ public function test_surplus_empty_slots_are_compacted_without_losing_widgets():
|
||||
$this->assertSame(['A', 'C'], array_map(fn ($slot) => $slot['data']['heading'], $stored[0]['slots']));
|
||||
}
|
||||
|
||||
public function test_widget_minimum_width_is_enforced_per_slot(): void
|
||||
/**
|
||||
* Layoutvertrag (ADR-38): Ein Platz muss eine der unterstützten Breiten haben. Der Premium-Einstieg ist seit
|
||||
* Kit v1.6 nur für 3 oder 4 Einheiten vorgesehen (vorher Mindestbreite 2).
|
||||
*/
|
||||
public function test_widget_supported_widths_are_enforced_per_slot(): void
|
||||
{
|
||||
$hero = ['type' => 'hero', 'v' => 1, 'data' => ['heading' => 'Einstieg']];
|
||||
$hero = ['type' => 'hero', 'v' => 2, 'data' => ['heading' => 'Einstieg']];
|
||||
|
||||
try {
|
||||
$this->sections()->normalize([$this->section('u1_3', [$hero, null])]);
|
||||
$this->fail('Einstieg im schmalen Platz wurde angenommen.');
|
||||
} catch (ValidationException $exception) {
|
||||
$this->assertArrayHasKey('sections.0.slots.0.units', $exception->errors());
|
||||
foreach ([['u1_3', [$hero, null]], ['u2_2', [$hero, null]]] as [$layout, $slots]) {
|
||||
try {
|
||||
$this->sections()->normalize([$this->section($layout, $slots)]);
|
||||
$this->fail("Einstieg im zu schmalen Platz ($layout) wurde angenommen.");
|
||||
} catch (ValidationException $exception) {
|
||||
$this->assertArrayHasKey('sections.0.slots.0.units', $exception->errors());
|
||||
$this->assertStringContainsString('3 oder 4 Rastereinheiten', $exception->errors()['sections.0.slots.0.units'][0]);
|
||||
}
|
||||
}
|
||||
|
||||
$stored = $this->sections()->normalize([$this->section('u1_3', [null, $hero])]);
|
||||
$this->assertSame('hero', $stored[0]['slots'][1]['type']);
|
||||
$this->assertSame(2, app(WidgetRegistry::class)->get('hero')->minUnits());
|
||||
$this->assertSame([3, 4], app(WidgetRegistry::class)->get('hero')->supportedUnits());
|
||||
|
||||
$imageText = ['type' => 'image_text', 'v' => 3, 'data' => ['body' => '<p>Schmal</p>']];
|
||||
$stored = $this->sections()->normalize([$this->section('u1_1_1_1', [$imageText, null, null, null])]);
|
||||
$this->assertSame('image_text', $stored[0]['slots'][0]['type'], 'Bild und Text ist für 1 bis 4 Einheiten freigegeben.');
|
||||
}
|
||||
|
||||
public function test_free_style_values_and_unknown_layouts_are_rejected(): void
|
||||
|
||||
@@ -66,18 +66,56 @@ public function test_registration_rejects_keys_that_are_not_stable_identifiers()
|
||||
new WidgetRegistry([$this->customWidget('Teaser Box')]);
|
||||
}
|
||||
|
||||
public function test_every_widget_declares_a_minimum_width_within_four_units(): void
|
||||
/** Gemeinsamer Layoutvertrag (ADR-38) für jede registrierte Art. */
|
||||
public function test_every_widget_declares_the_shared_layout_contract(): void
|
||||
{
|
||||
foreach ($this->registry()->all() as $key => $type) {
|
||||
$this->assertGreaterThanOrEqual(1, $type->minUnits(), $key);
|
||||
$this->assertLessThanOrEqual($type->preferredUnits(), $type->minUnits(), $key);
|
||||
$this->assertLessThanOrEqual(4, $type->preferredUnits(), $key);
|
||||
$units = $type->supportedUnits();
|
||||
$this->assertNotEmpty($units, $key);
|
||||
$this->assertSame([], array_diff($units, [1, 2, 3, 4]), $key);
|
||||
$this->assertSame(min($units), $type->minUnits(), $key);
|
||||
$this->assertTrue($type->supportsUnits($type->preferredUnits()), $key);
|
||||
$this->assertNotEmpty($type->stages(), $key);
|
||||
$this->assertNotSame('', $type->narrowBehavior(), $key);
|
||||
$this->assertSame([], array_diff(array_keys($type->heights()), array_keys(WidgetType::HEIGHTS)), $key);
|
||||
|
||||
if ($type->heights() !== []) {
|
||||
$this->assertArrayHasKey($type->defaultHeight(), $type->heights(), $key);
|
||||
$this->assertSame($type->heights(), $type->settingOptions()['height'], $key);
|
||||
}
|
||||
}
|
||||
|
||||
$this->assertSame(2, $this->registry()->get('hero')->minUnits());
|
||||
$this->assertSame(2, $this->registry()->get('image_text')->minUnits());
|
||||
$this->assertSame(1, $this->registry()->get('catalog_cards')->minUnits());
|
||||
$this->assertSame([3, 4], $this->registry()->get('hero')->supportedUnits());
|
||||
$this->assertSame(['compact', 'normal', 'large'], array_keys($this->registry()->get('hero')->heights()));
|
||||
$this->assertSame([1, 2, 3, 4], $this->registry()->get('image_text')->supportedUnits());
|
||||
$this->assertSame(['compact', 'normal', 'spacious'], array_keys($this->registry()->get('image_text')->heights()));
|
||||
$this->assertSame(['auto', 'fill'], array_keys($this->registry()->get('call_to_action')->heights()));
|
||||
$this->assertSame([2, 3, 4], $this->registry()->get('faq')->supportedUnits());
|
||||
$this->assertSame('3 oder 4', $this->registry()->get('hero')->unitsLabel());
|
||||
$this->assertSame('1 bis 4', $this->registry()->get('cards')->unitsLabel());
|
||||
}
|
||||
|
||||
public function test_height_is_an_enumerated_setting_with_a_default(): void
|
||||
{
|
||||
$widget = $this->registry()->normalize([
|
||||
['type' => 'hero', 'v' => 2, 'settings' => ['height' => 'large'], 'data' => ['heading' => 'X']],
|
||||
])[0];
|
||||
$this->assertSame('large', $widget['settings']['height']);
|
||||
$this->assertSame('normal', $this->registry()->get('hero')->height(['settings' => []]));
|
||||
|
||||
try {
|
||||
$this->registry()->normalize([['type' => 'hero', 'v' => 2, 'settings' => ['height' => '900px'], 'data' => ['heading' => 'X']]]);
|
||||
$this->fail('Freie Höhe wurde angenommen.');
|
||||
} catch (ValidationException $exception) {
|
||||
$this->assertArrayHasKey('blocks.0.settings.height', $exception->errors());
|
||||
}
|
||||
|
||||
try {
|
||||
$this->registry()->normalize([['type' => 'prose', 'v' => 1, 'settings' => ['height' => 'compact'], 'data' => ['body' => 'Text']]]);
|
||||
$this->fail('Höhe für eine Art ohne Höhenwahl wurde angenommen.');
|
||||
} catch (ValidationException $exception) {
|
||||
$this->assertArrayHasKey('blocks.0.settings.height', $exception->errors());
|
||||
}
|
||||
}
|
||||
|
||||
public function test_a_new_widget_type_works_through_the_contract_alone(): void
|
||||
@@ -112,7 +150,7 @@ public function test_unknown_type_and_unregistered_variant_are_rejected(): void
|
||||
}
|
||||
|
||||
try {
|
||||
$this->registry()->normalize([['type' => 'hero', 'v' => 1, 'variant' => 'gross-und-bunt', 'data' => ['heading' => 'X']]]);
|
||||
$this->registry()->normalize([['type' => 'hero', 'v' => 2, 'variant' => 'gross-und-bunt', 'data' => ['heading' => 'X']]]);
|
||||
$this->fail('Unbekannte Variante wurde angenommen.');
|
||||
} catch (ValidationException $exception) {
|
||||
$this->assertArrayHasKey('blocks.0.variant', $exception->errors());
|
||||
@@ -204,13 +242,13 @@ public function test_legacy_blocks_are_read_as_version_one_envelopes(): void
|
||||
], $widget);
|
||||
}
|
||||
|
||||
public function test_legacy_image_text_is_upgraded_to_version_two_on_read(): void
|
||||
public function test_legacy_image_text_is_upgraded_to_the_current_version_on_read(): void
|
||||
{
|
||||
$legacy = ['type' => 'image_text', 'image' => 'cms/alt.jpg', 'alt' => 'Kinder im Kreis', 'body' => "Erster Absatz & mehr.\n\nZweiter <Absatz>."];
|
||||
|
||||
$widget = $this->registry()->upcast($legacy);
|
||||
|
||||
$this->assertSame(2, $widget['v']);
|
||||
$this->assertSame(3, $widget['v']);
|
||||
$this->assertSame('image_left', $widget['variant']);
|
||||
$this->assertSame(['image' => 'cms/alt.jpg'], $widget['refs']);
|
||||
$this->assertSame('Kinder im Kreis', $widget['data']['alt']);
|
||||
@@ -225,7 +263,7 @@ public function test_stored_version_one_envelope_is_upgraded_as_well(): void
|
||||
'data' => ['image' => null, 'alt' => 'x', 'body' => 'Nur Text'], 'refs' => [],
|
||||
]);
|
||||
|
||||
$this->assertSame(2, $widget['v']);
|
||||
$this->assertSame(3, $widget['v']);
|
||||
$this->assertSame('abc', $widget['id']);
|
||||
$this->assertSame('image_left', $widget['variant']);
|
||||
$this->assertSame('<p>Nur Text</p>', $widget['data']['body']);
|
||||
|
||||
Reference in new issue
Block a user