presseportale/tests/Feature/Web/PressekontoHubHomeTest.php
Kevin Adametz 0a3e52d603 19-05-2026 Rebrand Pressekonto, Hub-Flux UI und Legacy-Media-Migration
Umbenennung presseportale → pressekonto in Domains, Themes und Dokumentation.
Design-Tokens, Portal-Shell, Customer-Dashboard, Auth- und Admin-PM-Views.
Artisan-Befehl migrate:legacy-media mit Tests und Hub-Flux-Entwicklungsdocs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-19 16:36:13 +00:00

88 lines
3.2 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
use Tests\TestCase;
test('pressekonto hub homepage renders the publisher landing shell', function () {
/** @var TestCase $this */
$this->get('https://pressekonto.test/')
->assertSuccessful()
->assertSee('presse', false)
->assertSee('konto', false)
->assertSeeText('Publisher-Hub')
->assertSeeText('Ein Konto.')
->assertSeeText('Was Sie hier können')
->assertSeeText('So funktioniert es')
->assertSeeText('Vier Schritte')
->assertSeeText('Tarife')
->assertSeeText('Starter')
->assertSeeText('Standard')
->assertSeeText('Pro')
->assertSeeText('Enterprise')
->assertSeeText('Hinter pressekonto')
->assertSeeText('Plattform im Überblick')
->assertSeeText('Häufige Fragen')
->assertSeeText('Loslegen')
->assertSeeText('Alle Systeme betriebsbereit');
});
test('pressekonto hub homepage uses the brand-mark splitting without TLDs', function () {
/** @var TestCase $this */
$response = $this->get('https://pressekonto.test/');
$content = $response->getContent();
$response->assertSuccessful();
// Markennamen erscheinen ausschliesslich gesplittet (presse|echo, businessportal|24, presse|konto).
expect($content)
->not->toContain('presseecho.de')
->not->toContain('businessportal24.com')
->toContain('businessportal')
->toContain('>24<')
->toContain('>echo<')
->toContain('>konto<');
// pressekonto darf ausschliesslich in der Vertriebs-Mailto-Adresse als Domain auftauchen,
// niemals als Marken-Schreibweise im Lese-Text.
expect(substr_count($content, 'pressekonto.de'))
->toBe(substr_count($content, 'vertrieb@pressekonto.de'));
});
test('pressekonto hub homepage loads the hub theme assets, not portal admin', function () {
/** @var TestCase $this */
$response = $this->get('https://pressekonto.test/');
$response
->assertSuccessful()
->assertSee('theme-pressekonto', false)
->assertDontSee('theme-businessportal24', false)
->assertDontSee('theme-presseecho', false);
});
test('pressekonto hub homepage hides the brand-context banner without a from parameter', function () {
/** @var TestCase $this */
$this->get('https://pressekonto.test/')
->assertSuccessful()
->assertDontSeeText('Sie kommen von');
});
test('pressekonto hub homepage shows the brand-context banner when arriving from presseecho', function () {
/** @var TestCase $this */
$response = $this->get('https://pressekonto.test/?from=presseecho')
->assertSuccessful()
->assertSeeText('Sie kommen von')
->assertSeeText('Zurück zu');
// Brand-Mark rendert "presse" + farbiger Akzent "echo" TLD darf nicht auftauchen.
$response->assertDontSee('presseecho.de', false);
});
test('pressekonto hub homepage shows the brand-context banner when arriving from businessportal24', function () {
/** @var TestCase $this */
$response = $this->get('https://pressekonto.test/?from=businessportal24')
->assertSuccessful()
->assertSeeText('Sie kommen von')
->assertSeeText('Zurück zu');
$response->assertDontSee('businessportal24.com', false);
});