presseportale/tests/Feature/Web/PresseportaleHubHomeTest.php
Kevin Adametz 092ee0e918
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
13-05-2026 Frontend DEV + HUB
2026-05-13 18:11:03 +02:00

88 lines
3.3 KiB
PHP
Raw 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('presseportale hub homepage renders the publisher landing shell', function () {
/** @var TestCase $this */
$this->get('https://presseportale.test/')
->assertSuccessful()
->assertSee('presse', false)
->assertSee('portale', 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 presseportale')
->assertSeeText('Plattform im Überblick')
->assertSeeText('Häufige Fragen')
->assertSeeText('Loslegen')
->assertSeeText('Alle Systeme betriebsbereit');
});
test('presseportale hub homepage uses the brand-mark splitting without TLDs', function () {
/** @var TestCase $this */
$response = $this->get('https://presseportale.test/');
$content = $response->getContent();
$response->assertSuccessful();
// Markennamen erscheinen ausschliesslich gesplittet (presse|echo, businessportal|24, presse|portale).
expect($content)
->not->toContain('presseecho.de')
->not->toContain('businessportal24.com')
->toContain('businessportal')
->toContain('>24<')
->toContain('>echo<')
->toContain('>portale<');
// presseportale darf ausschliesslich in der Vertriebs-Mailto-Adresse als Domain auftauchen,
// niemals als Marken-Schreibweise im Lese-Text.
expect(substr_count($content, 'presseportale.com'))
->toBe(substr_count($content, 'vertrieb@presseportale.com'));
});
test('presseportale hub homepage loads the hub theme assets, not portal admin', function () {
/** @var TestCase $this */
$response = $this->get('https://presseportale.test/');
$response
->assertSuccessful()
->assertSee('theme-presseportale', false)
->assertDontSee('theme-businessportal24', false)
->assertDontSee('theme-presseecho', false);
});
test('presseportale hub homepage hides the brand-context banner without a from parameter', function () {
/** @var TestCase $this */
$this->get('https://presseportale.test/')
->assertSuccessful()
->assertDontSeeText('Sie kommen von');
});
test('presseportale hub homepage shows the brand-context banner when arriving from presseecho', function () {
/** @var TestCase $this */
$response = $this->get('https://presseportale.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('presseportale hub homepage shows the brand-context banner when arriving from businessportal24', function () {
/** @var TestCase $this */
$response = $this->get('https://presseportale.test/?from=businessportal24')
->assertSuccessful()
->assertSeeText('Sie kommen von')
->assertSeeText('Zurück zu');
$response->assertDontSee('businessportal24.com', false);
});