Hub (Web): Auth-aware CTAs, Kontakt-Modal statt Mailto, Pruefung-Wording
- Angemeldete Nutzer sehen ueberall (Header, Hero, Kuendbar-Box, CTA, Footer) "Zum pressekonto" (rollengerecht via LoginRedirect::homeFor) statt Anmelden/Konto erstellen - Keine E-Mail-Adresse mehr im Quelltext (Spam-Schutz): neues <x-web.hub.contact-modal> (Alpine, Honeypots, Erfolgs-/Fehlerzustand, auto-open nach Submit) am host-agnostischen kontakt.store-Endpunkt; Trigger in Enterprise-Streifen, FAQ-Support, DSGVO-Antwort, Footer und Utility-Bar - "Redaktionelle Pruefung" -> "Pruefung" in allen Hub-Inhalten; "verifizierter Newsroom" -> "Ihr eigener Newsroom" Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
88d6935014
commit
47d03ec777
6 changed files with 243 additions and 60 deletions
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
use Database\Seeders\PlanSeeder;
|
||||
use Database\Seeders\RolesAndPermissionsSeeder;
|
||||
use Tests\TestCase;
|
||||
|
||||
test('pressekonto hub homepage renders the publisher landing shell', function () {
|
||||
|
|
@ -62,6 +64,43 @@ test('pressekonto hub homepage has no dead links or fabricated references', func
|
|||
expect($content)->toContain('/de/impressum')->toContain('/de/datenschutz');
|
||||
});
|
||||
|
||||
test('a logged-in user sees the panel link instead of the auth buttons', function () {
|
||||
/** @var TestCase $this */
|
||||
$this->seed(RolesAndPermissionsSeeder::class);
|
||||
$customer = User::factory()->create(['is_active' => true, 'email_verified_at' => now()]);
|
||||
$customer->assignRole('customer');
|
||||
|
||||
$this->actingAs($customer)
|
||||
->get('https://pressekonto.test/')
|
||||
->assertSuccessful()
|
||||
->assertSeeText('Zum pressekonto')
|
||||
->assertSee('/admin/me', false)
|
||||
->assertDontSeeText('Konto erstellen')
|
||||
->assertDontSeeText('Anmelden');
|
||||
});
|
||||
|
||||
test('the hub exposes a contact modal instead of a mailto address', function () {
|
||||
/** @var TestCase $this */
|
||||
$response = $this->get('https://pressekonto.test/')->assertSuccessful();
|
||||
$content = $response->getContent();
|
||||
|
||||
// Spam-Schutz: keine E-Mail-Adresse im Quelltext, stattdessen das Modal-Formular.
|
||||
expect($content)
|
||||
->not->toContain('mailto:')
|
||||
->toContain('open-contact-modal')
|
||||
->toContain('action="'.route('kontakt.store', ['edition' => 'de']).'"')
|
||||
->toContain('name="website"');
|
||||
});
|
||||
|
||||
test('the hub page speaks of Pruefung without the redaktionell qualifier', function () {
|
||||
/** @var TestCase $this */
|
||||
$this->get('https://pressekonto.test/')
|
||||
->assertSuccessful()
|
||||
->assertDontSeeText('Redaktionelle Prüfung')
|
||||
->assertDontSeeText('redaktionelle Prüfung')
|
||||
->assertSeeText('Prüfung inklusive');
|
||||
});
|
||||
|
||||
test('legal pages are reachable on the hub domain', function () {
|
||||
/** @var TestCase $this */
|
||||
$this->get('https://pressekonto.test/de/impressum')->assertSuccessful();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue