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
53
tests/Feature/Web/CategoryNavigationTest.php
Normal file
53
tests/Feature/Web/CategoryNavigationTest.php
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
|
||||
use App\Enums\Portal;
|
||||
use App\Models\Category;
|
||||
use App\Models\PressRelease;
|
||||
use Tests\TestCase;
|
||||
|
||||
function seedNavigationCategory(string $name, string $slug): Category
|
||||
{
|
||||
$category = Category::factory()->create(['portal' => Portal::Both, 'is_active' => true]);
|
||||
$category->translations()->create(['locale' => 'de', 'name' => $name, 'slug' => $slug]);
|
||||
|
||||
PressRelease::factory()
|
||||
->published()
|
||||
->forPortal(Portal::Businessportal24)
|
||||
->for($category)
|
||||
->create(['language' => 'de', 'published_at' => now()->subDay()]);
|
||||
|
||||
return $category;
|
||||
}
|
||||
|
||||
test('the header navigation lists real categories that link to their category page', function () {
|
||||
/** @var TestCase $this */
|
||||
seedNavigationCategory('Energie & Klima', 'energie-klima');
|
||||
|
||||
$this->get('https://businessportal24.test/de')
|
||||
->assertSuccessful()
|
||||
->assertSee('/de/category/energie-klima', false)
|
||||
->assertSeeText('Energie & Klima');
|
||||
});
|
||||
|
||||
test('there is no standalone category overview page anymore', function () {
|
||||
/** @var TestCase $this */
|
||||
$this->get('https://businessportal24.test/de/kategorien')->assertNotFound();
|
||||
});
|
||||
|
||||
test('a legacy category overview url redirects to the edition home', function () {
|
||||
/** @var TestCase $this */
|
||||
$this->get('https://businessportal24.test/de/kategorien.html')
|
||||
->assertRedirect('https://businessportal24.test/de');
|
||||
|
||||
$this->get('https://businessportal24.test/kategorien.html')
|
||||
->assertRedirect('https://businessportal24.test/de');
|
||||
});
|
||||
|
||||
test('the navigation marks the active category on its own page', function () {
|
||||
/** @var TestCase $this */
|
||||
seedNavigationCategory('Mobilität', 'mobilitaet');
|
||||
|
||||
$this->get('https://businessportal24.test/de/category/mobilitaet')
|
||||
->assertSuccessful()
|
||||
->assertSee('/de/category/mobilitaet', false);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue