PM-Uebersicht: Rubrik unter Portal, Boost-moeglich-Hinweis, gruener Haken

- Rubrik (lokalisiert) direkt unter den Portal-Pills; Kategorie wird in
  accessiblePageFor() eager geladen (kein N+1)
- Status-Spalte: laeuft kein Boost, wirbt eine veroeffentlichte gruene PM
  mit "Boost moeglich ->" (Link zur PM-Seite mit den Add-ons)
- Gruen geprueft: kleiner gruener Haken neben dem Titel (Tooltip
  "Inhaltspruefung: Gruen")

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Kevin Adametz 2026-07-13 13:23:07 +00:00
parent 0cddf5fbdc
commit 4f2be1e0a8
3 changed files with 61 additions and 7 deletions

View file

@ -298,15 +298,43 @@ test('the press release list shows a hint with end date for an active boost', fu
$this->actingAs($customer);
// Ohne laufenden Boost wirbt die grüne, veröffentlichte PM für das Add-on.
LivewireVolt::test('customer.press-releases.index')
->assertDontSee('Boost bis');
->assertDontSee('Boost bis')
->assertSee('Boost möglich');
Boost::factory()->for($pr)->create([
'ends_at' => now()->addDays(7)->setTime(9, 0),
]);
LivewireVolt::test('customer.press-releases.index')
->assertSee('Boost bis '.now()->addDays(7)->format('d.m.Y'));
->assertSee('Boost bis '.now()->addDays(7)->format('d.m.Y'))
->assertDontSee('Boost möglich');
});
test('the list shows the category under the portal and a green check for green releases', function () {
/** @var TestCase $this */
['customer' => $customer, 'pr' => $pr] = publishedGreenPrForOwner();
$pr->category->translations()->create(['locale' => 'de', 'name' => 'Energie & Klima', 'slug' => 'energie-klima']);
$this->actingAs($customer);
LivewireVolt::test('customer.press-releases.index')
->assertSee('Energie & Klima')
->assertSee('Inhaltsprüfung: Grün');
});
test('a non-green release shows neither the green check nor the boost hint', function () {
/** @var TestCase $this */
['customer' => $customer, 'pr' => $pr] = publishedGreenPrForOwner();
$pr->update(['classification' => PressReleaseClassification::Yellow->value]);
$this->actingAs($customer);
LivewireVolt::test('customer.press-releases.index')
->assertDontSee('Inhaltsprüfung: Grün')
->assertDontSee('Boost möglich');
});
test('an expired boost shows no hint in the press release list', function () {