Arbeitsplan 14.09.2026, Punkte 1.1 bis 1.4 (Nachträge 6 bis 10 im Entwicklungsplan): - Farbwelt Interior (Tanne, Creme, Sand, Ocker, Clay) als Standard, Immobilien-Welt behält das bisherige Blau über body.world-immobilien; Logo je Welt, Favicons neu, Welten-Wechsler in Kopf- und Fußzeile. - Saubere Trennung der Welten: eigene Navigation, Ankündigungsleiste, Magazinliste, Über-uns-Seite, FAQ, Kontaktseite und Abschluss-CTA für Immobilien; Beiträge tragen eine Welt (Migration + Admin-Feld). Abschluss-CTA Ton in Ton statt Grün-zu-Ocker. - Kontakt: Betreffe in Gruppen Interior / Immobilien / B2in, Marken darin. Terminanfrage-Buttons öffnen das Widget mit vorgewähltem Anliegen; Select-Felder einheitlich gestaltet. - Tischlerei als vierte Kernmarke (Platzhalter), Kachelraster 2×2. - Herkunfts-Sektion „Aus der Region gefertigt“ mit schematischer Standortkarte und Ablauf CABINET (Beratung Bielefeld, Fertigung Köln, Aufbau mit Tischlerei). Deployment: migrate, WorldSplitCmsSeeder, CmsBrandSeeder, OriginSectionCmsSeeder (Abschnitt 8 im Entwicklungsplan). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
90 lines
3.2 KiB
PHP
90 lines
3.2 KiB
PHP
<?php
|
||
|
||
declare(strict_types=1);
|
||
|
||
use App\Livewire\Web\Components\Ui\AppointmentWidget;
|
||
use App\Models\CmsBrand;
|
||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||
use Livewire\Livewire;
|
||
|
||
uses(RefreshDatabase::class);
|
||
|
||
// ========================================
|
||
// Tischlerei als vierte Kernmarke (Arbeitsplan 14.09., Punkt 1.2 – Platzhalter)
|
||
// ========================================
|
||
|
||
beforeEach(function () {
|
||
$this->seed(\Database\Seeders\CmsBrandSeeder::class);
|
||
});
|
||
|
||
it('creates the joinery as the fourth brand without touching the existing ones', function () {
|
||
expect(CmsBrand::count())->toBe(4);
|
||
|
||
$brand = CmsBrand::where('slug', 'tischlerei')->firstOrFail();
|
||
|
||
expect($brand->order)->toBe(4)
|
||
->and($brand->is_published)->toBeTrue()
|
||
->and($brand->logo)->toBe('')
|
||
->and($brand->sections)->toHaveCount(3);
|
||
|
||
// Erneutes Seeden legt nichts doppelt an.
|
||
$this->seed(\Database\Seeders\CmsBrandSeeder::class);
|
||
expect(CmsBrand::count())->toBe(4);
|
||
});
|
||
|
||
it('shows four tiles on the homepage in a two by two grid', function () {
|
||
$html = $this->get('/')->assertSuccessful()->getContent();
|
||
|
||
expect($html)->toContain('Tischlerei')
|
||
->toContain('/marken/tischlerei')
|
||
->toMatch('/<div [^>]*class="grid sm:grid-cols-2 gap-8[^"]*"/')
|
||
->not->toContain('xl:grid-cols-4');
|
||
});
|
||
|
||
it('lists the joinery on the brands page after the three established brands', function () {
|
||
$html = $this->get('/marken')->assertSuccessful()->getContent();
|
||
|
||
preg_match_all('#wire:key="brand-([a-z-]+)"#', $html, $matches);
|
||
|
||
expect($matches[1])->toBe(['cabinet', 'rotpunkt', 'februe', 'tischlerei']);
|
||
expect($html)->toContain('Sonderlösungen nach Aufmaß');
|
||
});
|
||
|
||
it('serves the joinery detail page with the placeholder texts and the wordmark', function () {
|
||
$this->get('/marken/tischlerei')
|
||
->assertSuccessful()
|
||
->assertSee('<h1 class="text-section-title">Tischlerei</h1>', false)
|
||
->assertSee('Maßarbeit, die den Raum vollendet.', false)
|
||
->assertSee('Wo Serienmöbel aufhören.', false)
|
||
->assertSee('Ergänzung, nicht Konkurrenz.', false)
|
||
->assertSee('Ihr Raum. Bis ins Detail gefertigt.', false)
|
||
->assertSee('data-appointment-topic="tischlerei"', false);
|
||
});
|
||
|
||
it('offers the joinery among the other brands of every detail page, three across', function () {
|
||
$html = $this->get('/marken/cabinet')->assertSuccessful()->getContent();
|
||
|
||
expect($html)->toContain('other-tischlerei')
|
||
->toContain('sm:grid-cols-2 lg:grid-cols-3');
|
||
});
|
||
|
||
it('labels the widget on the joinery page and offers the joinery as a topic everywhere', function () {
|
||
$this->get('/marken/tischlerei')
|
||
->assertSuccessful()
|
||
->assertSee('Persönliche Beratung zur Maßarbeit vereinbaren', false);
|
||
|
||
expect(Livewire::test(AppointmentWidget::class)->get('topics'))->toHaveKey('tischlerei');
|
||
|
||
$this->get('/contact')
|
||
->assertSuccessful()
|
||
->assertSee('value="tischlerei"', false);
|
||
});
|
||
|
||
it('keeps the joinery in the lang fallback while no brands are maintained', function () {
|
||
CmsBrand::query()->delete();
|
||
|
||
$this->get('/')
|
||
->assertSuccessful()
|
||
->assertSee('Tischlerei')
|
||
->assertSee('Maßarbeit, die den Raum vollendet.', false);
|
||
});
|