dashboard/errors: Onboarding-Card „Erste Schritte" & Hub-Styling der Fehlerseiten

Neue aufklappbare "Erste Schritte"-Card als erste Card im Kunden-Dashboard,
die neue Nutzer durch Profil, Rechnungsadresse, Firma und erste PM führt und
sich ausblendet, sobald alle Schritte erledigt sind. Zusätzlich die
gemeinsame Fehlerseiten-Vorlage (404/403/419/500/503) an das Hub-Design
angepasst (Palette, Gold-Akzent, Hub-Blau-Button), weiterhin self-contained
ohne Vite-Assets.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Kevin Adametz 2026-07-15 13:07:36 +00:00
parent 6f6cb13f2e
commit a54637835d
4 changed files with 307 additions and 28 deletions

View file

@ -50,6 +50,74 @@ test('empty-state with three-step intro shows when no press releases exist', fun
->assertSee(__('Zur Prüfung senden'));
});
test('the first-steps onboarding card appears for a fresh customer with all steps open', function () {
/** @var TestCase $this */
$customer = User::factory()->create(['is_active' => true]);
$customer->assignRole('customer');
$this->actingAs($customer);
LivewireVolt::test('customer.dashboard')
->assertSee(__('Erste Schritte'))
->assertSee('0/4 '.__('erledigt'))
->assertSee(__('Profil vervollständigen'))
->assertSee(__('Rechnungsadresse hinterlegen'))
->assertSee(__('Firma zuordnen'))
->assertSee(__('Erste Pressemitteilung erstellen'));
});
test('the first-steps onboarding card reflects completed steps in the counter', function () {
/** @var TestCase $this */
$customer = User::factory()->create(['is_active' => true]);
$customer->assignRole('customer');
Company::factory()->create(['owner_user_id' => $customer->id]);
$this->actingAs($customer);
LivewireVolt::test('customer.dashboard')
->assertSee(__('Erste Schritte'))
->assertSee('1/4 '.__('erledigt'))
->assertSee(__('Erledigt'));
});
test('the first-steps onboarding card disappears once every step is complete', function () {
/** @var TestCase $this */
$customer = User::factory()->create(['is_active' => true]);
$customer->assignRole('customer');
Profile::factory()->create([
'user_id' => $customer->id,
'salutation_key' => 'mr',
'first_name' => 'Test',
'last_name' => 'Customer',
'phone' => '+49 30 1234567',
'address' => 'Teststr. 1',
'country_code' => 'DE',
]);
BillingAddress::query()->create([
'user_id' => $customer->id,
'name' => 'Test Customer GmbH',
'address1' => 'Teststr. 1',
'postal_code' => '10115',
'city' => 'Berlin',
'country_code' => 'DE',
]);
$company = Company::factory()->create(['owner_user_id' => $customer->id]);
PressRelease::factory()->create([
'user_id' => $customer->id,
'company_id' => $company->id,
]);
$this->actingAs($customer);
LivewireVolt::test('customer.dashboard')
->assertDontSee(__('Erste Schritte'));
});
test('press release list and KPI counts render when data exists', function () {
/** @var TestCase $this */
$customer = User::factory()->create(['is_active' => true]);