b2in/tests/Feature/ProofreadingCorrectionsTest.php
Kevin Adametz fcb10be120 Interior-Feinschliff: Hero-Slideshow, Lektorat, Rechtstexte, Aufräumen und Korrekturen 08.10.
Startseite und Heroes
- Hero-Slideshow (11 Motive inkl. Febrü) mit Infokarte, Laufzeit-Linie, größeren Klickflächen,
  Goldrahmen und mobiler Karte unter dem Bild; Zeile über der Überschrift, neue Vertrauenspunkte
- Hero-Stil auf Marken, Über uns und Kontakt übertragen, Breadcrumb entfernt
- Gründer-Leiste, Vision-Box auf Ocker, Showroom-Display in Box mit „Größer ansehen“/Vollbild
- Akzentfarbe #a8741f, größere Serif-Überschriften in der Interior-Welt
- Marken: Bildpause mit Zitat; Vereine aktualisiert und verlinkt

Inhalte
- Lektorat aller angezeigten Texte, /about-Korrekturen, Rechtstexte (DDG, TDDDG, Hosting Hetzner)
- Ablauf Maßanfertigung überall einheitlich, Magazin-Beitrag neu, alte Beiträge offline,
  deutsches Datum/Lesezeit, FAQ Projektausstattung, Otterpohl
- Referenzen-Seite per CMS-Schalter ausblendbar

CMS und Technik
- Tote Sektionen, Felder, Seiten und Komponenten entfernt und archiviert (dev/2026-08-28/archiv-*)
- Entwurf /entwurf, Farb-Schalter und /welcome entfernt; Test-Routen nur noch lokal
- Seitenbaum-Beschreibungen geprüft, fehlende CMS-Felder ergänzt, Markenliste aus „Kernmarken“
- Admin-Bildvorschauen repariert, verwendete Bilder in die Mediathek übernommen
- Seeder für das Deployment siehe dev/2026-08-28/entwicklungsplan.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 14:00:15 +00:00

83 lines
3.8 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
declare(strict_types=1);
use App\Models\CmsArticle;
use App\Models\CmsBrand;
use Database\Seeders\CmsBrandSeeder;
use Database\Seeders\ProofreadingCorrectionsSeeder;
use FluxCms\Core\Models\CmsContent;
use Illuminate\Foundation\Testing\RefreshDatabase;
uses(RefreshDatabase::class);
/**
* Lektorat aller angezeigten Texte (06.10.2026).
*/
it('corrects stored sections, legal texts, brands and articles and leaves the rest alone', function () {
$hero = CmsContent::create(['group' => 'home', 'key' => 'hero', 'type' => 'json', 'order' => 0, 'value' => [
'de' => ['title' => 'Eigener Titel', 'subtitle' => 'Ausstattung – mit CABINET, Rotpunkt Küchen, Febrü und einem Netzwerk regionaler Fachexperten.'],
]]);
$legal = CmsContent::create(['group' => 'legal', 'key' => 'cookie_policy', 'type' => 'json', 'order' => 0, 'value' => [
'de' => ['content' => '<p><strong>B2In GmbH</strong>, Irland („Google")</p>'],
]]);
$this->seed(CmsBrandSeeder::class);
$februe = CmsBrand::where('slug', 'februe')->firstOrFail();
$services = $februe->services;
$services[0]['title'] = 'Home-Office';
$februe->services = $services;
$februe->setTranslation('summary', 'de', 'Ob Home-Office oder ganze Büroetage – alles aus einer Hand.');
$februe->save();
$article = CmsArticle::factory()->create([
'title' => ['de' => 'Warum das Dubai Escrow-System überrascht'],
'content' => ['de' => ['intro' => 'Das Konzept "Local for Local" wirkt.']],
]);
$this->seed(ProofreadingCorrectionsSeeder::class);
$this->seed(ProofreadingCorrectionsSeeder::class);
expect($hero->refresh()->getTranslation('value', 'de'))->toBe([
'title' => 'Eigener Titel',
'subtitle' => 'Ausstattung – mit CABINET, Rotpunkt Küchen, Febrü, Otterpohl Möbelservice und einem Netzwerk regionaler Fachexperten.',
])
->and($legal->refresh()->getTranslation('value', 'de')['content'])->toBe('<p><strong>B2in GmbH</strong>, Irland („Google“)</p>');
$februe->refresh();
expect($februe->services[0]['title'])->toBe('Homeoffice')
->and($februe->getTranslation('summary', 'de'))->toBe('Ob Homeoffice oder ganze Büroetage – alles aus einer Hand.');
$article->refresh();
expect($article->getTranslation('title', 'de'))->toBe('Warum das Dubai-Escrow-System überrascht')
->and($article->getTranslation('content', 'de')['intro'])->toBe('Das Konzept „Local for Local“ wirkt.');
});
it('ships the corrected texts for fresh installations', function () {
$this->seed(CmsBrandSeeder::class);
expect(cms_theme_section('hero')['subtitle'])->toContain('Febrü und ein Netzwerk regionaler Experten')
->and(__('ui.contact_form.email'))->toBe('E-Mail *')
->and(CmsBrand::where('slug', 'februe')->first()->services[0]['title'])->toBe('Homeoffice');
$azizi = file_get_contents(resource_path('lang/de/immobilien-azizi.json'));
expect($azizi)->not->toContain('Mietermarkt')->not->toContain('Phase abhängig')->not->toContain('im Downtown Jebel Ali');
});
it('names the Otterpohl joinery instead of "our joinery"', function () {
$origin = cms_theme_section('origin_section');
expect($origin['steps_text'])->toContain('mit der Tischlerei Otterpohl')
->and($origin['steps'][2]['description'])->toStartWith('Die Tischlerei Otterpohl baut auf');
});
it('shows no internal data-quality notes on the real estate pages', function () {
$html = $this->get('/immobilien/azizi-creek-views-4')->assertSuccessful()->getContent();
expect($html)->not->toContain('final prüfen')
->not->toContain('Datenstand')
->not->toContain('SharePoint');
$json = file_get_contents(resource_path('lang/de/immobilien-azizi.json'));
expect($json)->not->toContain('confidence')->not->toContain('final prüfen');
});