PM-Detailseite: Inhaltspruefung (Gruen/Gelb/Rot) + Qualitaets-Score sichtbar
- Neue Kachel "Inhaltspruefung" in Status & Verlauf (Badge je Ergebnis, "Ausstehend" ohne Pruefung); bei Gelb neutraler Hinweis, dass die Boost-Platzierung gruen gepruefte Meldungen voraussetzt - Content-Score-Panel des Editors in gemeinsame Komponente x-content-score-panel extrahiert und auf der Detailseite wiederverwendet (Score/100, Stufe, Abstand zur naechsten Schwelle) - PressReleaseClassification::badgeClass() (ok/warn/err) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
4f2be1e0a8
commit
6f96e4a4cc
5 changed files with 126 additions and 32 deletions
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
|
||||
use App\Enums\Portal;
|
||||
use App\Enums\PressReleaseClassification;
|
||||
use App\Enums\PressReleaseContentTier;
|
||||
use App\Enums\PressReleaseStatus;
|
||||
use App\Models\Category;
|
||||
use App\Models\Company;
|
||||
|
|
@ -211,3 +213,52 @@ test('admin show zeigt Boilerplate-Override nicht wenn leer', function () {
|
|||
LivewireVolt::test('admin.press-releases.show', ['id' => $pr->id])
|
||||
->assertDontSee('Eigener Abbinder (Boilerplate)');
|
||||
});
|
||||
|
||||
test('customer show zeigt das Pruefergebnis und den Qualitaets-Score', function () {
|
||||
/** @var TestCase $this */
|
||||
['customer' => $customer, 'pr' => $pr] = makeCustomerForShowPhase8a([
|
||||
'status' => PressReleaseStatus::Published->value,
|
||||
'published_at' => now(),
|
||||
'classification' => PressReleaseClassification::Green->value,
|
||||
'content_score' => 87,
|
||||
'content_tier' => PressReleaseContentTier::Hochwertig->value,
|
||||
]);
|
||||
$this->actingAs($customer);
|
||||
|
||||
LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id])
|
||||
->assertSee('Inhaltsprüfung')
|
||||
->assertSee('Grün')
|
||||
->assertSee('Qualität')
|
||||
->assertSee('87')
|
||||
->assertSee('Hochwertig')
|
||||
->assertSee('Höchste Stufe erreicht.');
|
||||
});
|
||||
|
||||
test('customer show erklaert bei Gelb den fehlenden Boost neutral', function () {
|
||||
/** @var TestCase $this */
|
||||
['customer' => $customer, 'pr' => $pr] = makeCustomerForShowPhase8a([
|
||||
'status' => PressReleaseStatus::Published->value,
|
||||
'published_at' => now(),
|
||||
'classification' => PressReleaseClassification::Yellow->value,
|
||||
]);
|
||||
$this->actingAs($customer);
|
||||
|
||||
LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id])
|
||||
->assertSee('Inhaltsprüfung')
|
||||
->assertSee('Gelb')
|
||||
->assertSee('Die Boost-Platzierung ist grün geprüften Meldungen vorbehalten.');
|
||||
});
|
||||
|
||||
test('customer show zeigt ohne Pruefung Ausstehend und kein Qualitaets-Panel', function () {
|
||||
/** @var TestCase $this */
|
||||
['customer' => $customer, 'pr' => $pr] = makeCustomerForShowPhase8a([
|
||||
'classification' => null,
|
||||
'content_score' => null,
|
||||
]);
|
||||
$this->actingAs($customer);
|
||||
|
||||
LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id])
|
||||
->assertSee('Inhaltsprüfung')
|
||||
->assertSee('Ausstehend')
|
||||
->assertDontSee('Höchste Stufe erreicht.');
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue