Werbeplaetze reaktiviert: Eigenwerbe-Slots oeffnen das Kontakt-Widget

Die im Spoke-Frontend-Audit entfernten Anzeige-Flaechen (focus-ad,
feed-ad, Inline-Ad) kehren als dezente Eigenwerbung zurueck:

- neue Komponente x-web.ad-slot im frueheren "ANZEIGE"-Stil mit Hinweis
  "Hier koennte Ihre Werbung stehen" (DE/EN)
- eingebaut an den drei frueheren Stellen: Hero-Sidebar der Startseiten,
  Feed nach der dritten Meldung, PM-Detailseite nach der
  Unternehmensbeschreibung (nicht in der privaten Vorschau)
- Klick oeffnet das schwebende Kontakt-Widget mit vorgewaehltem neuen
  Thema "Werbung buchen" (ContactMessageTopic::Advertising); Anfragen
  landen wie gewohnt in der Admin-Queue "Kontakt"

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Kevin Adametz 2026-07-10 16:53:02 +00:00
parent dc2a3443c1
commit 744e87d008
12 changed files with 174 additions and 2 deletions

View file

@ -62,7 +62,9 @@ test('preview renders the public release detail layout with preview banner and n
->assertSeeText('Vorschau')
->assertSeeText('So erscheint die Pressemitteilung nach der Veröffentlichung.')
->assertSeeText('Status: Entwurf')
->assertSeeText('Entwurf im Portal-Design');
->assertSeeText('Entwurf im Portal-Design')
// Der Werbeplatz-Hinweis erscheint nur auf der öffentlichen Seite.
->assertDontSeeText('Hier könnte Ihre Werbung stehen');
});
test('preview applies the theme of the target portal', function () {

View file

@ -150,6 +150,34 @@ test('a widget submission stores topic and page url', function () {
});
});
test('an advertising enquiry from the ad slot stores the advertising topic', function () {
/** @var TestCase $this */
Mail::fake();
$this->post('https://presseecho.test/de/kontakt', [
'name' => 'Willi Werbung',
'email' => 'willi@example.test',
'message' => 'Ich interessiere mich für Werbeplätze auf Ihrem Portal.',
'topic' => 'advertising',
'page_url' => 'https://presseecho.test/de',
])->assertSessionHas('contact-status');
$message = ContactMessage::query()->sole();
expect($message->topic)->toBe(ContactMessageTopic::Advertising)
->and($message->portal)->toBe('presseecho');
Mail::assertSent(ContactRequestSubmitted::class, fn (ContactRequestSubmitted $mail) => $mail->topicLabel === 'Werbeanfrage');
});
test('the spoke pages offer the advertising topic in the contact launcher', function () {
/** @var TestCase $this */
$this->get('https://businessportal24.test/de/faq')
->assertSuccessful()
->assertSee('Werbung buchen')
->assertSee('Werbeplätze und Konditionen anfragen');
});
test('an unknown topic is rejected', function () {
/** @var TestCase $this */
Mail::fake();

View file

@ -50,6 +50,39 @@ test('presseecho homepage renders the editorial shell with real data', function
->assertSeeText('Heute im Fokus');
});
test('presseecho homepage shows the ad slot self-promotion in the hero sidebar', function () {
/** @var TestCase $this */
$category = Category::factory()->create([
'portal' => Portal::Presseecho,
]);
$category->translations()->create([
'locale' => 'de',
'name' => 'Energie & Klima',
'slug' => 'energie-klima',
]);
$company = Company::factory()->presseecho()->create();
PressRelease::factory()
->published()
->forPortal(Portal::Presseecho)
->for($category)
->for($company)
->create([
'title' => 'Ad-Slot Hero Meldung',
'slug' => 'ad-slot-hero-meldung',
'published_at' => now()->subHour(),
]);
$this->get('https://presseecho.test/de')
->assertSuccessful()
->assertSeeText('Hier könnte Ihre Werbung stehen')
->assertSeeText('Jetzt Werbeplatz anfragen')
// Klick öffnet das Kontakt-Widget mit vorgewähltem Thema „Werbeanfrage".
->assertSee('open-contact-modal', false)
->assertSee("{ topic: 'advertising' }", false);
});
test('presseecho homepage hides data sections and shows the empty feed state without content', function () {
/** @var TestCase $this */
$this->get('https://presseecho.test/de')

View file

@ -128,6 +128,26 @@ test('release detail without chosen placeholder falls back to the generic hero',
->assertDontSee('images/press-release-placeholders/', false);
});
test('release detail shows the ad slot self-promotion inline', function () {
/** @var TestCase $this */
// Werbeplatz-Hinweis (Eigenwerbung): Klick öffnet das Kontakt-Widget
// mit vorgewähltem Thema „Werbeanfrage".
[$category, $company] = detailCategoryAndCompany(Portal::Businessportal24);
$release = PressRelease::factory()
->published()
->forPortal(Portal::Businessportal24)
->for($category)
->for($company)
->create(['slug' => 'meldung-mit-werbeplatz', 'published_at' => now()->subDay()]);
$this->get('https://businessportal24.test/de/press-release/'.$release->slug)
->assertSuccessful()
->assertSeeText('Hier könnte Ihre Werbung stehen')
->assertSeeText('Jetzt Werbeplatz anfragen')
->assertSee("{ topic: 'advertising' }", false);
});
test('release detail shows prominent report links below the article', function () {
/** @var TestCase $this */
// T13 (Meldeverfahren): Die Melde-Links stehen sichtbar unter jeder