Frontend: Editorial-Relaunch der öffentlichen Strecke + Ausgaben-Routing
Öffentliche Seiten auf gemeinsames Editorial-Design (x-web.site-header/-footer,
Design-Tokens) und Ausgaben-Präfix /{edition}/ (de|en) umgestellt.
- Routing: neue Middleware SetEdition (Locale + URL::defaults), /{edition}-Gruppe
in routes/web.php, Root-Redirect auf /de, 301 für Legacy-.html-URLs,
Baseline-Default in AppServiceProvider.
- Neue URL-Schemata: /{edition}/press-release/{slug}, /{edition}/category/{slug}.
- Ausgabe = Sprache: DE/EN-Umschalter (Region/CH/AT entfernt); EditorialClock
und Livewire-Komponenten sprachdynamisch.
- Detail-, Kategorie- und Veröffentlichen-Seite mit echten Daten neu aufgebaut.
- Suche aktiviert: Volt-Komponente livewire/web/search (Titel/Text/Keywords +
Firma + Rubrik, Filter, Sortierung, Pagination, URL-Parameter q/category/sort).
- Rubriken-Navigation statt Übersichtsseite: Helper CategoryNavigation;
web/kategorien.blade.php + Route entfernt (Legacy-301).
- Tests: Edition-Routing, Kategorie-Seite/-Navigation, Detail, Veröffentlichen,
Suche, EditorialClock. Doku in "Echte öffentliche Unterseiten.md" aktualisiert.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
a0547208d3
commit
253141c6dc
64 changed files with 4457 additions and 2971 deletions
52
tests/Feature/Web/HomeEditorialClockTest.php
Normal file
52
tests/Feature/Web/HomeEditorialClockTest.php
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
use App\Enums\Portal;
|
||||
use App\Models\Category;
|
||||
use App\Models\Company;
|
||||
use App\Models\PressRelease;
|
||||
use Tests\TestCase;
|
||||
|
||||
test('homepage anchors recency to the latest release so spotlight, newsrooms and ticker use real data', function () {
|
||||
/** @var TestCase $this */
|
||||
$category = Category::factory()->create([
|
||||
'portal' => Portal::Both,
|
||||
]);
|
||||
$category->translations()->create([
|
||||
'locale' => 'de',
|
||||
'name' => 'Energie & Klima',
|
||||
'slug' => 'energie-klima',
|
||||
]);
|
||||
|
||||
$company = Company::factory()->businessportal24()->create([
|
||||
'name' => 'Nordwind Energie AG',
|
||||
]);
|
||||
|
||||
// Historisches Archiv: jüngster Datensatz liegt 40 Tage in der Vergangenheit.
|
||||
$anchor = now()->subDays(40);
|
||||
|
||||
foreach (range(0, 2) as $i) {
|
||||
PressRelease::factory()
|
||||
->published()
|
||||
->forPortal(Portal::Businessportal24)
|
||||
->for($category)
|
||||
->for($company)
|
||||
->create([
|
||||
'title' => "Echte Spotlight Meldung {$i}",
|
||||
'slug' => "echte-spotlight-meldung-{$i}",
|
||||
'published_at' => $anchor->copy()->subDays($i),
|
||||
]);
|
||||
}
|
||||
|
||||
$this->get('https://businessportal24.test/de')
|
||||
->assertSuccessful()
|
||||
// Aktive Newsrooms zeigt echte Firma statt Mock.
|
||||
->assertSeeText('Nordwind Energie AG')
|
||||
->assertDontSeeText('Siemens AG')
|
||||
// Heute im Fokus + Branchen-Index nutzen echte Rubrik.
|
||||
->assertSeeText('Energie & Klima')
|
||||
// Spotlight + Feed zeigen echte Meldungen statt Mock.
|
||||
->assertSeeText('Echte Spotlight Meldung 0')
|
||||
->assertDontSeeText('RWE AG')
|
||||
// Ad-Hoc-Ticker zeigt keine Mock-Meldungen mehr.
|
||||
->assertDontSeeText('Siemens Energy hebt Jahresprognose an');
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue