88 lines
3.3 KiB
PHP
88 lines
3.3 KiB
PHP
<?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);
|
||
});
|