presseportale/tests/Feature/Web/HubStaticPageShellTest.php
Kevin Adametz c7450da301 Hub (Web): statische Seiten (Rechtstexte, API, FAQ ...) rendern das Hub-Geruest
x-web.static-page ist jetzt host-aware: Auf der pressekonto-Domain laden
Utility-Bar + Hub-Header/-Footer (inkl. Kontakt- und Widerrufs-Modal,
damit die Footer-Buttons ueberall funktionieren) statt des
Spoke-Geruests; Breadcrumb fuehrt zur Hub-Landing. Hub-Anker-Navigation
(#tarife/#funktion/#familie/#faq) absolut auf die Landing, damit sie
auch von Unterseiten aus funktioniert. Spokes unveraendert (Test).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 10:47:47 +00:00

38 lines
1.4 KiB
PHP

<?php
use Tests\TestCase;
test('static pages on the hub domain render the hub shell', function (string $path) {
/** @var TestCase $this */
$response = $this->get('https://pressekonto.test/de/'.$path)->assertSuccessful();
$content = $response->getContent();
expect($content)
// Hub-Kopf: Utility-Bar + Hub-Header statt Spoke-Gerüst.
->toContain('Publisher-Hub für')
->toContain('Publisher · Hub')
// Hub-Footer inkl. gesetzlichem Widerrufsbutton + Modals.
->toContain('Vertrag widerrufen')
->toContain('open-withdrawal-modal')
->toContain('open-contact-modal')
// Kein Spoke-Portal-Branding im Gerüst.
->not->toContain('Pressemitteilungen · DACH');
})->with(['impressum', 'agb', 'datenschutz', 'cookies', 'api']);
test('the hub static page breadcrumb links back to the hub landing', function () {
/** @var TestCase $this */
$this->get('https://pressekonto.test/de/impressum')
->assertSuccessful()
->assertSee('href="https://pressekonto.test"', false)
->assertSeeText('pressekonto');
});
test('static pages on the spoke domains keep the spoke shell', function () {
/** @var TestCase $this */
$response = $this->get('https://businessportal24.test/de/impressum')->assertSuccessful();
$content = $response->getContent();
expect($content)
->not->toContain('Publisher-Hub für')
->not->toContain('Vertrag widerrufen');
});