Display CMS Optimierungen 29-05-2026

- Mediathek: Video-Vorschaubilder statt Icons (FFmpeg-Thumbnails + Backfill-Command), Kategorie "Sonstiges"
- B2in Media-Picker zeigt alle Medientypen, Typ wird automatisch erkannt; Thumbnail-Preview vor allen Medien-URL-Feldern
- B2in Marke/Footer: Footer ein/aus, Logo+Claim frei positionierbar (Ecken) mit Constraints, separate Anzeige-Schalter
- Angebote-Modul dynamisch: kein Slide-Typ mehr, einheitliches Detail-Layout mit ein-/ausblendbaren Bloecken, Logo/Brand pro Slide, Streichpreis-Option
- Player: leere Module stoppen Endlosschleife, dynamische Layout-Anpassung bei verstecktem Footer/Header
- Fix: Script-Ladereihenfolge (Livewire vor Flux), entfernte stale public/flux/flux.js, Modal-Crash beim Aktualisieren behoben

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Kevin Adametz 2026-05-29 15:57:33 +00:00
parent 9262132325
commit 6c6d683b9a
42 changed files with 2267 additions and 13905 deletions

View file

@ -197,7 +197,7 @@ test('can create a draft playlist from live modules', function () {
test('can discard a draft playlist', function () {
$user = User::factory()->create();
$version = DisplayVersion::factory()->create();
$display = Display::factory()->create();
$display = Display::factory()->create(['preview_token' => 'token-discard-123456789012345678901234']);
createDisplayListPlaylist($display, DisplayPlaylist::STATUS_DRAFT, [$version->id]);
Livewire::actingAs($user)
@ -205,6 +205,57 @@ test('can discard a draft playlist', function () {
->call('discardDraft', $display->id);
expect($display->fresh()->draftPlaylist)->toBeNull();
expect($display->fresh()->preview_token)->toBeNull();
});
test('publishing a draft clears the preview token', function () {
$user = User::factory()->create();
$liveVersion = DisplayVersion::factory()->create();
$draftVersion = DisplayVersion::factory()->create();
$display = Display::factory()->create(['preview_token' => 'token-publish-12345678901234567890123456']);
createDisplayListPlaylist($display, DisplayPlaylist::STATUS_PUBLISHED, [$liveVersion->id]);
createDisplayListPlaylist($display, DisplayPlaylist::STATUS_DRAFT, [$draftVersion->id]);
Livewire::actingAs($user)
->test(DisplayList::class)
->call('publishDraft', $display->id);
expect($display->fresh()->preview_token)->toBeNull();
});
test('can rotate the preview token of a draft', function () {
$user = User::factory()->create();
$version = DisplayVersion::factory()->create();
$display = Display::factory()->create(['preview_token' => 'token-old-1234567890123456789012345678901']);
createDisplayListPlaylist($display, DisplayPlaylist::STATUS_DRAFT, [$version->id]);
Livewire::actingAs($user)
->test(DisplayList::class)
->call('rotatePreviewToken', $display->id);
$newToken = $display->fresh()->preview_token;
expect($newToken)->not->toBeNull()
->and($newToken)->not->toBe('token-old-1234567890123456789012345678901');
});
test('can add multiple modules to a playlist at once', function () {
$user = User::factory()->create();
$version1 = DisplayVersion::factory()->create();
$version2 = DisplayVersion::factory()->create();
$version3 = DisplayVersion::factory()->create();
$display = Display::factory()->create();
createDisplayListPlaylist($display, DisplayPlaylist::STATUS_PUBLISHED, []);
Livewire::actingAs($user)
->test(DisplayList::class)
->call('openModal', $display->id, DisplayPlaylist::STATUS_PUBLISHED)
->set('versionsToAdd', [$version1->id, $version3->id])
->call('addSelectedVersions')
->assertSet('selectedVersionIds', [$version1->id, $version3->id])
->assertSet('versionsToAdd', []);
expect(true)->toBeTrue();
});
test('can publish a draft playlist over the live playlist', function () {
@ -313,8 +364,8 @@ test('module select only shows modules that can still be added', function () {
Livewire::actingAs($user)
->test(DisplayList::class)
->call('openModal', $display->id, DisplayPlaylist::STATUS_PUBLISHED)
->assertDontSeeHtml('<option value="'.$selectedVersion->id.'">Schon gewählt')
->assertSeeHtml('<option value="'.$availableVersion->id.'">Noch verfügbar');
->assertDontSee('Schon gewählt (')
->assertSee('Noch verfügbar (');
});
test('module select is replaced by a hint when all modules are already selected', function () {