PM-Detailseite: Direktlinks zur öffentlichen Seite je Portal
Veröffentlichte PMs zeigten im Backend nur den Status-Badge, ohne Weg zur öffentlichen Seite. Im Seitenkopf stehen jetzt Direktlinks — bei Portal::Both einer je Portal (QA-Befund 07.07.). Die URL-Logik ist als PressRelease::publicPortalLinks() zentralisiert (vorher doppelt in der Published-Mail und fehlerhaft im Nachweis-PDF: dort fehlte das /de/press-release/-Segment, die dokumentierte URL lief ins Leere; bei Both nennt der Nachweis jetzt beide URLs). Edition folgt der PM-Sprache statt hart „de". Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
46ce2c10a2
commit
9b55e11159
6 changed files with 128 additions and 13 deletions
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
|
||||
use App\Enums\Portal;
|
||||
use App\Enums\PressReleaseStatus;
|
||||
use App\Models\Category;
|
||||
use App\Models\Company;
|
||||
|
|
@ -127,6 +128,48 @@ test('customer show zeigt Boilerplate-Override nicht wenn leer', function () {
|
|||
->assertDontSee('Eigener Abbinder (Boilerplate)');
|
||||
});
|
||||
|
||||
test('customer show links to the public page of a published release', function () {
|
||||
/** @var TestCase $this */
|
||||
['customer' => $customer, 'pr' => $pr] = makeCustomerForShowPhase8a([
|
||||
'status' => PressReleaseStatus::Published,
|
||||
'published_at' => now()->subHour(),
|
||||
'slug' => 'oeffentliche-pm',
|
||||
'language' => 'de',
|
||||
]);
|
||||
$this->actingAs($customer);
|
||||
|
||||
LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id])
|
||||
->assertSee('Öffentlich ansehen')
|
||||
->assertSee(config('domains.domain_presseecho_url').'/de/press-release/oeffentliche-pm', escape: false);
|
||||
});
|
||||
|
||||
test('customer show links to both portals when the release is published on both', function () {
|
||||
/** @var TestCase $this */
|
||||
['customer' => $customer, 'pr' => $pr] = makeCustomerForShowPhase8a([
|
||||
'status' => PressReleaseStatus::Published,
|
||||
'published_at' => now()->subHour(),
|
||||
'portal' => Portal::Both,
|
||||
'slug' => 'beide-portale-pm',
|
||||
'language' => 'de',
|
||||
]);
|
||||
$this->actingAs($customer);
|
||||
|
||||
LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id])
|
||||
->assertSee('Auf Presseecho ansehen')
|
||||
->assertSee('Auf Businessportal24 ansehen')
|
||||
->assertSee(config('domains.domain_presseecho_url').'/de/press-release/beide-portale-pm', escape: false)
|
||||
->assertSee(config('domains.domain_businessportal_url').'/de/press-release/beide-portale-pm', escape: false);
|
||||
});
|
||||
|
||||
test('customer show shows no public link for drafts', function () {
|
||||
/** @var TestCase $this */
|
||||
['customer' => $customer, 'pr' => $pr] = makeCustomerForShowPhase8a();
|
||||
$this->actingAs($customer);
|
||||
|
||||
LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id])
|
||||
->assertDontSee('Öffentlich ansehen');
|
||||
});
|
||||
|
||||
test('admin show zeigt den Untertitel direkt unter dem Titel', function () {
|
||||
/** @var TestCase $this */
|
||||
$admin = makeAdminForShowPhase8a();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue