Buchungsseite: Verlauf mit Kauftyp, Erfolgsmeldungen grün

„Eingelöste Käufe" nennt jetzt Kauftyp und PM-Titel (z. B.
„Depublikation: <Titel>") über das neue kompakte shortLabel() am
SinglePurchaseType. Die Checkout-Erfolgsbanner (Buchung, Tarifwechsel,
vorgemerkter Wechsel) und die Extra-PM-Bestätigung nutzen das
etablierte grüne Success-Muster (ok-soft) statt Hub-Blau.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Kevin Adametz 2026-07-08 11:25:24 +00:00
parent f6882b621a
commit fe8bd2b931
3 changed files with 40 additions and 10 deletions

View file

@ -1,10 +1,12 @@
<?php
use App\Enums\SinglePurchaseType;
use App\Enums\UserPaymentOptionStatus;
use App\Models\BillingAddress;
use App\Models\BookingConfirmation;
use App\Models\LegalDocument;
use App\Models\Plan;
use App\Models\PressRelease;
use App\Models\SinglePurchase;
use App\Models\User;
use App\Models\UserPaymentOption;
@ -158,11 +160,23 @@ test('open and consumed single purchases appear in the card and history', functi
SinglePurchase::factory()->paid()->create(['user_id' => $user->id]);
SinglePurchase::factory()->consumed()->create(['user_id' => $user->id]);
// Eingelöste Käufe nennen Kauftyp und PM-Titel (z. B. Depublikation).
$release = PressRelease::factory()->create([
'user_id' => $user->id,
'title' => 'Depublizierte Beispiel-Mitteilung',
]);
SinglePurchase::factory()->consumed()->create([
'user_id' => $user->id,
'type' => SinglePurchaseType::Depublication,
'press_release_id' => $release->id,
]);
$this->actingAs($user);
LivewireVolt::test('customer.bookings')
->assertSee('Einzel-Pressemitteilung verfügbar')
->assertSee('eingelöst am');
->assertSee('eingelöst am')
->assertSee('Depublikation: Depublizierte Beispiel-Mitteilung');
});
test('the billing portal redirects without an active subscription', function () {