Paket-Vorteile: dynamische, im Admin pflegbare Vorteilsliste je Tarif

Neue JSON-Spalte plans.benefits (Migration + Cast + Plan::benefitsList()).
Im Admin (Tarife & Pakete) pro Tarif zeilenweise pflegbar; die In-App-
Buchungsseite rendert die Liste in den Tarif-Karten statt einer festen
Zeile. Seeder/Factory mit Beispiel-Vorteilen. Single Source of Truth fuer
Buchungsseite und (folgt separat) die oeffentliche Preise-Seite.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Kevin Adametz 2026-06-18 16:36:09 +00:00
parent 7d03deddb1
commit e96a11824b
8 changed files with 161 additions and 8 deletions

View file

@ -54,6 +54,24 @@ test('the bookings page renders the active plans with checkout links', function
->assertSee(route('me.checkout.subscription', ['planSlug' => 'business', 'interval' => 'monthly']), false);
});
test('the plan card renders the maintained benefits list', function () {
/** @var TestCase $this */
Plan::factory()->create([
'name' => 'Business',
'slug' => 'business',
'press_release_quota' => 10,
'benefits' => ['Günstigere Extra-Pressemitteilungen', 'Boost-Platzierung vergünstigt'],
]);
$user = bookingsTestCustomer();
BillingAddress::factory()->create(['user_id' => $user->id]);
$this->actingAs($user);
LivewireVolt::test('customer.bookings')
->assertSee('Günstigere Extra-Pressemitteilungen')
->assertSee('Boost-Platzierung vergünstigt');
});
test('the single pm block links to its checkout', function () {
/** @var TestCase $this */
config()->set('billing.single_pm_stripe_price_id', 'price_test_single_pm');