presseportale/tests/Feature/Web/HubStaticPageShellTest.php
Kevin Adametz 99ab47ba1f Datenschutzerklaerung v0.3 eingebaut, Cookie-Seite zurueckgebaut
- Datenschutz: vollstaendige v0.3 aus docs/legal, host-aware Bausteine
  (Hub: Kundenkonto/Login-Magic-Link/Stripe; Spokes: Medienprivileg,
  Newsroom, Aenderungslink-Variante); Systemwerte aufgeloest (Magic-Link
  15 Min. aus MagicLinkGenerator, Logs 14 Tage, Stripe Payments Europe);
  ersetzt den Platzhalter samt falscher Google-Analytics-Behauptung
- Cookie-Seite raus (Cookies stehen in Abschnitt 4 der Datenschutz-
  erklaerung, kein Banner noetig): Route -> 301 auf /datenschutz,
  Legacy-Alias cookies.html -> datenschutz, Footer + Sitemap bereinigt

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

39 lines
1.5 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. Selfservice-Kündigungsbutton + Kontakt-Modal.
// Der Widerrufs-Button entfällt (Entscheidung E2: B2B-only).
->toContain('Verträge hier kündigen')
->not->toContain('open-withdrawal-modal')
->toContain('open-contact-modal')
// Kein Spoke-Portal-Branding im Gerüst.
->not->toContain('Pressemitteilungen · DACH');
})->with(['impressum', 'agb', 'datenschutz', 'richtlinien', 'melden', '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');
});