diff --git a/.agents/skills/volt-development/SKILL.md b/.agents/skills/volt-development/SKILL.md deleted file mode 100644 index b6023bdf..00000000 --- a/.agents/skills/volt-development/SKILL.md +++ /dev/null @@ -1,88 +0,0 @@ ---- -name: volt-development -description: "Develops single-file Livewire components with Volt. Activates when creating Volt components, converting Livewire to Volt, working with @volt directive, functional or class-based Volt APIs; or when the user mentions Volt, single-file components, functional Livewire, or inline component logic in Blade files." -license: MIT -metadata: - author: laravel ---- - -# Volt Development - -## Documentation - -Use `search-docs` for detailed Volt patterns and documentation. - -## Basic Usage - -Create components with `vendor/bin/sail artisan make:volt [name] [--test] [--pest]`. - -Important: Check existing Volt components to determine if they use functional or class-based style before creating new ones. - -### Functional Components - - -```php -@@volt - 0]); - -$increment = fn () => $this->count++; -$double = computed(fn () => $this->count * 2); -?> - -
Powered by Pressekonto
') ->set('portal', Portal::Both->value) @@ -65,7 +65,7 @@ test('global footer code ignores category assignment', function () { ['locale' => 'en', 'name' => 'Tech', 'slug' => 'tech-en'], ]); - LivewireVolt::test('admin.footer-codes.create') + Livewire::test('admin.footer-codes.create') ->set('title', 'Globaler Disclaimer') ->set('content', 'Hinweis
') ->set('isGlobal', true) @@ -80,7 +80,7 @@ test('global footer code ignores category assignment', function () { }); test('footer code create requires title and content', function () { - LivewireVolt::test('admin.footer-codes.create') + Livewire::test('admin.footer-codes.create') ->set('title', '') ->set('content', '') ->call('save') @@ -106,7 +106,7 @@ test('admin can edit and reassign categories of a footer code', function () { ['locale' => 'en', 'name' => 'New', 'slug' => 'new-cat'], ]); - LivewireVolt::test('admin.footer-codes.edit', ['id' => $code->id]) + Livewire::test('admin.footer-codes.edit', ['id' => $code->id]) ->set('title', 'Neu') ->set('content', $code->content) ->set('categoryIds', [$newCategory->id]) @@ -129,7 +129,7 @@ test('toggling global removes category links on save', function () { ]); $code->categories()->sync([$category->id]); - LivewireVolt::test('admin.footer-codes.edit', ['id' => $code->id]) + Livewire::test('admin.footer-codes.edit', ['id' => $code->id]) ->set('content', $code->content) ->set('isGlobal', true) ->call('save') @@ -144,7 +144,7 @@ test('toggling global removes category links on save', function () { test('admin can soft-delete a footer code', function () { $code = FooterCode::factory()->create(); - LivewireVolt::test('admin.footer-codes.edit', ['id' => $code->id]) + Livewire::test('admin.footer-codes.edit', ['id' => $code->id]) ->call('delete') ->assertRedirect(route('admin.footer-codes.index')); @@ -155,7 +155,7 @@ test('admin can soft-delete a footer code', function () { test('admin can toggle footer code activation from index', function () { $code = FooterCode::factory()->create(['is_active' => true]); - LivewireVolt::test('admin.footer-codes.index') + Livewire::test('admin.footer-codes.index') ->call('toggleActive', $code->id); expect($code->fresh()->is_active)->toBeFalse(); diff --git a/tests/Feature/Admin/AdminGrantTest.php b/tests/Feature/Admin/AdminGrantTest.php index 8f12193f..43a8b8bf 100644 --- a/tests/Feature/Admin/AdminGrantTest.php +++ b/tests/Feature/Admin/AdminGrantTest.php @@ -9,7 +9,7 @@ use App\Models\User; use App\Services\Billing\AdminGrantService; use App\Services\Billing\CreditWalletService; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Spatie\Permission\PermissionRegistrar; use Tests\TestCase; @@ -75,7 +75,7 @@ test('the user show page grants credits and free pms through the panel', functio $this->actingAs($admin); // Gutschrift auf das eigene Admin-Konto — der Live-Anwendungsfall. - LivewireVolt::test('admin.users.show', ['id' => $admin->id]) + Livewire::test('admin.users.show', ['id' => $admin->id]) ->set('grantCreditsAmount', 250) ->set('grantCreditsNote', 'Eigenbedarf') ->call('grantCredits') @@ -108,8 +108,8 @@ test('grants are refused once the permission is revoked while the panel stays op $this->actingAs($admin); // Zwei geladene Komponenten (ein 403 verwirft den Livewire-Snapshot). - $credits = LivewireVolt::test('admin.users.show', ['id' => $admin->id]); - $releases = LivewireVolt::test('admin.users.show', ['id' => $admin->id]); + $credits = Livewire::test('admin.users.show', ['id' => $admin->id]); + $releases = Livewire::test('admin.users.show', ['id' => $admin->id]); // Herabstufung, während die Komponenten bereits geladen sind. $admin->syncRoles(['editor']); diff --git a/tests/Feature/Admin/AdminImagesIndexTest.php b/tests/Feature/Admin/AdminImagesIndexTest.php index 2ff61266..f91884bf 100644 --- a/tests/Feature/Admin/AdminImagesIndexTest.php +++ b/tests/Feature/Admin/AdminImagesIndexTest.php @@ -5,7 +5,7 @@ use App\Models\PressRelease; use App\Models\PressReleaseImage; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -38,7 +38,7 @@ test('the images list shows every title image with press release link, confirmat $this->get(route('admin.images.index'))->assertSuccessful(); - LivewireVolt::test('admin.images.index') + Livewire::test('admin.images.index') ->assertSee('Bildliste Testmeldung') ->assertSee(route('admin.press-releases.show', ['id' => $pr->id])) ->assertSee('Foto: Beispiel AG') diff --git a/tests/Feature/Admin/AdminKiCheckTest.php b/tests/Feature/Admin/AdminKiCheckTest.php index fda18312..a186f4b8 100644 --- a/tests/Feature/Admin/AdminKiCheckTest.php +++ b/tests/Feature/Admin/AdminKiCheckTest.php @@ -10,7 +10,7 @@ use App\Services\PressRelease\Classification\ClassificationManager; use App\Services\PressRelease\PressReleaseService; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Facades\Queue; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -26,7 +26,7 @@ test('admin editor exposes the KI check button and modal', function () { /** @var TestCase $this */ $pressRelease = PressRelease::factory()->create(['status' => PressReleaseStatus::Review->value]); - LivewireVolt::test('admin.press-releases.edit', ['id' => $pressRelease->id]) + Livewire::test('admin.press-releases.edit', ['id' => $pressRelease->id]) ->assertSee('Prüfung') ->assertSee('Prüfung im Hintergrund starten'); }); @@ -37,7 +37,7 @@ test('runKiCheck dispatches a non-routing classification job with provider overr $pressRelease = PressRelease::factory()->create(['status' => PressReleaseStatus::Review->value]); - LivewireVolt::test('admin.press-releases.edit', ['id' => $pressRelease->id]) + Livewire::test('admin.press-releases.edit', ['id' => $pressRelease->id]) ->set('kiProvider', 'deterministic') ->call('runKiCheck') ->assertHasNoErrors(); @@ -55,7 +55,7 @@ test('runKiCheck dispatches a scoring job when content score is selected', funct $pressRelease = PressRelease::factory()->create(['status' => PressReleaseStatus::Review->value]); - LivewireVolt::test('admin.press-releases.edit', ['id' => $pressRelease->id]) + Livewire::test('admin.press-releases.edit', ['id' => $pressRelease->id]) ->set('kiRunClassification', false) ->set('kiRunContentScore', true) ->call('runKiCheck') @@ -71,7 +71,7 @@ test('runKiCheck does nothing when no check is selected', function () { $pressRelease = PressRelease::factory()->create(['status' => PressReleaseStatus::Review->value]); - LivewireVolt::test('admin.press-releases.edit', ['id' => $pressRelease->id]) + Livewire::test('admin.press-releases.edit', ['id' => $pressRelease->id]) ->set('kiRunClassification', false) ->call('runKiCheck') ->assertHasNoErrors(); diff --git a/tests/Feature/Admin/AdminLegacyInvoiceArchiveTest.php b/tests/Feature/Admin/AdminLegacyInvoiceArchiveTest.php index 816085df..1a0ae381 100644 --- a/tests/Feature/Admin/AdminLegacyInvoiceArchiveTest.php +++ b/tests/Feature/Admin/AdminLegacyInvoiceArchiveTest.php @@ -3,7 +3,7 @@ use App\Models\LegacyInvoice; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function () { @@ -50,7 +50,7 @@ test('admin sees legacy invoice archive overview with filters and mapping hints' 'imported_at' => now(), ]); - LivewireVolt::test('admin.invoices.index') + Livewire::test('admin.invoices.index') ->assertSee('Legacy-Rechnungsarchiv') ->assertSee('PE-2001') ->assertSee('BP-2002') @@ -96,7 +96,7 @@ test('never-paid hold invoices are hidden by default and can be shown on demand' 'imported_at' => now(), ]); - LivewireVolt::test('admin.invoices.index') + Livewire::test('admin.invoices.index') ->assertSee('BP-REMINDER-3002') ->assertDontSee('BP-HOLD-3001') ->assertSee('1 erledigte hold-Rechnungen') @@ -139,7 +139,7 @@ test('admin opens generated legacy invoice pdf inline', function () { 'imported_at' => now(), ]); - LivewireVolt::test('admin.invoices.index') + Livewire::test('admin.invoices.index') ->assertSee('Öffnen'); $response = $this->get(route('admin.legacy-invoices.pdf', $invoice)); diff --git a/tests/Feature/Admin/AdminPresetManagementTest.php b/tests/Feature/Admin/AdminPresetManagementTest.php index 3c02cc0f..3817d562 100644 --- a/tests/Feature/Admin/AdminPresetManagementTest.php +++ b/tests/Feature/Admin/AdminPresetManagementTest.php @@ -3,7 +3,7 @@ use App\Models\AdminPreset; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; test('admin presets are linked in navigation', function () { @@ -27,7 +27,7 @@ test('admin can create a preset', function () { $admin->assignRole('admin'); $this->actingAs($admin); - LivewireVolt::test('admin.presets.create') + Livewire::test('admin.presets.create') ->set('key', 'press_releases.test_text') ->set('area', 'press_releases') ->set('type', 'text') @@ -62,7 +62,7 @@ test('admin can edit a preset', function () { 'value' => 'Alt', ]); - LivewireVolt::test('admin.presets.edit', ['id' => $preset->id]) + Livewire::test('admin.presets.edit', ['id' => $preset->id]) ->set('label', 'Neuer Text') ->set('value', 'Neu') ->set('isActive', false) diff --git a/tests/Feature/Admin/AdminPressReleaseActionsTest.php b/tests/Feature/Admin/AdminPressReleaseActionsTest.php index b80b59e0..e31f1242 100644 --- a/tests/Feature/Admin/AdminPressReleaseActionsTest.php +++ b/tests/Feature/Admin/AdminPressReleaseActionsTest.php @@ -16,7 +16,7 @@ use App\Services\PressRelease\PressReleaseService; use App\Services\PressRelease\QuotaExceededException; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Facades\Queue; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Spatie\Permission\Models\Role; use Spatie\Permission\PermissionRegistrar; use Tests\TestCase; @@ -35,7 +35,7 @@ test('changeStatus is forbidden without the publish permission', function () { $pressRelease = PressRelease::factory()->create(['status' => PressReleaseStatus::Review->value]); - LivewireVolt::test('admin.press-releases.edit', ['id' => $pressRelease->id]) + Livewire::test('admin.press-releases.edit', ['id' => $pressRelease->id]) ->set('targetStatus', PressReleaseStatus::Published->value) ->call('changeStatus') ->assertForbidden(); @@ -74,7 +74,7 @@ test('publishing without remaining quota shows a warning instead of a 500', func // Kein unbehandelter QuotaExceededException / kein 500: die Komponente fängt // ihn ab und die PM bleibt in Review. - LivewireVolt::test('admin.press-releases.edit', ['id' => $pressRelease->id]) + Livewire::test('admin.press-releases.edit', ['id' => $pressRelease->id]) ->call('publish') ->assertHasNoErrors() ->assertOk(); @@ -104,7 +104,7 @@ test('published press releases are tombstoned instead of soft deleted', function ->published() ->create(['text' => 'Alter veröffentlichter Inhalt.']); - LivewireVolt::test('admin.press-releases.edit', ['id' => $pressRelease->id]) + Livewire::test('admin.press-releases.edit', ['id' => $pressRelease->id]) ->call('deletePressRelease') ->assertRedirect(route('admin.press-releases.index')); @@ -128,7 +128,7 @@ test('unpublished press releases are soft deleted by admin delete action', funct 'status' => PressReleaseStatus::Draft->value, ]); - LivewireVolt::test('admin.press-releases.edit', ['id' => $pressRelease->id]) + Livewire::test('admin.press-releases.edit', ['id' => $pressRelease->id]) ->call('deletePressRelease') ->assertRedirect(route('admin.press-releases.index')); @@ -147,7 +147,7 @@ test('edit page renders status selector and confirmation modal', function () { ->inReview() ->create(); - LivewireVolt::test('admin.press-releases.edit', ['id' => $pressRelease->id]) + Livewire::test('admin.press-releases.edit', ['id' => $pressRelease->id]) ->assertSee('Neuer Status') ->assertSee('Status wechseln') ->assertSee('Status wirklich wechseln?') @@ -166,7 +166,7 @@ test('admin can change archived press release back to another status', function 'status' => PressReleaseStatus::Archived->value, ]); - LivewireVolt::test('admin.press-releases.edit', ['id' => $pressRelease->id]) + Livewire::test('admin.press-releases.edit', ['id' => $pressRelease->id]) ->set('targetStatus', PressReleaseStatus::Draft->value) ->call('changeStatus') ->assertHasNoErrors(); @@ -192,7 +192,7 @@ test('press release index renders confirmation modals for status actions', funct ->published() ->create(['title' => 'Veröffentlichte PM']); - LivewireVolt::test('admin.press-releases.index') + Livewire::test('admin.press-releases.index') ->assertSee('Pressemitteilung veröffentlichen?') ->assertSee('Pressemitteilung ablehnen?') ->assertSee('Pressemitteilung archivieren?'); @@ -218,7 +218,7 @@ test('ai check modal shows classification details from the latest audit', functi 'provider' => 'anthropic', ]); - LivewireVolt::test('admin.press-releases.index') + Livewire::test('admin.press-releases.index') ->call('openAiCheck', $pressRelease->id) ->assertSet('aiCheckId', $pressRelease->id) ->assertSee('Werbliche Sprache im Titel gefunden.') @@ -238,7 +238,7 @@ test('ai check modal shows empty state and start button for unchecked press rele ->inReview() ->create(['classification' => null]); - LivewireVolt::test('admin.press-releases.index') + Livewire::test('admin.press-releases.index') ->call('openAiCheck', $pressRelease->id) ->assertSee('Noch nicht geprüft') ->assertSee('Noch nicht bewertet') @@ -275,7 +275,7 @@ test('ai check modal shows the content score breakdown from the audit raw respon ], ]); - LivewireVolt::test('admin.press-releases.index') + Livewire::test('admin.press-releases.index') ->call('openAiCheck', $pressRelease->id) ->assertSee('Pressestil') ->assertSee('12 / 25') @@ -304,7 +304,7 @@ test('ai check modal explains missing reason for green classifications', functio 'reason' => null, ]); - LivewireVolt::test('admin.press-releases.index') + Livewire::test('admin.press-releases.index') ->call('openAiCheck', $pressRelease->id) ->assertSee('bei Grün liefert die KI keine Begründung'); }); @@ -322,7 +322,7 @@ test('runAiCheck from modal dispatches jobs without routing and marks the run as ->inReview() ->create(['classification' => null]); - LivewireVolt::test('admin.press-releases.index') + Livewire::test('admin.press-releases.index') ->call('openAiCheck', $pressRelease->id) ->assertSet('aiCheckStartedAt', null) ->call('runAiCheck') @@ -344,7 +344,7 @@ test('show page renders confirmation modals for status actions', function () { ->inReview() ->create(); - LivewireVolt::test('admin.press-releases.show', ['id' => $reviewPressRelease->id]) + Livewire::test('admin.press-releases.show', ['id' => $reviewPressRelease->id]) ->assertSee('Pressemitteilung veröffentlichen?') ->assertSee('Pressemitteilung ablehnen?'); @@ -352,7 +352,7 @@ test('show page renders confirmation modals for status actions', function () { ->published() ->create(); - LivewireVolt::test('admin.press-releases.show', ['id' => $publishedPressRelease->id]) + Livewire::test('admin.press-releases.show', ['id' => $publishedPressRelease->id]) ->assertSee('Pressemitteilung archivieren?'); }); @@ -372,7 +372,7 @@ test('show page actions are forbidden without the publish permission', function $pressRelease = PressRelease::factory()->create(['status' => PressReleaseStatus::Review->value]); - $component = LivewireVolt::test('admin.press-releases.show', ['id' => $pressRelease->id]); + $component = Livewire::test('admin.press-releases.show', ['id' => $pressRelease->id]); foreach ($set as $property => $value) { $component->set($property, $value); @@ -404,7 +404,7 @@ test('the manual ai check from the list needs the publish permission because a r $pressRelease = PressRelease::factory()->inReview()->create(); - LivewireVolt::test('admin.press-releases.index') + Livewire::test('admin.press-releases.index') ->call('runAiCheck', $pressRelease->id) ->assertForbidden(); @@ -423,11 +423,11 @@ test('publishing from the show page reports a blocked publish instead of a 500', $this->mock(PressReleaseService::class)->shouldReceive('publish')->twice()->andThrow($exception()); - LivewireVolt::test('admin.press-releases.show', ['id' => $pressRelease->id]) + Livewire::test('admin.press-releases.show', ['id' => $pressRelease->id]) ->call('publish') ->assertOk(); - LivewireVolt::test('admin.press-releases.index') + Livewire::test('admin.press-releases.index') ->call('publish', $pressRelease->id) ->assertOk(); })->with([ diff --git a/tests/Feature/Admin/AdminPressReleaseFormFieldsTest.php b/tests/Feature/Admin/AdminPressReleaseFormFieldsTest.php index 5dc198a3..fd605d14 100644 --- a/tests/Feature/Admin/AdminPressReleaseFormFieldsTest.php +++ b/tests/Feature/Admin/AdminPressReleaseFormFieldsTest.php @@ -6,7 +6,7 @@ use App\Models\Contact; use App\Models\PressRelease; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -31,7 +31,7 @@ test('admin create persistiert subtitle und boilerplate_override', function () { $category = Category::factory()->create(); $this->actingAs($admin); - LivewireVolt::test('admin.press-releases.create') + Livewire::test('admin.press-releases.create') ->set('companyId', $company->id) ->set('portal', $company->portal->value) ->set('categoryId', $category->id) @@ -61,7 +61,7 @@ test('admin create syncht ausgewählten Pressekontakt mit der PM', function () { $category = Category::factory()->create(); $this->actingAs($admin); - LivewireVolt::test('admin.press-releases.create') + Livewire::test('admin.press-releases.create') ->set('companyId', $company->id) ->set('portal', $company->portal->value) ->set('categoryId', $category->id) @@ -87,7 +87,7 @@ test('admin create setzt default-Kontakt beim Firma-Wechsel', function () { ]); $this->actingAs($admin); - LivewireVolt::test('admin.press-releases.create') + Livewire::test('admin.press-releases.create') ->set('companyId', $company->id) ->assertSet('contactId', $contact->id); }); @@ -97,7 +97,7 @@ test('admin create addTag und removeTag schreiben keywords kommagetrennt', funct $admin = makeFieldsAdmin(); $this->actingAs($admin); - $component = LivewireVolt::test('admin.press-releases.create') + $component = Livewire::test('admin.press-releases.create') ->call('addTag', 'Innovation') ->call('addTag', 'Mittelstand') ->call('addTag', 'Innovation') @@ -114,7 +114,7 @@ test('admin create lehnt zu langen Subtitle ab', function () { $category = Category::factory()->create(); $this->actingAs($admin); - LivewireVolt::test('admin.press-releases.create') + Livewire::test('admin.press-releases.create') ->set('companyId', $company->id) ->set('portal', $company->portal->value) ->set('categoryId', $category->id) @@ -144,7 +144,7 @@ test('admin edit hydratisiert subtitle, boilerplate_override und Kontakt', funct $this->actingAs($admin); - LivewireVolt::test('admin.press-releases.edit', ['id' => $pr->id]) + Livewire::test('admin.press-releases.edit', ['id' => $pr->id]) ->assertSet('subtitle', 'Hydrierter Untertitel.') ->assertSet('boilerplateOverride', 'Hydrierte Override-Boilerplate.') ->assertSet('useBoilerplateOverride', true) @@ -163,7 +163,7 @@ test('admin edit wandelt Legacy-Plaintext für den Editor in Absätze', function $this->actingAs($admin); - $component = LivewireVolt::test('admin.press-releases.edit', ['id' => $pr->id]); + $component = Livewire::test('admin.press-releases.edit', ['id' => $pr->id]); $editorText = $component->get('text'); expect($editorText)->toContain('Erster Absatz der Meldung.
') @@ -185,7 +185,7 @@ test('admin edit speichert subtitle, boilerplate_override und Kontakt', function $this->actingAs($admin); - LivewireVolt::test('admin.press-releases.edit', ['id' => $pr->id]) + Livewire::test('admin.press-releases.edit', ['id' => $pr->id]) ->set('subtitle', 'Neuer Untertitel beim Bearbeiten.') ->set('useBoilerplateOverride', true) ->set('boilerplateOverride', 'Neue Override-Boilerplate beim Bearbeiten.') @@ -214,7 +214,7 @@ test('admin edit zeigt Pre-Submit-Check-Berechnungen', function () { $this->actingAs($admin); - LivewireVolt::test('admin.press-releases.edit', ['id' => $pr->id]) + Livewire::test('admin.press-releases.edit', ['id' => $pr->id]) ->assertSee('Pre-Submit-Check') ->assertSee('Titel vorhanden') ->assertSee('Mindestlänge Fließtext erreicht') @@ -231,7 +231,7 @@ test('admin edit zeigt Untertitel-Feld', function () { $this->actingAs($admin); - LivewireVolt::test('admin.press-releases.edit', ['id' => $pr->id]) + Livewire::test('admin.press-releases.edit', ['id' => $pr->id]) ->assertSee('Untertitel') ->assertSee('Themen-Tags'); }); diff --git a/tests/Feature/Admin/AdminPressReleaseSchedulingTest.php b/tests/Feature/Admin/AdminPressReleaseSchedulingTest.php index 280d186b..0de4ed98 100644 --- a/tests/Feature/Admin/AdminPressReleaseSchedulingTest.php +++ b/tests/Feature/Admin/AdminPressReleaseSchedulingTest.php @@ -6,7 +6,7 @@ use App\Models\PressRelease; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Carbon; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -31,7 +31,7 @@ test('admin create form persistiert scheduled_at aus datum und uhrzeit ohne emba $category = Category::factory()->create(); $this->actingAs($admin); - LivewireVolt::test('admin.press-releases.create') + Livewire::test('admin.press-releases.create') ->set('title', 'Admin Scheduled PM') ->set('text', str_repeat('Inhalt eines Tests. ', 5)) ->set('companyId', $company->id) @@ -62,7 +62,7 @@ test('admin create form lehnt scheduled_at in der Vergangenheit ab', function () $category = Category::factory()->create(); $this->actingAs($admin); - LivewireVolt::test('admin.press-releases.create') + Livewire::test('admin.press-releases.create') ->set('title', 'Past Date PM') ->set('text', str_repeat('Inhalt eines Tests. ', 5)) ->set('companyId', $company->id) @@ -87,7 +87,7 @@ test('admin edit hydriert scheduled_at in datum und uhrzeit ohne embargo', funct 'embargo_at' => '2026-06-10 08:00:00', ]); - LivewireVolt::test('admin.press-releases.edit', ['id' => $pr->id]) + Livewire::test('admin.press-releases.edit', ['id' => $pr->id]) ->assertSet('publishMode', 'scheduled') ->assertSet('scheduledAt', '2026-06-05T14:30') ->assertSet('scheduledDate', '2026-06-05') @@ -108,7 +108,7 @@ test('admin edit persistiert scheduled_at aus datum und uhrzeit ohne embargo', f 'embargo_at' => null, ]); - LivewireVolt::test('admin.press-releases.edit', ['id' => $pr->id]) + Livewire::test('admin.press-releases.edit', ['id' => $pr->id]) ->set('publishMode', 'scheduled') ->set('scheduledDate', '2026-06-08') ->set('scheduledTime', '09:00') @@ -136,7 +136,7 @@ test('admin publishMode now clears scheduled_at on save', function () { 'embargo_at' => '2026-06-10 08:00:00', ]); - LivewireVolt::test('admin.press-releases.edit', ['id' => $pr->id]) + Livewire::test('admin.press-releases.edit', ['id' => $pr->id]) ->set('publishMode', 'now') ->set('useEmbargo', false) ->call('save') diff --git a/tests/Feature/Admin/AdminPressReleaseShowTest.php b/tests/Feature/Admin/AdminPressReleaseShowTest.php index 8bb8ad95..5af487b7 100644 --- a/tests/Feature/Admin/AdminPressReleaseShowTest.php +++ b/tests/Feature/Admin/AdminPressReleaseShowTest.php @@ -7,7 +7,7 @@ use App\Models\PressRelease; use App\Models\PressReleaseStatusLog; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -41,7 +41,7 @@ test('admin show rendert Rejection-Banner mit letzter Begründung', function () 'created_at' => now(), ]); - LivewireVolt::test('admin.press-releases.show', ['id' => $pr->id]) + Livewire::test('admin.press-releases.show', ['id' => $pr->id]) ->assertSee('Diese Pressemitteilung wurde abgelehnt') ->assertSee('Werbliche Sprache, bitte überarbeiten.'); }); @@ -68,7 +68,7 @@ test('admin show zeigt zugeordnete Pressekontakte', function () { $pr = PressRelease::factory()->create(['company_id' => $company->id]); $pr->contacts()->sync([$contact->id]); - LivewireVolt::test('admin.press-releases.show', ['id' => $pr->id]) + Livewire::test('admin.press-releases.show', ['id' => $pr->id]) ->assertSee('Firma & Pressekontakte') ->assertSee('Muster GmbH') ->assertSee('firma@example.test') @@ -87,7 +87,7 @@ test('admin show zeigt Hinweis bei fehlenden Kontakten', function () { $pr = PressRelease::factory()->create(); - LivewireVolt::test('admin.press-releases.show', ['id' => $pr->id]) + Livewire::test('admin.press-releases.show', ['id' => $pr->id]) ->assertSee('Dieser Pressemitteilung ist kein Pressekontakt zugeordnet.'); }); @@ -102,7 +102,7 @@ test('admin show zeigt Scheduling-Termin im Review-Workflow', function () { ]); // Die App läuft in Europe/Berlin; 10:00 wird unverändert angezeigt. - LivewireVolt::test('admin.press-releases.show', ['id' => $pr->id]) + Livewire::test('admin.press-releases.show', ['id' => $pr->id]) ->assertSee('Geplante Veröffentlichung') ->assertSee('15.06.2026 10:00'); }); @@ -118,7 +118,7 @@ test('admin show zeigt Embargo-Info im Published-Workflow', function () { 'embargo_at' => now()->addDays(10), ]); - LivewireVolt::test('admin.press-releases.show', ['id' => $pr->id]) + Livewire::test('admin.press-releases.show', ['id' => $pr->id]) ->assertSee('Sperrfrist bis'); }); @@ -138,7 +138,7 @@ test('admin show verlinkt Firma, Autor und Firmen-Benutzer', function () { 'user_id' => $author->id, ]); - LivewireVolt::test('admin.press-releases.show', ['id' => $pr->id]) + Livewire::test('admin.press-releases.show', ['id' => $pr->id]) ->assertSee('Benutzer mit Zugriff') ->assertSee('Carl Co-Editor') ->assertSeeHtml(route('admin.companies.show', $company->id)) @@ -154,6 +154,6 @@ test('admin show zeigt Autor im Status-Verlauf-Grid', function () { $author = User::factory()->create(['name' => 'Anna Autorin']); $pr = PressRelease::factory()->create(['user_id' => $author->id]); - LivewireVolt::test('admin.press-releases.show', ['id' => $pr->id]) + Livewire::test('admin.press-releases.show', ['id' => $pr->id]) ->assertSee('Anna Autorin'); }); diff --git a/tests/Feature/Admin/AdminPrivilegeEscalationTest.php b/tests/Feature/Admin/AdminPrivilegeEscalationTest.php index 1887bea2..80dbeeaa 100644 --- a/tests/Feature/Admin/AdminPrivilegeEscalationTest.php +++ b/tests/Feature/Admin/AdminPrivilegeEscalationTest.php @@ -2,7 +2,7 @@ use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; /** @@ -56,7 +56,7 @@ test('editor cannot mutate roles via the roles component', function () { $this->actingAs($editor); - LivewireVolt::test('admin.roles.create')->assertForbidden(); + Livewire::test('admin.roles.create')->assertForbidden(); }); test('non super admin cannot elevate a user to super admin', function () { @@ -69,7 +69,7 @@ test('non super admin cannot elevate a user to super admin', function () { $this->actingAs($admin); - LivewireVolt::test('admin.users.edit', ['id' => $target->id]) + Livewire::test('admin.users.edit', ['id' => $target->id]) ->set('name', 'Ziel Benutzer') ->set('email', 'target@example.com') ->set('selectedRoles', ['customer']) @@ -89,7 +89,7 @@ test('super admin can elevate a user to super admin', function () { $this->actingAs($superAdmin); - LivewireVolt::test('admin.users.edit', ['id' => $target->id]) + Livewire::test('admin.users.edit', ['id' => $target->id]) ->set('name', 'Ziel Benutzer') ->set('email', 'target@example.com') ->set('selectedRoles', ['customer']) diff --git a/tests/Feature/Admin/AdminSlowRequestReportTest.php b/tests/Feature/Admin/AdminSlowRequestReportTest.php index 069a7b1d..e7dae120 100644 --- a/tests/Feature/Admin/AdminSlowRequestReportTest.php +++ b/tests/Feature/Admin/AdminSlowRequestReportTest.php @@ -4,7 +4,7 @@ use App\Models\User; use App\Services\Admin\AdminSlowRequestReporter; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Facades\File; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; test('slow admin reporter parses and aggregates slow request logs', function () { @@ -57,7 +57,7 @@ test('admin slow request report page renders filters and report data', function $admin->assignRole('admin'); $this->actingAs($admin); - LivewireVolt::test('admin.reports.slow-requests') + Livewire::test('admin.reports.slow-requests') ->assertSee('Performance Reports') ->assertSee('Top Routen') ->assertSee('EXPLAIN Top Slow Queries') diff --git a/tests/Feature/Admin/CategoryIndexPerformanceTest.php b/tests/Feature/Admin/CategoryIndexPerformanceTest.php index 7d392413..85eebb2a 100644 --- a/tests/Feature/Admin/CategoryIndexPerformanceTest.php +++ b/tests/Feature/Admin/CategoryIndexPerformanceTest.php @@ -6,7 +6,7 @@ use App\Models\Company; use App\Models\PressRelease; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; test('category index loads release counts without hydrating press release models', function () { @@ -37,7 +37,7 @@ test('category index loads release counts without hydrating press release models 'portal' => Portal::Businessportal24->value, ]); - LivewireVolt::test('admin.categories.index') + Livewire::test('admin.categories.index') ->assertSee(route('admin.press-releases.index', ['category' => $category->id]), false) ->assertViewHas('stats', fn (array $stats): bool => $stats['with_releases'] === 1 && $stats['total_releases'] === 3 @@ -96,7 +96,7 @@ test('press release index can be filtered by category and shows category column' 'title' => 'Andere Pressemitteilung', ]); - LivewireVolt::test('admin.press-releases.index') + Livewire::test('admin.press-releases.index') ->set('categoryFilter', (string) $selectedCategory->id) ->assertSee('Kategorie') ->assertSee('Wirtschaft') diff --git a/tests/Feature/Admin/CompanyLogoReplacementTest.php b/tests/Feature/Admin/CompanyLogoReplacementTest.php index 3a1cc27e..7ee7a0eb 100644 --- a/tests/Feature/Admin/CompanyLogoReplacementTest.php +++ b/tests/Feature/Admin/CompanyLogoReplacementTest.php @@ -7,7 +7,7 @@ use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Filesystem\FilesystemAdapter; use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Storage; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; /** @@ -63,7 +63,7 @@ test('a failed logo write in the admin form keeps the previous logo and reports $admin = User::factory()->create(['is_active' => true]); $admin->assignRole('admin'); - LivewireVolt::actingAs($admin) + Livewire::actingAs($admin) ->test('admin.companies.edit', ['id' => $company->id]) ->set('logo', UploadedFile::fake()->image('neu.png', 400, 400)) ->call('update') @@ -91,7 +91,7 @@ test('a successful logo replacement in the admin form removes the previous files $admin = User::factory()->create(['is_active' => true]); $admin->assignRole('admin'); - LivewireVolt::actingAs($admin) + Livewire::actingAs($admin) ->test('admin.companies.edit', ['id' => $company->id]) ->set('logo', UploadedFile::fake()->image('neu.png', 400, 400)) ->call('update') diff --git a/tests/Feature/Admin/CompanyPortalRestrictionTest.php b/tests/Feature/Admin/CompanyPortalRestrictionTest.php index 49dd1bda..b7896858 100644 --- a/tests/Feature/Admin/CompanyPortalRestrictionTest.php +++ b/tests/Feature/Admin/CompanyPortalRestrictionTest.php @@ -4,7 +4,7 @@ use App\Enums\Portal; use App\Models\Company; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -24,7 +24,7 @@ test('Admin-Anlage lehnt Portal Both ab', function () { /** @var TestCase $this */ $this->actingAs(makeAdminForPortalRestriction()); - LivewireVolt::test('admin.companies.create') + Livewire::test('admin.companies.create') ->set('company_name', 'Beide Portale GmbH') ->set('email', 'kontakt@beide.de') ->set('portal', Portal::Both->value) @@ -39,7 +39,7 @@ test('Admin-Anlage bietet Beide Portale nicht an und legt Firma mit Einzelportal /** @var TestCase $this */ $this->actingAs(makeAdminForPortalRestriction()); - LivewireVolt::test('admin.companies.create') + Livewire::test('admin.companies.create') ->assertDontSeeText(Portal::Both->label()) ->set('company_name', 'Einzelportal GmbH') ->set('email', 'kontakt@einzel.de') @@ -58,7 +58,7 @@ test('Admin-Bearbeitung lehnt Wechsel auf Portal Both ab', function () { $company = Company::factory()->presseecho()->create(); - LivewireVolt::test('admin.companies.edit', ['id' => $company->id]) + Livewire::test('admin.companies.edit', ['id' => $company->id]) ->assertDontSeeText(Portal::Both->label()) ->set('portal', Portal::Both->value) ->call('update') @@ -73,7 +73,7 @@ test('Admin-Bearbeitung erlaubt Bestandsfirmen mit Portal Both den Wert zu behal $company = Company::factory()->create(['portal' => Portal::Both->value]); - LivewireVolt::test('admin.companies.edit', ['id' => $company->id]) + Livewire::test('admin.companies.edit', ['id' => $company->id]) ->assertSeeText(Portal::Both->label()) ->set('company_name', $company->name) ->call('update') @@ -88,7 +88,7 @@ test('Admin-Bearbeitung erlaubt Bestandsfirmen den Wechsel von Both auf ein Einz $company = Company::factory()->create(['portal' => Portal::Both->value]); - LivewireVolt::test('admin.companies.edit', ['id' => $company->id]) + Livewire::test('admin.companies.edit', ['id' => $company->id]) ->set('portal', Portal::Presseecho->value) ->call('update') ->assertHasNoErrors(); diff --git a/tests/Feature/Admin/ContactMessagesAdminTest.php b/tests/Feature/Admin/ContactMessagesAdminTest.php index e23eda81..a10ac030 100644 --- a/tests/Feature/Admin/ContactMessagesAdminTest.php +++ b/tests/Feature/Admin/ContactMessagesAdminTest.php @@ -5,7 +5,7 @@ use App\Enums\ContactMessageTopic; use App\Models\ContactMessage; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function () { @@ -29,7 +29,7 @@ test('the contact queue lists open contact messages', function () { 'email' => 'bernd@example.test', ]); - Volt::actingAs(contactMessagesAdmin()) + Livewire::actingAs(contactMessagesAdmin()) ->test('admin.contact-messages.index') ->assertOk() ->assertSee('KT-'.$message->id) @@ -41,7 +41,7 @@ test('the contact queue lists open contact messages', function () { test('resolved contact messages are hidden from the default open view', function () { ContactMessage::factory()->resolved()->create(['name' => 'Erledigte Person']); - Volt::actingAs(contactMessagesAdmin()) + Livewire::actingAs(contactMessagesAdmin()) ->test('admin.contact-messages.index') ->assertOk() ->assertDontSee('Erledigte Person'); @@ -51,7 +51,7 @@ test('the contact queue can be filtered by topic', function () { ContactMessage::factory()->topic(ContactMessageTopic::Feedback)->create(['name' => 'Frieda Feedback']); ContactMessage::factory()->topic(ContactMessageTopic::BugReport)->create(['name' => 'Bernd Bug']); - Volt::actingAs(contactMessagesAdmin()) + Livewire::actingAs(contactMessagesAdmin()) ->test('admin.contact-messages.index') ->set('topicFilter', 'feedback') ->assertSee('Frieda Feedback') @@ -62,7 +62,7 @@ test('an admin can resolve a contact message with a note', function () { $admin = contactMessagesAdmin(); $message = ContactMessage::factory()->create(); - Volt::actingAs($admin) + Livewire::actingAs($admin) ->test('admin.contact-messages.show', ['id' => $message->id]) ->set('adminNote', 'Per E-Mail beantwortet.') ->call('resolve') @@ -79,7 +79,7 @@ test('an admin can resolve a contact message with a note', function () { test('an admin can reopen a resolved contact message', function () { $message = ContactMessage::factory()->resolved()->create(); - Volt::actingAs(contactMessagesAdmin()) + Livewire::actingAs(contactMessagesAdmin()) ->test('admin.contact-messages.show', ['id' => $message->id]) ->call('reopen') ->assertOk(); diff --git a/tests/Feature/Admin/EditorPermissionBoundaryTest.php b/tests/Feature/Admin/EditorPermissionBoundaryTest.php index 0385df3c..880f6a34 100644 --- a/tests/Feature/Admin/EditorPermissionBoundaryTest.php +++ b/tests/Feature/Admin/EditorPermissionBoundaryTest.php @@ -6,7 +6,7 @@ use App\Models\Company; use App\Models\Contact; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; /** @@ -72,7 +72,7 @@ test('editor cannot delete a contact from the index', function () { $this->actingAs(editorActor()); - LivewireVolt::test('admin.contacts.index') + Livewire::test('admin.contacts.index') ->call('deleteContactFromIndex', $contact->id) ->assertForbidden(); @@ -83,23 +83,23 @@ test('editor cannot invoke admin-only livewire actions directly', function () { /** @var TestCase $this */ $this->actingAs(editorActor()); - LivewireVolt::test('admin.categories.create') + Livewire::test('admin.categories.create') ->call('save') ->assertForbidden(); - LivewireVolt::test('admin.footer-codes.create') + Livewire::test('admin.footer-codes.create') ->call('save') ->assertForbidden(); - LivewireVolt::test('admin.payments.index') + Livewire::test('admin.payments.index') ->call('cancelBundle', 999_999) ->assertForbidden(); - LivewireVolt::test('admin.legal-requests.index') + Livewire::test('admin.legal-requests.index') ->call('resolveWithdrawal', 999_999) ->assertForbidden(); - LivewireVolt::test('admin.press-releases.index') + Livewire::test('admin.press-releases.index') ->set('legacyApiAiReview', true) ->assertForbidden(); diff --git a/tests/Feature/Admin/NewsletterCampaignTest.php b/tests/Feature/Admin/NewsletterCampaignTest.php index ba3a7280..5ddde408 100644 --- a/tests/Feature/Admin/NewsletterCampaignTest.php +++ b/tests/Feature/Admin/NewsletterCampaignTest.php @@ -20,7 +20,7 @@ use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Facades\Mail; use Illuminate\Support\Facades\Queue; use Illuminate\Support\Facades\URL; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; // Versand ist standardmäßig gesperrt (E9-Schalter, Umsetzungsaudit @@ -173,7 +173,7 @@ test('the campaign editor stores the exclusion filter in the snapshot', function 'status' => NewsletterCampaignStatus::Sent->value, ]); - LivewireVolt::test('admin.newsletter.campaigns.edit') + Livewire::test('admin.newsletter.campaigns.edit') ->set('subject', 'Follow-up an die noch nicht Erreichten') ->set('body', 'Nachfassen.
') ->set('filterExcludeCampaign', (string) $earlier->id) @@ -184,7 +184,7 @@ test('the campaign editor stores the exclusion filter in the snapshot', function expect($draft->filters['exclude_campaign_id'])->toBe($earlier->id); // Beim erneuten Öffnen ist die Auswahl vorbelegt. - LivewireVolt::test('admin.newsletter.campaigns.edit', ['id' => $draft->id]) + Livewire::test('admin.newsletter.campaigns.edit', ['id' => $draft->id]) ->assertSet('filterExcludeCampaign', (string) $earlier->id); }); @@ -208,7 +208,7 @@ test('the unsubscribes page lists newsletter opt-outs with their date', function ->assertDontSee('Dabei Doris'); // Suche grenzt die Liste ein. - LivewireVolt::test('admin.newsletter.unsubscribes') + Livewire::test('admin.newsletter.unsubscribes') ->assertSee('Abgemeldet Anna') ->set('search', $optedOut->email) ->assertSee('Abgemeldet Anna') @@ -356,7 +356,7 @@ test('the campaign editor saves drafts and sends via the queue', function () { User::factory()->create(['portal' => Portal::Presseecho, 'last_login_at' => now()->subMonth()]); - LivewireVolt::test('admin.newsletter.campaigns.edit') + Livewire::test('admin.newsletter.campaigns.edit') ->set('subject', 'Willkommen auf der neuen Plattform') ->set('body', 'Es gibt Neuigkeiten.
') ->call('saveDraft') @@ -366,7 +366,7 @@ test('the campaign editor saves drafts and sends via the queue', function () { expect($campaign->isDraft())->toBeTrue() ->and($campaign->created_by_user_id)->toBe($admin->id); - LivewireVolt::test('admin.newsletter.campaigns.edit', ['id' => $campaign->id]) + Livewire::test('admin.newsletter.campaigns.edit', ['id' => $campaign->id]) ->call('send') ->assertHasNoErrors(); @@ -413,7 +413,7 @@ test('with sending disabled a campaign cannot be started anywhere', function () expect(fn () => app(CampaignSender::class)->start($campaign))->toThrow(NewsletterSendingDisabledException::class); - LivewireVolt::test('admin.newsletter.campaigns.edit', ['id' => $campaign->id]) + Livewire::test('admin.newsletter.campaigns.edit', ['id' => $campaign->id]) ->assertSee('Der Newsletter-Versand ist derzeit gesperrt') ->call('send') ->assertNoRedirect(); diff --git a/tests/Feature/Admin/RoleManagementTest.php b/tests/Feature/Admin/RoleManagementTest.php index 5068dcea..13462cde 100644 --- a/tests/Feature/Admin/RoleManagementTest.php +++ b/tests/Feature/Admin/RoleManagementTest.php @@ -2,7 +2,7 @@ use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Spatie\Permission\Models\Role; use Tests\TestCase; @@ -14,7 +14,7 @@ test('admin can create a role with permissions', function () { $admin->assignRole('admin'); $this->actingAs($admin); - LivewireVolt::test('admin.roles.create') + Livewire::test('admin.roles.create') ->set('name', 'support') ->set('permissions', ['users:manage', 'roles:manage']) ->call('save') @@ -40,7 +40,7 @@ test('admin can edit a role with cached permission options', function () { 'guard_name' => 'web', ]); - LivewireVolt::test('admin.roles.edit', ['id' => $role->id]) + Livewire::test('admin.roles.edit', ['id' => $role->id]) ->assertSee('roles:manage') ->set('name', 'review-lead') ->set('permissions', ['press-releases:read']) diff --git a/tests/Feature/Admin/TerminationRequestsAdminTest.php b/tests/Feature/Admin/TerminationRequestsAdminTest.php index 792a02dc..b867588e 100644 --- a/tests/Feature/Admin/TerminationRequestsAdminTest.php +++ b/tests/Feature/Admin/TerminationRequestsAdminTest.php @@ -3,7 +3,7 @@ use App\Models\TerminationRequest; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function () { @@ -27,7 +27,7 @@ test('the legal queue lists open termination requests', function () { 'reason' => 'Wiederholte Störung der Leistung.', ]); - Volt::actingAs(terminationAdmin()) + Livewire::actingAs(terminationAdmin()) ->test('admin.legal-requests.index') ->assertOk() ->assertSee('Kündigungen') @@ -41,7 +41,7 @@ test('the legal queue lists open termination requests', function () { test('an admin can resolve a termination request', function () { $termination = TerminationRequest::factory()->create(); - Volt::actingAs(terminationAdmin()) + Livewire::actingAs(terminationAdmin()) ->test('admin.legal-requests.index') ->call('resolveTermination', $termination->id) ->assertOk(); @@ -55,7 +55,7 @@ test('an admin can resolve a termination request', function () { test('an admin can reopen a resolved termination request', function () { $termination = TerminationRequest::factory()->resolved()->create(); - Volt::actingAs(terminationAdmin()) + Livewire::actingAs(terminationAdmin()) ->test('admin.legal-requests.index') ->set('terminationStatusFilter', 'all') ->call('reopenTermination', $termination->id) @@ -70,7 +70,7 @@ test('an admin can reopen a resolved termination request', function () { test('resolved terminations are hidden from the default open view', function () { TerminationRequest::factory()->resolved()->create(['name' => 'Erledigte Kündigung']); - Volt::actingAs(terminationAdmin()) + Livewire::actingAs(terminationAdmin()) ->test('admin.legal-requests.index') ->assertOk() ->assertDontSee('Erledigte Kündigung'); diff --git a/tests/Feature/Admin/UserImpersonationTest.php b/tests/Feature/Admin/UserImpersonationTest.php index 9093e0d5..4eb3dfb7 100644 --- a/tests/Feature/Admin/UserImpersonationTest.php +++ b/tests/Feature/Admin/UserImpersonationTest.php @@ -3,7 +3,7 @@ use App\Actions\Admin\UserImpersonation; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; test('admin can impersonate a customer from user management', function () { @@ -21,7 +21,7 @@ test('admin can impersonate a customer from user management', function () { $this->actingAs($admin); - LivewireVolt::test('admin.users') + Livewire::test('admin.users') ->assertSee('Login als User') ->call('loginAsUser', $customer->id) ->assertRedirect(route('me.dashboard')); @@ -72,7 +72,7 @@ test('admin can impersonate accounts with admin access', function () { $this->actingAs($admin); - LivewireVolt::test('admin.users') + Livewire::test('admin.users') ->set('search', 'target-admin@example.com') ->call('loginAsUser', $targetAdmin->id) ->assertRedirect(route('me.dashboard')); @@ -84,7 +84,7 @@ test('admin can impersonate accounts with admin access', function () { $this->actingAs($admin); session()->forget(UserImpersonation::SessionKey); - LivewireVolt::test('admin.users') + Livewire::test('admin.users') ->set('search', 'target-editor@example.com') ->call('loginAsUser', $targetEditor->id) ->assertRedirect(route('me.dashboard')); @@ -108,7 +108,7 @@ test('non super admin cannot impersonate a super admin', function () { $this->actingAs($admin); - LivewireVolt::test('admin.users') + Livewire::test('admin.users') ->set('search', 'super@example.com') ->call('loginAsUser', $superAdmin->id) ->assertForbidden(); @@ -131,7 +131,7 @@ test('super admin can impersonate another super admin', function () { $this->actingAs($superAdmin); - LivewireVolt::test('admin.users') + Livewire::test('admin.users') ->set('search', 'target-super@example.com') ->call('loginAsUser', $targetSuperAdmin->id) ->assertRedirect(route('me.dashboard')); diff --git a/tests/Feature/Admin/UserManagementTest.php b/tests/Feature/Admin/UserManagementTest.php index 413282fe..d9ddb6ef 100644 --- a/tests/Feature/Admin/UserManagementTest.php +++ b/tests/Feature/Admin/UserManagementTest.php @@ -9,7 +9,7 @@ use App\Models\UserFilterPreset; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Support\Facades\Storage; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; test('admin can update user roles companies contacts and billing address', function () { @@ -58,7 +58,7 @@ test('admin can update user roles companies contacts and billing address', funct $this->actingAs($admin); - LivewireVolt::test('admin.users.edit', ['id' => $targetUser->id]) + Livewire::test('admin.users.edit', ['id' => $targetUser->id]) ->set('name', 'Neu Benutzer') ->set('email', 'neu-user@example.com') ->set('profile.salutation_key', 'mrs') @@ -159,7 +159,7 @@ test('admin user edit keeps empty profile date fields empty', function () { $this->actingAs($admin); - LivewireVolt::test('admin.users.edit', ['id' => $targetUser->id]) + Livewire::test('admin.users.edit', ['id' => $targetUser->id]) ->assertSee('Geburtsdatum') ->assertSee('Validierungsdatum') ->assertSee('Vertragsdatum') @@ -194,7 +194,7 @@ test('admin can create user with roles companies and optional billing address', $this->actingAs($admin); - LivewireVolt::test('admin.users.create') + Livewire::test('admin.users.create') ->set('name', 'Neuer User') ->set('email', 'new-user@example.com') ->set('selectedRoles', ['customer']) @@ -253,7 +253,7 @@ test('admin can link companies and contacts in user edit via live lookup flow', $this->actingAs($admin); - LivewireVolt::test('admin.users.edit', ['id' => $user->id]) + Livewire::test('admin.users.edit', ['id' => $user->id]) ->set('companyLookup', 'Alpha') ->set('selectedLookupCompanyId', $companyA->id) ->call('addLinkedCompany') @@ -299,7 +299,7 @@ test('removing linked company in user edit is persisted immediately', function ( $this->actingAs($admin); - LivewireVolt::test('admin.users.edit', ['id' => $user->id]) + Livewire::test('admin.users.edit', ['id' => $user->id]) ->call('removeLinkedCompany', $companyB->id) ->assertHasNoErrors(); @@ -332,7 +332,7 @@ test('contact lookup in user edit finds results from unlinked companies and auto $this->actingAs($admin); - LivewireVolt::test('admin.users.edit', ['id' => $user->id]) + Livewire::test('admin.users.edit', ['id' => $user->id]) ->set('contactLookup', 'Sophie') ->assertViewHas('contactLookupResults', fn ($results) => $results->pluck('id')->contains($contact->id)) ->set('selectedLookupContactId', $contact->id) @@ -361,7 +361,7 @@ test('adding linked company in user edit is persisted immediately', function () $this->actingAs($admin); - LivewireVolt::test('admin.users.edit', ['id' => $user->id]) + Livewire::test('admin.users.edit', ['id' => $user->id]) ->set('companyLookup', 'Instant Add') ->set('selectedLookupCompanyId', $company->id) ->call('addLinkedCompany') @@ -405,7 +405,7 @@ test('removing linked contact in user edit is persisted immediately', function ( $this->actingAs($admin); - LivewireVolt::test('admin.users.edit', ['id' => $user->id]) + Livewire::test('admin.users.edit', ['id' => $user->id]) ->call('removeLinkedContact', $contactB->id) ->assertHasNoErrors(); @@ -452,7 +452,7 @@ test('admin can view user detail page with linked company and billing data', fun $this->actingAs($admin); - LivewireVolt::test('admin.users.show', ['id' => $targetUser->id]) + Livewire::test('admin.users.show', ['id' => $targetUser->id]) ->assertSee('Detail User') ->assertSee('Show GmbH') ->assertSee('Lisa Kontakt') @@ -506,7 +506,7 @@ test('admin can open user details modal from users index and see company link st $this->actingAs($admin); - LivewireVolt::test('admin.users') + Livewire::test('admin.users') ->set('search', 'modal-user@example.com') ->assertSee('modal-user@example.com') ->assertSee('1 Firma') @@ -529,7 +529,7 @@ test('admin can open user details modal from users index and see company link st ->assertSee('status=published', false) ->assertSee('user='.$targetUser->id, false); - LivewireVolt::test('admin.press-releases.index') + Livewire::test('admin.press-releases.index') ->assertViewHas('userLookupResults', fn ($results) => $results->isEmpty()) ->assertViewHas('companyLookupResults', fn ($results) => $results->isEmpty()) ->assertViewHas('contactLookupResults', fn ($results) => $results->isEmpty()) @@ -577,7 +577,7 @@ test('admin users index free text search matches names and email parts', functio $this->actingAs($admin); - LivewireVolt::test('admin.users') + Livewire::test('admin.users') ->set('search', 'Seabstian') ->assertSee('info@connectar.de') ->assertDontSee('barbara@example.com') @@ -606,7 +606,7 @@ test('admin users index uses full count pagination', function () { $this->actingAs($admin); - LivewireVolt::test('admin.users') + Livewire::test('admin.users') ->assertViewHas('users', fn ($users): bool => $users instanceof LengthAwarePaginator && $users->perPage() === 50 && $users->total() === 52 @@ -669,7 +669,7 @@ test('admin users index supports workflow filters and quality badges', function $this->actingAs($admin); - LivewireVolt::test('admin.users') + Livewire::test('admin.users') ->assertSee('Alle Datenstände') ->assertSee('Mit Pressemitteilungen') ->assertSee('Mit veröffentlichten PMs') @@ -713,7 +713,7 @@ test('admin can create and edit contacts via admin contact forms', function () { $this->actingAs($admin); - LivewireVolt::test('admin.contacts.create') + Livewire::test('admin.contacts.create') ->set('companyId', $company->id) ->set('portal', 'businessportal24') ->set('salutationKey', 'mr') @@ -729,7 +729,7 @@ test('admin can create and edit contacts via admin contact forms', function () { expect($contact->company_id)->toBe($company->id); expect($contact->first_name)->toBe('Paul'); - LivewireVolt::test('admin.contacts.edit', ['id' => $contact->id]) + Livewire::test('admin.contacts.edit', ['id' => $contact->id]) ->assertSee('Businessportal24') ->set('firstName', 'Paula') ->set('responsibility', 'Leitung PR') @@ -740,7 +740,7 @@ test('admin can create and edit contacts via admin contact forms', function () { expect($contact->first_name)->toBe('Paula'); expect($contact->responsibility)->toBe('Leitung PR'); - LivewireVolt::test('admin.contacts.edit', ['id' => $contact->id]) + Livewire::test('admin.contacts.edit', ['id' => $contact->id]) ->call('deleteContact') ->assertRedirect(route('admin.contacts.index')); @@ -762,7 +762,7 @@ test('company contact create route prefills company in contact form', function ( $this->actingAs($admin); - LivewireVolt::test('admin.contacts.create', ['companyId' => $company->id]) + Livewire::test('admin.contacts.create', ['companyId' => $company->id]) ->assertSet('companyId', $company->id) ->assertSet('isCompanyPrefilled', true); }); @@ -796,7 +796,7 @@ test('admin can filter contacts in company detail contacts tab', function () { $this->actingAs($admin); - LivewireVolt::test('admin.companies.show', ['id' => $company->id]) + Livewire::test('admin.companies.show', ['id' => $company->id]) ->assertSee('Businessportal24') ->set('activeTab', 'contacts') ->set('contactSearch', 'anna') @@ -847,7 +847,7 @@ test('admin can live-search and assign existing contacts in company detail with $this->actingAs($admin); - LivewireVolt::test('admin.companies.show', ['id' => $targetCompany->id]) + Livewire::test('admin.companies.show', ['id' => $targetCompany->id]) ->set('activeTab', 'contacts') ->set('contactLookup', 'Limit') ->assertViewHas('contactLookupResults', fn ($results) => $results->count() === 45) // 45 Treffer, Limit 50 @@ -895,7 +895,7 @@ test('admin can filter contacts index by portal and see company quick-jump link' $this->actingAs($admin); - LivewireVolt::test('admin.contacts.index') + Livewire::test('admin.contacts.index') ->assertSee('Portal') ->set('portalFilter', 'presseecho') ->assertSee('Paula Echo') @@ -947,7 +947,7 @@ test('admin contacts index shows press release counts and supports entity filter $this->actingAs($admin); - LivewireVolt::test('admin.contacts.index') + Livewire::test('admin.contacts.index') ->assertSee('Klara') ->assertSee('1 PMs') ->assertSee(route('admin.press-releases.index', ['contact' => $contactWithPressRelease->id]), false) @@ -998,7 +998,7 @@ test('admin can soft delete contact directly from contacts index flow', function $this->actingAs($admin); - LivewireVolt::test('admin.contacts.index') + Livewire::test('admin.contacts.index') ->call('deleteContactFromIndex', $contact->id) ->assertHasNoErrors(); @@ -1054,7 +1054,7 @@ test('admin companies index shows relation counts and supports entity filters', $this->actingAs($admin); $legacyLogoUrl = asset('storage/businessportal24/company/legacy-logo.png'); - LivewireVolt::test('admin.companies.index') + Livewire::test('admin.companies.index') ->assertSee('Portal') ->assertSee('Alle Portale') ->assertSee('Firmen PM Zaehler GmbH') @@ -1091,10 +1091,10 @@ test('admin companies index shows relation counts and supports entity filters', ->assertSet('contactFilter', 'all') ->assertSet('contactLookup', ''); - LivewireVolt::test('admin.companies.show', ['id' => $companyWithData->id]) + Livewire::test('admin.companies.show', ['id' => $companyWithData->id]) ->assertSee($legacyLogoUrl, false); - LivewireVolt::test('admin.companies.edit', ['id' => $companyWithData->id]) + Livewire::test('admin.companies.edit', ['id' => $companyWithData->id]) ->assertSet('current_logo_url', $legacyLogoUrl); }); @@ -1121,7 +1121,7 @@ test('admin can save apply and delete contact filter presets', function () { $this->actingAs($admin); - LivewireVolt::test('admin.contacts.index') + Livewire::test('admin.contacts.index') ->set('search', 'preset') ->set('companyFilter', (string) $presseechoCompany->id) ->set('portalFilter', 'presseecho') @@ -1135,7 +1135,7 @@ test('admin can save apply and delete contact filter presets', function () { ->where('name', 'Nur Presseecho Kontakte') ->firstOrFail(); - LivewireVolt::test('admin.contacts.index') + Livewire::test('admin.contacts.index') ->set('selectedPresetId', $preset->id) ->call('applyPreset') ->assertSet('search', 'preset') @@ -1161,7 +1161,7 @@ test('admin can set default preset and it is auto-applied on contacts index load $this->actingAs($admin); - LivewireVolt::test('admin.contacts.index') + Livewire::test('admin.contacts.index') ->set('search', 'default') ->set('companyFilter', (string) $presseechoCompany->id) ->set('portalFilter', 'presseecho') @@ -1175,7 +1175,7 @@ test('admin can set default preset and it is auto-applied on contacts index load ->where('name', 'Default Kontakte') ->firstOrFail(); - LivewireVolt::test('admin.contacts.index') + Livewire::test('admin.contacts.index') ->set('selectedPresetId', $preset->id) ->call('setDefaultPreset') ->assertHasNoErrors(); @@ -1183,7 +1183,7 @@ test('admin can set default preset and it is auto-applied on contacts index load $preset->refresh(); expect($preset->is_default)->toBeTrue(); - LivewireVolt::test('admin.contacts.index') + Livewire::test('admin.contacts.index') ->assertSet('selectedPresetId', $preset->id) ->assertSet('search', 'default') ->assertSet('companyFilter', (string) $presseechoCompany->id) @@ -1223,7 +1223,7 @@ test('applying a preset updates last used timestamp and affects ordering', funct $this->actingAs($admin); - LivewireVolt::test('admin.contacts.index') + Livewire::test('admin.contacts.index') ->set('selectedPresetId', $firstPreset->id) ->call('applyPreset') ->assertHasNoErrors(); @@ -1242,7 +1242,7 @@ test('admin can create and edit company with persisted data', function () { $this->actingAs($admin); - LivewireVolt::test('admin.companies.create') + Livewire::test('admin.companies.create') ->set('portal', 'presseecho') ->set('company_name', 'Persist GmbH') ->set('email', 'info@persist-gmbh.de') @@ -1262,7 +1262,7 @@ test('admin can create and edit company with persisted data', function () { expect($company->email)->toBe('info@persist-gmbh.de'); expect($company->address)->toContain('Testweg 12'); - LivewireVolt::test('admin.companies.edit', ['id' => $company->id]) + Livewire::test('admin.companies.edit', ['id' => $company->id]) ->set('company_name', 'Persist GmbH Updated') ->set('portal', 'businessportal24') ->set('email', 'office@persist-gmbh.de') @@ -1303,7 +1303,7 @@ test('admin can soft delete company from edit flow', function () { $this->actingAs($admin); - LivewireVolt::test('admin.companies.edit', ['id' => $company->id]) + Livewire::test('admin.companies.edit', ['id' => $company->id]) ->call('deleteCompany') ->assertRedirect(route('admin.companies.index')); diff --git a/tests/Feature/Admin/WithdrawalRequestsAdminTest.php b/tests/Feature/Admin/WithdrawalRequestsAdminTest.php index 25f44442..14110cf4 100644 --- a/tests/Feature/Admin/WithdrawalRequestsAdminTest.php +++ b/tests/Feature/Admin/WithdrawalRequestsAdminTest.php @@ -3,7 +3,7 @@ use App\Models\User; use App\Models\WithdrawalRequest; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function () { @@ -26,7 +26,7 @@ test('the legal queue lists open withdrawal requests', function () { 'order_reference' => 'STR-2026-0042', ]); - Volt::actingAs(withdrawalAdmin()) + Livewire::actingAs(withdrawalAdmin()) ->test('admin.legal-requests.index') ->assertOk() ->assertSee('Widerrufe') @@ -39,7 +39,7 @@ test('the legal queue lists open withdrawal requests', function () { test('an admin can resolve a withdrawal request', function () { $withdrawal = WithdrawalRequest::factory()->create(); - Volt::actingAs(withdrawalAdmin()) + Livewire::actingAs(withdrawalAdmin()) ->test('admin.legal-requests.index') ->call('resolveWithdrawal', $withdrawal->id) ->assertOk(); @@ -53,7 +53,7 @@ test('an admin can resolve a withdrawal request', function () { test('an admin can reopen a resolved withdrawal request', function () { $withdrawal = WithdrawalRequest::factory()->resolved()->create(); - Volt::actingAs(withdrawalAdmin()) + Livewire::actingAs(withdrawalAdmin()) ->test('admin.legal-requests.index') ->set('withdrawalStatusFilter', 'all') ->call('reopenWithdrawal', $withdrawal->id) @@ -68,7 +68,7 @@ test('an admin can reopen a resolved withdrawal request', function () { test('resolved withdrawals are hidden from the default open view', function () { WithdrawalRequest::factory()->resolved()->create(['name' => 'Erledigte Person']); - Volt::actingAs(withdrawalAdmin()) + Livewire::actingAs(withdrawalAdmin()) ->test('admin.legal-requests.index') ->assertOk() ->assertDontSee('Erledigte Person'); diff --git a/tests/Feature/Auth/AuthenticationTest.php b/tests/Feature/Auth/AuthenticationTest.php index 5e461110..2f3105a8 100644 --- a/tests/Feature/Auth/AuthenticationTest.php +++ b/tests/Feature/Auth/AuthenticationTest.php @@ -2,7 +2,7 @@ use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; test('login screen can be rendered', function () { @@ -33,7 +33,7 @@ test('users can authenticate using the login screen', function () { // User auf '/', nicht mehr auf /dashboard. $user = User::factory()->superAdmin()->create(); - $response = LivewireVolt::test('auth.login') + $response = Livewire::test('auth.login') ->set('email', $user->email) ->set('password', 'password') ->call('login'); @@ -52,7 +52,7 @@ test('unverified users are redirected to the verification notice on login', func /** @var TestCase $this */ $user = User::factory()->unverified()->create(['is_active' => false]); - LivewireVolt::test('auth.login') + Livewire::test('auth.login') ->set('email', $user->email) ->set('password', 'password') ->call('login') @@ -66,7 +66,7 @@ test('users can not authenticate with invalid password', function () { /** @var TestCase $this */ $user = User::factory()->create(); - $response = LivewireVolt::test('auth.login') + $response = Livewire::test('auth.login') ->set('email', $user->email) ->set('password', 'wrong-password') ->call('login'); @@ -108,7 +108,7 @@ test('a customer login with a stale intended admin url is redirected to the cust session()->put('url.intended', url('/admin/users')); - LivewireVolt::test('auth.login') + Livewire::test('auth.login') ->set('email', $customer->email) ->set('password', 'password') ->call('login') @@ -123,7 +123,7 @@ test('an inactive but verified user cannot log in with a password', function () // Factory ist standardmäßig verifiziert; nur deaktiviert. $user = User::factory()->create(['is_active' => false]); - LivewireVolt::test('auth.login') + Livewire::test('auth.login') ->set('email', $user->email) ->set('password', 'password') ->call('login') diff --git a/tests/Feature/Auth/ContactAccessTest.php b/tests/Feature/Auth/ContactAccessTest.php index 2586eea0..2cad1324 100644 --- a/tests/Feature/Auth/ContactAccessTest.php +++ b/tests/Feature/Auth/ContactAccessTest.php @@ -11,7 +11,7 @@ use App\Services\Auth\ContactAccessService; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Facades\Mail; use Illuminate\Support\Facades\URL; -use Livewire\Volt\Volt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function () { @@ -90,7 +90,7 @@ test('the magic link form responds neutrally and triggers the service for a cont 'portal' => $company->portal->value, ]); - Volt::test('auth.magic-link') + Livewire::test('auth.magic-link') ->set('email', 'form@example.test') ->call('requestLink') ->assertHasNoErrors() @@ -107,7 +107,7 @@ test('the magic link form sends a link to an existing active user without a cont $user = User::factory()->create(['email' => 'plain@example.test', 'is_active' => true]); $user->assignRole('customer'); - Volt::test('auth.magic-link') + Livewire::test('auth.magic-link') ->set('email', 'plain@example.test') ->call('requestLink') ->assertHasNoErrors() @@ -149,7 +149,7 @@ test('a later-added company with the same email is linked on the next password l expect($user->accessibleCompanyIds())->not->toContain($company->id); - Volt::test('auth.login') + Livewire::test('auth.login') ->set('email', 'sync@example.test') ->set('password', 'password') ->call('login') @@ -285,7 +285,7 @@ test('the honeypot blocks bots without creating an account', function () { 'portal' => $company->portal->value, ]); - Volt::test('auth.magic-link') + Livewire::test('auth.magic-link') ->set('email', 'bot-target@example.test') ->set('website', 'http://spam.example') ->call('requestLink') @@ -306,7 +306,7 @@ test('an unverified email earns no company membership on password login (Audit F $company = Company::factory()->presseecho()->create(['email' => 'fremd@example.test']); Contact::factory()->for($company)->create(['email' => 'fremd@example.test', 'portal' => $company->portal->value]); - Volt::test('auth.login') + Livewire::test('auth.login') ->set('email', 'fremd@example.test') ->set('password', 'password') ->call('login') @@ -344,7 +344,7 @@ test('an auto-granted responsible role is removed on the next login once the ema $company = Company::factory()->presseecho()->create(['email' => 'wechsel@example.test']); - Volt::test('auth.login')->set('email', 'wechsel@example.test')->set('password', 'password')->call('login')->assertHasNoErrors(); + Livewire::test('auth.login')->set('email', 'wechsel@example.test')->set('password', 'password')->call('login')->assertHasNoErrors(); $pivot = $user->fresh()->companies()->withoutGlobalScopes()->whereKey($company->id)->first()->pivot; expect($pivot->role)->toBe('responsible') @@ -355,7 +355,7 @@ test('an auto-granted responsible role is removed on the next login once the ema $company->forceFill(['email' => 'nachfolger@example.test'])->save(); auth()->logout(); - Volt::test('auth.login')->set('email', 'wechsel@example.test')->set('password', 'password')->call('login')->assertHasNoErrors(); + Livewire::test('auth.login')->set('email', 'wechsel@example.test')->set('password', 'password')->call('login')->assertHasNoErrors(); $fresh = User::query()->findOrFail($user->id); expect($fresh->companies()->withoutGlobalScopes()->whereKey($company->id)->exists())->toBeFalse() @@ -374,7 +374,7 @@ test('after the email basis is gone a non-author can no longer edit or correct t $published = PressRelease::factory()->published()->forPortal(Portal::Presseecho)->for($company)->create(['user_id' => $author->id]); $own = PressRelease::factory()->forPortal(Portal::Presseecho)->for($company)->create(['user_id' => $colleague->id, 'status' => PressReleaseStatus::Draft]); - Volt::test('auth.login')->set('email', 'kollege@example.test')->set('password', 'password')->call('login')->assertHasNoErrors(); + Livewire::test('auth.login')->set('email', 'kollege@example.test')->set('password', 'password')->call('login')->assertHasNoErrors(); $linked = User::query()->findOrFail($colleague->id); expect($linked->can('update', $draft))->toBeTrue() @@ -384,7 +384,7 @@ test('after the email basis is gone a non-author can no longer edit or correct t $company->forceFill(['email' => 'nachfolger@example.test'])->save(); auth()->logout(); - Volt::test('auth.login')->set('email', 'kollege@example.test')->set('password', 'password')->call('login')->assertHasNoErrors(); + Livewire::test('auth.login')->set('email', 'kollege@example.test')->set('password', 'password')->call('login')->assertHasNoErrors(); $gone = User::query()->findOrFail($colleague->id); expect($gone->can('update', $draft))->toBeFalse() @@ -396,7 +396,7 @@ test('after the email basis is gone a non-author can no longer edit or correct t // Die Korrektur-Action der Kundenseite hängt an `view` und findet die PM nicht mehr. $this->actingAs($gone); // Seit Livewire 4.4.7 als 404-Antwort statt geworfener ModelNotFoundException. - Volt::test('customer.press-releases.show', ['id' => $published->id])->assertNotFound(); + Livewire::test('customer.press-releases.show', ['id' => $published->id])->assertNotFound(); }); test('an automatically upgraded manual membership falls back to member instead of being removed (E7)', function () { @@ -426,7 +426,7 @@ test('a manually granted responsible role survives the login sync without an ema expect($user->companies()->withoutGlobalScopes()->whereKey($company->id)->first()->pivot->granted_via)->toBe('manual'); - Volt::test('auth.login')->set('email', 'manuell@example.test')->set('password', 'password')->call('login')->assertHasNoErrors(); + Livewire::test('auth.login')->set('email', 'manuell@example.test')->set('password', 'password')->call('login')->assertHasNoErrors(); expect(User::query()->findOrFail($user->id)->can('update', $company))->toBeTrue(); }); @@ -455,7 +455,7 @@ test('a company email stored with capitals still links the lowercase account on $user->assignRole('customer'); $company = Company::factory()->presseecho()->create(['email' => 'Gross@Example.test']); - Volt::test('auth.login')->set('email', 'gross@example.test')->set('password', 'password')->call('login')->assertHasNoErrors(); + Livewire::test('auth.login')->set('email', 'gross@example.test')->set('password', 'password')->call('login')->assertHasNoErrors(); expect(User::query()->findOrFail($user->id)->accessibleCompanyIds())->toContain($company->id); }); @@ -468,7 +468,7 @@ test('a confirmed email change re-syncs company rights immediately (Audit 7.1)', $oldCompany = Company::factory()->presseecho()->create(['email' => 'alt@example.test']); $newCompany = Company::factory()->presseecho()->create(['email' => 'neu@example.test']); - Volt::test('auth.login')->set('email', 'alt@example.test')->set('password', 'password')->call('login')->assertHasNoErrors(); + Livewire::test('auth.login')->set('email', 'alt@example.test')->set('password', 'password')->call('login')->assertHasNoErrors(); expect($user->fresh()->can('update', $oldCompany))->toBeTrue(); $user->forceFill(['pending_email' => 'neu@example.test'])->save(); diff --git a/tests/Feature/Auth/FailedLoginActivityTest.php b/tests/Feature/Auth/FailedLoginActivityTest.php index 7f5d7b05..b80ae8a9 100644 --- a/tests/Feature/Auth/FailedLoginActivityTest.php +++ b/tests/Feature/Auth/FailedLoginActivityTest.php @@ -3,7 +3,7 @@ use App\Enums\ActivityType; use App\Models\ActivityEvent; use App\Models\User; -use Livewire\Volt\Volt; +use Livewire\Livewire; use PragmaRX\Google2FA\Google2FA; /** @@ -18,7 +18,7 @@ function failedLoginEvents(ActivityType $type) test('a wrong password is recorded with the account and the reason', function () { $user = User::factory()->create(['email' => 'kunde@example.com']); - Volt::test('auth.login') + Livewire::test('auth.login') ->set('email', 'kunde@example.com') ->set('password', 'falsches-passwort') ->call('login') @@ -38,7 +38,7 @@ test('an account without password is told apart from an unknown address', functi User::factory()->create(['email' => 'legacy@example.com', 'password' => null]); foreach (['legacy@example.com', 'niemand@example.com'] as $email) { - Volt::test('auth.login')->set('email', $email)->set('password', 'irgendwas')->call('login'); + Livewire::test('auth.login')->set('email', $email)->set('password', 'irgendwas')->call('login'); } $events = failedLoginEvents(ActivityType::LoginFailed); @@ -52,7 +52,7 @@ test('a lockout is recorded for the targeted account', function () { $user = User::factory()->create(['email' => 'kunde@example.com']); foreach (range(1, 6) as $attempt) { - Volt::test('auth.login')->set('email', 'kunde@example.com')->set('password', 'falsch')->call('login'); + Livewire::test('auth.login')->set('email', 'kunde@example.com')->set('password', 'falsch')->call('login'); } $lockout = failedLoginEvents(ActivityType::LoginLockout)->sole(); diff --git a/tests/Feature/Auth/GoogleLoginTest.php b/tests/Feature/Auth/GoogleLoginTest.php index 707feb1b..c059bc58 100644 --- a/tests/Feature/Auth/GoogleLoginTest.php +++ b/tests/Feature/Auth/GoogleLoginTest.php @@ -7,7 +7,7 @@ use Illuminate\Support\Facades\Hash; use Laravel\Socialite\Contracts\Provider; use Laravel\Socialite\Facades\Socialite; use Laravel\Socialite\Two\User as SocialiteUser; -use Livewire\Volt\Volt; +use Livewire\Livewire; use PragmaRX\Google2FA\Google2FA; use Tests\TestCase; @@ -171,7 +171,7 @@ test('a pre-registered account is no longer reachable with the old password, tok $this->assertGuest(); // Und das alte Passwort führt nicht mehr hinein. - Volt::test('auth.login') + Livewire::test('auth.login') ->set('email', 'pressestelle@firma.test') ->set('password', 'attacker-secret') ->call('login') diff --git a/tests/Feature/Auth/LoginCompletionTest.php b/tests/Feature/Auth/LoginCompletionTest.php index 31b13aa1..7cfeeace 100644 --- a/tests/Feature/Auth/LoginCompletionTest.php +++ b/tests/Feature/Auth/LoginCompletionTest.php @@ -10,7 +10,7 @@ use Database\Seeders\RolesAndPermissionsSeeder; use Laravel\Socialite\Contracts\Provider; use Laravel\Socialite\Facades\Socialite; use Laravel\Socialite\Two\User as SocialiteUser; -use Livewire\Volt\Volt; +use Livewire\Livewire; use PragmaRX\Google2FA\Google2FA; use Tests\TestCase; @@ -74,7 +74,7 @@ test('the password login records the last login also after the two-factor challe /** @var TestCase $this */ ['user' => $user, 'secret' => $secret] = loginCompletionCustomer(twoFactor: true); - Volt::test('auth.login') + Livewire::test('auth.login') ->set('email', $user->email) ->set('password', 'password') ->call('login') diff --git a/tests/Feature/Auth/MagicLinkLoginTest.php b/tests/Feature/Auth/MagicLinkLoginTest.php index ed6f406c..f44854fd 100644 --- a/tests/Feature/Auth/MagicLinkLoginTest.php +++ b/tests/Feature/Auth/MagicLinkLoginTest.php @@ -5,7 +5,7 @@ use App\Models\MagicLink; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Facades\Mail; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use PragmaRX\Google2FA\Google2FA; use Tests\TestCase; @@ -13,7 +13,7 @@ test('user can request a magic login link from the magic-link page', function () Mail::fake(); $user = User::factory()->create(['is_active' => true]); - LivewireVolt::test('auth.magic-link') + Livewire::test('auth.magic-link') ->set('email', $user->email) ->call('requestLink') ->assertHasNoErrors(); @@ -33,7 +33,7 @@ test('the magic link form validates its email field and clears on success', func $user = User::factory()->create(['is_active' => true]); // Leere Eingabe → Validierungsfehler, keine Mail. - LivewireVolt::test('auth.magic-link') + Livewire::test('auth.magic-link') ->set('email', '') ->call('requestLink') ->assertHasErrors(['email']); @@ -41,7 +41,7 @@ test('the magic link form validates its email field and clears on success', func Mail::assertNothingOutgoing(); // Gültige Eingabe → Feld wird geleert. - LivewireVolt::test('auth.magic-link') + Livewire::test('auth.magic-link') ->set('email', $user->email) ->call('requestLink') ->assertHasNoErrors() @@ -54,13 +54,13 @@ test('magic link requests are rate limited per email', function () { $user = User::factory()->create(['is_active' => true]); foreach (range(1, 3) as $ignored) { - LivewireVolt::test('auth.magic-link') + Livewire::test('auth.magic-link') ->set('email', $user->email) ->call('requestLink') ->assertHasNoErrors(); } - LivewireVolt::test('auth.magic-link') + Livewire::test('auth.magic-link') ->set('email', $user->email) ->call('requestLink') ->assertHasErrors(['email']); @@ -75,7 +75,7 @@ test('admin can login with a valid magic link and lands on admin dashboard', fun $user = User::factory()->create(['is_active' => true]); $user->assignRole('admin'); - LivewireVolt::test('auth.magic-link') + Livewire::test('auth.magic-link') ->set('email', $user->email) ->call('requestLink'); @@ -107,7 +107,7 @@ test('customer is redirected to me dashboard after magic link login', function ( $customer = User::factory()->create(['is_active' => true]); $customer->assignRole('customer'); - LivewireVolt::test('auth.magic-link') + Livewire::test('auth.magic-link') ->set('email', $customer->email) ->call('requestLink'); diff --git a/tests/Feature/Auth/PasswordConfirmationTest.php b/tests/Feature/Auth/PasswordConfirmationTest.php index ce5762ac..27fa4670 100644 --- a/tests/Feature/Auth/PasswordConfirmationTest.php +++ b/tests/Feature/Auth/PasswordConfirmationTest.php @@ -1,7 +1,7 @@ create(); @@ -16,7 +16,7 @@ test('password can be confirmed', function () { $this->actingAs($user); - $response = Volt::test('auth.confirm-password') + $response = Livewire::test('auth.confirm-password') ->set('password', 'password') ->call('confirmPassword'); @@ -30,7 +30,7 @@ test('password is not confirmed with invalid password', function () { $this->actingAs($user); - $response = Volt::test('auth.confirm-password') + $response = Livewire::test('auth.confirm-password') ->set('password', 'wrong-password') ->call('confirmPassword'); diff --git a/tests/Feature/Auth/PasswordResetTest.php b/tests/Feature/Auth/PasswordResetTest.php index 0d974078..a351f13c 100644 --- a/tests/Feature/Auth/PasswordResetTest.php +++ b/tests/Feature/Auth/PasswordResetTest.php @@ -3,7 +3,7 @@ use App\Models\User; use Illuminate\Auth\Notifications\ResetPassword; use Illuminate\Support\Facades\Notification; -use Livewire\Volt\Volt; +use Livewire\Livewire; test('reset password link screen can be rendered', function () { $response = $this->get('/forgot-password'); @@ -16,7 +16,7 @@ test('reset password link can be requested', function () { $user = User::factory()->create(); - Volt::test('auth.forgot-password') + Livewire::test('auth.forgot-password') ->set('email', $user->email) ->call('sendPasswordResetLink'); @@ -28,7 +28,7 @@ test('reset password screen can be rendered', function () { $user = User::factory()->create(); - Volt::test('auth.forgot-password') + Livewire::test('auth.forgot-password') ->set('email', $user->email) ->call('sendPasswordResetLink'); @@ -46,12 +46,12 @@ test('password can be reset with valid token', function () { $user = User::factory()->create(); - Volt::test('auth.forgot-password') + Livewire::test('auth.forgot-password') ->set('email', $user->email) ->call('sendPasswordResetLink'); Notification::assertSentTo($user, ResetPassword::class, function ($notification) use ($user) { - $response = Volt::test('auth.reset-password', ['token' => $notification->token]) + $response = Livewire::test('auth.reset-password', ['token' => $notification->token]) ->set('email', $user->email) ->set('password', 'password') ->set('password_confirmation', 'password') diff --git a/tests/Feature/Auth/RegistrationTest.php b/tests/Feature/Auth/RegistrationTest.php index 040264f3..9b6215d7 100644 --- a/tests/Feature/Auth/RegistrationTest.php +++ b/tests/Feature/Auth/RegistrationTest.php @@ -4,7 +4,7 @@ use App\Enums\RegistrationType; use App\Models\User; use Illuminate\Auth\Notifications\VerifyEmail; use Illuminate\Support\Facades\Notification; -use Livewire\Volt\Volt; +use Livewire\Livewire; use Tests\TestCase; test('registration screen can be rendered', function () { @@ -22,7 +22,7 @@ test('new users register inactive and are sent to the verification notice', func /** @var TestCase $this */ Notification::fake(); - Volt::test('auth.register') + Livewire::test('auth.register') ->set('name', 'Test User') ->set('email', 'test@example.com') ->set('password', 'password') @@ -52,7 +52,7 @@ test('new users register inactive and are sent to the verification notice', func test('registration requires accepting the terms', function () { /** @var TestCase $this */ - Volt::test('auth.register') + Livewire::test('auth.register') ->set('name', 'Test User') ->set('email', 'terms@example.com') ->set('password', 'password') diff --git a/tests/Feature/Auth/TwoFactorLoginTest.php b/tests/Feature/Auth/TwoFactorLoginTest.php index f98e71ca..465b47f8 100644 --- a/tests/Feature/Auth/TwoFactorLoginTest.php +++ b/tests/Feature/Auth/TwoFactorLoginTest.php @@ -2,7 +2,7 @@ use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt; +use Livewire\Livewire; use PragmaRX\Google2FA\Google2FA; use Tests\TestCase; @@ -23,7 +23,7 @@ test('a user with two-factor enabled is handed to the challenge, not logged in', $user = User::factory()->create(['is_active' => true]); enableTwoFactor($user); - Volt::test('auth.login') + Livewire::test('auth.login') ->set('email', $user->email) ->set('password', 'password') ->call('login') @@ -47,7 +47,7 @@ test('an unconfirmed two-factor setup does not trigger the challenge', function 'two_factor_confirmed_at' => null, ])->save(); - Volt::test('auth.login') + Livewire::test('auth.login') ->set('email', $user->email) ->set('password', 'password') ->call('login') diff --git a/tests/Feature/Billing/AdminPaymentsPageTest.php b/tests/Feature/Billing/AdminPaymentsPageTest.php index 5665af30..2e66498a 100644 --- a/tests/Feature/Billing/AdminPaymentsPageTest.php +++ b/tests/Feature/Billing/AdminPaymentsPageTest.php @@ -14,7 +14,7 @@ use App\Models\User; use App\Models\UserPaymentOption; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Facades\Mail; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -42,7 +42,7 @@ test('the payments page shows subscriptions with plan name and mrr', function () $this->actingAs(paymentsPageAdmin()); - LivewireVolt::test('admin.payments.index') + Livewire::test('admin.payments.index') ->assertSee('Aktive Abos') ->assertSee('MRR (netto)') ->assertSee('49,00 €') @@ -64,7 +64,7 @@ test('a yearly subscription contributes one twelfth to the mrr', function () { $this->actingAs(paymentsPageAdmin()); - LivewireVolt::test('admin.payments.index') + Livewire::test('admin.payments.index') ->assertSee('40,83 €') ->assertSee('jährlich'); }); @@ -76,7 +76,7 @@ test('single purchases appear with type and status', function () { $this->actingAs(paymentsPageAdmin()); - LivewireVolt::test('admin.payments.index') + Livewire::test('admin.payments.index') ->assertSee('Einzel Käufer') ->assertSee('Einzel-Pressemitteilung') ->assertSee('Bezahlt') @@ -103,7 +103,7 @@ test('local invoices appear with number and circle badge', function () { $this->actingAs(paymentsPageAdmin()); // Default ist der Bearbeitungsstapel (offene MAN-Rechnungen) … - LivewireVolt::test('admin.payments.index') + Livewire::test('admin.payments.index') ->assertSee('MAN-2026-000007') ->assertSee('Manuell (MAN)') ->assertDontSee('STR-2026-000042') @@ -131,7 +131,7 @@ test('paid invoices of the last 30 days are summed as revenue', function () { $this->actingAs(paymentsPageAdmin()); - LivewireVolt::test('admin.payments.index') + Livewire::test('admin.payments.index') ->assertSee('Umsatz 30 Tage') ->assertSee('119,00 €') ->assertDontSee('1.118,00 €'); @@ -146,7 +146,7 @@ test('the search filters all panels by user name or email', function () { $this->actingAs(paymentsPageAdmin()); - LivewireVolt::test('admin.payments.index') + Livewire::test('admin.payments.index') ->set('search', 'Maria') ->assertSee('Maria Treffer') ->assertDontSee('Olaf Anders'); @@ -204,7 +204,7 @@ test('an unsent MAN invoice offers send, paid and terminate; sending mails the c $this->actingAs(paymentsPageAdmin()); - LivewireVolt::test('admin.payments.index') + Livewire::test('admin.payments.index') ->assertSee('Offene MAN-Rechnungen') ->assertSee('MAN-00021') ->assertSee('noch nicht gesendet') @@ -228,7 +228,7 @@ test('a sent MAN invoice can be reminded and marked as paid with a payment date' $this->actingAs(paymentsPageAdmin()); - LivewireVolt::test('admin.payments.index') + Livewire::test('admin.payments.index') ->assertSee('Überfällig') ->call('remindInvoice', $invoice->id) ->assertSet('notificationType', 'success') @@ -252,7 +252,7 @@ test('a future payment date is rejected by validation', function () { $this->actingAs(paymentsPageAdmin()); - LivewireVolt::test('admin.payments.index') + Livewire::test('admin.payments.index') ->set('paidAtInput', 'kein-datum') ->call('markInvoicePaid', $invoice->id) ->assertHasErrors(['paidAtInput']); @@ -267,7 +267,7 @@ test('terminating from the page voids the invoice, cancels the bundle and honour $this->actingAs(paymentsPageAdmin()); - LivewireVolt::test('admin.payments.index') + Livewire::test('admin.payments.index') ->assertSee('Ulla Überweisung') ->set('terminateNotify', false) ->set('terminateNote', 'Nicht erreichbar.') @@ -290,7 +290,7 @@ test('service refusals surface as an error notification instead of an exception' $this->actingAs(paymentsPageAdmin()); - LivewireVolt::test('admin.payments.index') + Livewire::test('admin.payments.index') ->call('remindInvoice', $invoice->id) ->assertSet('notificationType', 'error') ->assertSee('noch nicht versendet'); @@ -314,7 +314,7 @@ test('due agreements the daily run could not invoice are listed as blocked and c $this->actingAs(paymentsPageAdmin()); - $page = LivewireVolt::test('admin.payments.index') + $page = Livewire::test('admin.payments.index') ->assertSee('Blockierte Vereinbarungen') ->assertSee('Bianca Blockiert') ->assertSee('Keine Rechnungsadresse') @@ -349,7 +349,7 @@ test('a blocked agreement can be removed without invoicing', function () { $this->actingAs(paymentsPageAdmin()); - LivewireVolt::test('admin.payments.index') + Livewire::test('admin.payments.index') ->assertSee('Blockierte Vereinbarungen') ->assertSee('Rita Rückläufer') ->assertSee('Entfernen') diff --git a/tests/Feature/Billing/AdminPlansPageTest.php b/tests/Feature/Billing/AdminPlansPageTest.php index 3de928f6..228b6e2a 100644 --- a/tests/Feature/Billing/AdminPlansPageTest.php +++ b/tests/Feature/Billing/AdminPlansPageTest.php @@ -4,7 +4,7 @@ use App\Models\Plan; use App\Models\User; use App\Services\Billing\StripePlanSyncService; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -36,7 +36,7 @@ test('the plans page lists active and inactive plans with prices', function () { $this->actingAs(plansPageAdmin()); - LivewireVolt::test('admin.payments.plans') + Livewire::test('admin.payments.plans') ->assertSee('Tarife & Pakete') ->assertSee('Business') ->assertSee('49,00 €') @@ -54,7 +54,7 @@ test('a plan without stripe ids is marked as unsynced', function () { $this->actingAs(plansPageAdmin()); - LivewireVolt::test('admin.payments.plans') + Livewire::test('admin.payments.plans') ->assertSee('nicht synchronisiert'); }); @@ -80,7 +80,7 @@ test('saving a plan updates the local record and triggers the stripe sync', func $this->actingAs(plansPageAdmin()); - LivewireVolt::test('admin.payments.plans') + Livewire::test('admin.payments.plans') ->call('edit', $plan->id) ->set('name', 'Business Plus') ->set('monthlyPrice', '59,00') @@ -119,7 +119,7 @@ test('saving a plan persists the benefits line by line', function () { $this->actingAs(plansPageAdmin()); - LivewireVolt::test('admin.payments.plans') + Livewire::test('admin.payments.plans') ->call('edit', $plan->id) ->set('benefits', "Erster Vorteil\n\n Zweiter Vorteil \nDritter Vorteil") ->call('save') @@ -135,7 +135,7 @@ test('editing a plan preloads its benefits as newline text', function () { $this->actingAs(plansPageAdmin()); - LivewireVolt::test('admin.payments.plans') + Livewire::test('admin.payments.plans') ->call('edit', $plan->id) ->assertSet('benefits', "Vorteil eins\nVorteil zwei"); }); @@ -155,7 +155,7 @@ test('saving without a price change shows the plain success message', function ( $this->actingAs(plansPageAdmin()); - LivewireVolt::test('admin.payments.plans') + Livewire::test('admin.payments.plans') ->call('edit', $plan->id) ->set('quota', '5') ->set('dailyLimit', '') @@ -180,7 +180,7 @@ test('invalid prices are rejected with validation errors', function () { $this->actingAs(plansPageAdmin()); - LivewireVolt::test('admin.payments.plans') + Livewire::test('admin.payments.plans') ->call('edit', $plan->id) ->set('monthlyPrice', '-5') ->set('quota', 'abc') diff --git a/tests/Feature/Billing/BookingsPageTest.php b/tests/Feature/Billing/BookingsPageTest.php index d1921005..31093686 100644 --- a/tests/Feature/Billing/BookingsPageTest.php +++ b/tests/Feature/Billing/BookingsPageTest.php @@ -16,7 +16,7 @@ use App\Services\Billing\SubscriptionPeriodResolver; use Database\Seeders\LegalDocumentSeeder; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Carbon; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -57,7 +57,7 @@ test('the bookings page renders the active plans with checkout links', function BillingAddress::factory()->create(['user_id' => $user->id]); $this->actingAs($user); - LivewireVolt::test('customer.bookings') + Livewire::test('customer.bookings') ->assertSee('Business') ->assertSee('49 €') ->assertSee('490 €') @@ -86,7 +86,7 @@ test('the plan card renders the maintained benefits list', function () { BillingAddress::factory()->create(['user_id' => $user->id]); $this->actingAs($user); - LivewireVolt::test('customer.bookings') + Livewire::test('customer.bookings') ->assertSee('Günstigere Extra-Pressemitteilungen') ->assertSee('Boost-Platzierung vergünstigt'); }); @@ -99,7 +99,7 @@ test('the single pm block links to its checkout', function () { BillingAddress::factory()->create(['user_id' => $user->id]); $this->actingAs($user); - LivewireVolt::test('customer.bookings') + Livewire::test('customer.bookings') ->assertSee('Einzel-Pressemitteilung — ohne Abo') ->assertSee('19 €') ->call('selectBooking', 'single_pm') @@ -113,7 +113,7 @@ test('without any booking the current tariff card is hidden', function () { /** @var TestCase $this */ $this->actingAs(bookingsTestCustomer()); - LivewireVolt::test('customer.bookings') + Livewire::test('customer.bookings') ->assertDontSee('Aktueller Tarif') ->assertSee('Den passenden Tarif wählen') ->assertSee('Noch kein Buchungsverlauf'); @@ -131,7 +131,7 @@ test('a subscriber sees the current plan and the manage button', function () { $this->actingAs($user); - LivewireVolt::test('customer.bookings') + Livewire::test('customer.bookings') ->assertSee('Ihr aktueller Tarif') ->assertSee('Abo verwalten') ->assertSee('Pressemitteilungen pro Monat') @@ -156,7 +156,7 @@ test('a grandfathered legacy user sees the bestandsschutz package with portal an $this->actingAs($user); - LivewireVolt::test('customer.bookings') + Livewire::test('customer.bookings') ->assertSee('Ihr Bestandsschutz') ->assertSee('Bestandsschutz') ->assertSee('Presseverteiler Premium') @@ -184,7 +184,7 @@ test('open and consumed single purchases appear in the card and history', functi $this->actingAs($user); - LivewireVolt::test('customer.bookings') + Livewire::test('customer.bookings') ->assertSee('Einzel-Pressemitteilung verfügbar') ->assertSee('eingelöst am') ->assertSee('Depublikation: Depublizierte Beispiel-Mitteilung'); @@ -232,7 +232,7 @@ test('the wallet block shows the balance and the credit pack topup links', funct $this->actingAs($user); - LivewireVolt::test('customer.bookings') + Livewire::test('customer.bookings') ->assertSee('Credit-Wallet & Add-ons') ->assertSee('30') ->assertSee('27 Credits') // Bonus-Paket @@ -249,7 +249,7 @@ test('the extra pm card is hidden without credits and without a subscription', f /** @var TestCase $this */ $this->actingAs(bookingsTestCustomer()); - LivewireVolt::test('customer.bookings') + Livewire::test('customer.bookings') ->assertDontSee('Aus Guthaben buchen') // Extra-PM-Karte ausgeblendet ->assertSee('Was kostet wie viel'); // Preis ergibt sich aus der Preisliste }); @@ -261,7 +261,7 @@ test('the extra pm card appears once the wallet has credits', function () { $this->actingAs($user); - LivewireVolt::test('customer.bookings') + Livewire::test('customer.bookings') ->assertSee('Aus Guthaben buchen'); }); @@ -269,7 +269,7 @@ test('a missing billing address shows the proactive banner with a profile link', /** @var TestCase $this */ $this->actingAs(bookingsTestCustomer()); - LivewireVolt::test('customer.bookings') + Livewire::test('customer.bookings') ->assertSee('Rechnungsadresse fehlt') ->assertSee(route('me.profile'), false); }); @@ -281,7 +281,7 @@ test('with a billing address the banner is gone and the booking modal offers the $this->actingAs($user); - LivewireVolt::test('customer.bookings') + Livewire::test('customer.bookings') ->assertDontSee('Rechnungsadresse fehlt') ->call('selectBooking', 'single_pm') ->assertSee('Kostenpflichtig buchen') @@ -297,7 +297,7 @@ test('buying an extra pm from the wallet succeeds with enough credits', function $this->actingAs($user); - LivewireVolt::test('customer.bookings') + Livewire::test('customer.bookings') ->call('buyExtraPm') ->assertSee('Extra-Pressemitteilung gebucht'); @@ -312,7 +312,7 @@ test('buying an extra pm without enough credits shows the mini checkout hint', f $this->actingAs($user); - LivewireVolt::test('customer.bookings') + Livewire::test('customer.bookings') ->call('buyExtraPm') ->assertSee('Bitte laden Sie mindestens 11 Credits nach'); @@ -331,7 +331,7 @@ test('checking the entrepreneur box records a booking confirmation with the agb $this->actingAs($user); - LivewireVolt::test('customer.bookings') + Livewire::test('customer.bookings') ->call('selectBooking', 'single_pm') ->set('entrepreneurConfirmed', true); @@ -353,7 +353,7 @@ test('selecting a new booking resets the entrepreneur confirmation checkbox', fu $this->actingAs($user); - LivewireVolt::test('customer.bookings') + Livewire::test('customer.bookings') ->call('selectBooking', 'single_pm') ->set('entrepreneurConfirmed', true) ->call('selectBooking', 'single_pm') @@ -383,7 +383,7 @@ test('a subscriber sees swap buttons on other plans and the swap confirmation mo $this->actingAs($user); - LivewireVolt::test('customer.bookings') + Livewire::test('customer.bookings') ->assertSee('Zu diesem Tarif wechseln') ->assertSee('Ihr aktueller Tarif') ->call('selectBooking', 'subscription', $targetPlan->slug, 'monthly') @@ -405,7 +405,7 @@ test('a swap booking for a subscriber on grace period announces the revoked canc $this->actingAs($user); - LivewireVolt::test('customer.bookings') + Livewire::test('customer.bookings') ->call('selectBooking', 'subscription', $targetPlan->slug, 'monthly') ->assertSet('booking.resumes_cancellation', true) ->assertSee('Ihre vorgemerkte Kündigung wird durch den Wechsel aufgehoben.'); @@ -428,7 +428,7 @@ test('a swap to a cheaper plan is announced as a scheduled change at period end' $this->actingAs($user); - LivewireVolt::test('customer.bookings') + Livewire::test('customer.bookings') ->call('selectBooking', 'subscription', $targetPlan->slug, 'monthly') ->assertSet('booking.is_downgrade', true) ->assertSee('zum Ende der bereits bezahlten Abrechnungsperiode') @@ -455,7 +455,7 @@ test('a scheduled plan change is shown on the current plan card', function () { $this->actingAs($user); - LivewireVolt::test('customer.bookings') + Livewire::test('customer.bookings') ->assertSee('Tarifwechsel zu Kleiner Tarif am') ->assertSee(now()->addDays(9)->format('d.m.Y')); }); @@ -486,7 +486,7 @@ test('the current plan card shows booking and renewal dates from stripe', functi $this->actingAs($user); - LivewireVolt::test('customer.bookings') + Livewire::test('customer.bookings') ->assertSee('Aktueller Tarif') ->assertSee('Gebucht am 09.07.2026') ->assertSee('Verlängerung am 09.08.2026'); @@ -514,7 +514,7 @@ test('the current plan card omits the dates when the stripe period is unavailabl $this->actingAs($user); - LivewireVolt::test('customer.bookings') + Livewire::test('customer.bookings') ->assertSee('Aktueller Tarif') ->assertDontSee('Gebucht am') ->assertDontSee('Verlängerung am'); diff --git a/tests/Feature/Billing/DepublicationTest.php b/tests/Feature/Billing/DepublicationTest.php index 0f856477..51deffc0 100644 --- a/tests/Feature/Billing/DepublicationTest.php +++ b/tests/Feature/Billing/DepublicationTest.php @@ -17,7 +17,7 @@ use Illuminate\Http\RedirectResponse; use Illuminate\Support\Facades\Mail; use Laravel\Cashier\Checkout; use Laravel\Cashier\Events\WebhookReceived; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -149,7 +149,7 @@ test('the detail page offers depublication and logs the entrepreneur confirmatio $this->actingAs($user); - LivewireVolt::test('customer.press-releases.show', ['id' => $release->id]) + Livewire::test('customer.press-releases.show', ['id' => $release->id]) ->assertSee('Depublikation (Service)') ->assertSee('Kostenpflichtig depublizieren') ->set('depublicationConfirmed', true); @@ -168,7 +168,7 @@ test('the detail page hides the depublication offer without a price and after a // Ohne konfigurierten Preis erscheint die Sektion gar nicht (T12). config()->set('billing.depublication_price_cents', null); - LivewireVolt::test('customer.press-releases.show', ['id' => $release->id]) + Livewire::test('customer.press-releases.show', ['id' => $release->id]) ->assertDontSee('Depublikation (Service)'); // Mit BEZAHLTEM Vorgang: Hinweis statt erneutem Kauf-Button. @@ -181,14 +181,14 @@ test('the detail page hides the depublication offer without a price and after a 'currency' => 'EUR', 'press_release_id' => $release->id, ]); - LivewireVolt::test('customer.press-releases.show', ['id' => $release->id]) + Livewire::test('customer.press-releases.show', ['id' => $release->id]) ->assertSee('Für diese Pressemitteilung liegt bereits ein Depublikations-Vorgang vor.') ->assertDontSee('Kostenpflichtig depublizieren'); // Ein offener Pending-Kauf (abgebrochener Checkout) blockiert das // Angebot dagegen nicht — der Button bleibt nutzbar. $purchase->update(['status' => SinglePurchaseStatus::Pending->value]); - LivewireVolt::test('customer.press-releases.show', ['id' => $release->id]) + Livewire::test('customer.press-releases.show', ['id' => $release->id]) ->assertSee('Kostenpflichtig depublizieren') ->assertDontSee('Für diese Pressemitteilung liegt bereits ein Depublikations-Vorgang vor.'); }); diff --git a/tests/Feature/Billing/LegacyBundleTest.php b/tests/Feature/Billing/LegacyBundleTest.php index 8c7b57f3..9c1a44f4 100644 --- a/tests/Feature/Billing/LegacyBundleTest.php +++ b/tests/Feature/Billing/LegacyBundleTest.php @@ -7,7 +7,7 @@ use App\Models\UserPaymentOption; use App\Services\Billing\LegacySubscriptionService; use App\Services\CurrentPortalContext; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt; +use Livewire\Livewire; use Tests\TestCase; afterEach(function () { @@ -102,7 +102,7 @@ test('the payments page lists bestandsschutz posts and cancels a whole bundle', grandfatheredPost($customer, Portal::Presseecho->value); grandfatheredPost($customer, Portal::Businessportal24->value); - Volt::actingAs($admin) + Livewire::actingAs($admin) ->test('admin.payments.index') ->assertOk() ->assertSee('Bestandskunde Test') diff --git a/tests/Feature/CanonicalAssignmentTest.php b/tests/Feature/CanonicalAssignmentTest.php index 0554e04d..5c417a4c 100644 --- a/tests/Feature/CanonicalAssignmentTest.php +++ b/tests/Feature/CanonicalAssignmentTest.php @@ -16,7 +16,7 @@ use App\Services\SearchConsole\IndexStatusChecker; use App\Support\ContentFingerprint; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Mail; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; /** @@ -203,10 +203,10 @@ test('the source verdict tells own, other-own and foreign canonicals apart and s ->and($checker->sourceVerdict($none)['kind'])->toBe('unknown'); config()->set('search_console.customer_visible', false); - LivewireVolt::test('customer.press-releases.show', ['id' => $release->id])->assertDontSeeText('maßgebliche Quelle'); + Livewire::test('customer.press-releases.show', ['id' => $release->id])->assertDontSeeText('maßgebliche Quelle'); config()->set('search_console.customer_visible', true); - LivewireVolt::test('customer.press-releases.show', ['id' => $release->id]) + Livewire::test('customer.press-releases.show', ['id' => $release->id]) ->assertSeeText('Google führt diese Adresse als maßgebliche Quelle.') ->assertSeeText('warum, ist nicht bekannt'); }); diff --git a/tests/Feature/Customer/DashboardTest.php b/tests/Feature/Customer/DashboardTest.php index eaa8903e..4099a099 100644 --- a/tests/Feature/Customer/DashboardTest.php +++ b/tests/Feature/Customer/DashboardTest.php @@ -9,7 +9,7 @@ use App\Models\Profile; use App\Models\User; use App\Models\UserPaymentOption; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -24,7 +24,7 @@ test('customer dashboard renders core sections without errors', function () { $this->actingAs($customer); - LivewireVolt::test('customer.dashboard') + Livewire::test('customer.dashboard') ->assertSee('Mein Dashboard') ->assertSee(__('Gesamt')) ->assertSee(__('Veröffentlicht')) @@ -42,7 +42,7 @@ test('empty-state with three-step intro shows when no press releases exist', fun $this->actingAs($customer); - LivewireVolt::test('customer.dashboard') + Livewire::test('customer.dashboard') ->assertSee(__('Noch keine Pressemitteilungen')) ->assertSee(__('Erste Pressemitteilung erstellen')) ->assertSee(__('Firma zuordnen')) @@ -57,7 +57,7 @@ test('the first-steps onboarding card appears for a fresh customer with all step $this->actingAs($customer); - LivewireVolt::test('customer.dashboard') + Livewire::test('customer.dashboard') ->assertSee(__('Erste Schritte')) ->assertSee('0/4 '.__('erledigt')) ->assertSee(__('Profil vervollständigen')) @@ -75,7 +75,7 @@ test('the first-steps onboarding card reflects completed steps in the counter', $this->actingAs($customer); - LivewireVolt::test('customer.dashboard') + Livewire::test('customer.dashboard') ->assertSee(__('Erste Schritte')) ->assertSee('1/4 '.__('erledigt')) ->assertSee(__('Erledigt')); @@ -114,7 +114,7 @@ test('the first-steps onboarding card disappears once every step is complete', f $this->actingAs($customer); - LivewireVolt::test('customer.dashboard') + Livewire::test('customer.dashboard') ->assertDontSee(__('Erste Schritte')); }); @@ -140,7 +140,7 @@ test('press release list and KPI counts render when data exists', function () { $this->actingAs($customer); - LivewireVolt::test('customer.dashboard') + Livewire::test('customer.dashboard') ->assertSee('Phase 2 Demo Release') ->assertDontSee(__('Noch keine Pressemitteilungen')) ->assertSee('Alle anzeigen'); @@ -161,7 +161,7 @@ test('company dashboard preview is limited to the ten newest companies', functio $this->actingAs($customer); - LivewireVolt::test('customer.dashboard') + Livewire::test('customer.dashboard') ->assertSee('12 zugeordnet') ->assertSee('Dashboard Firma 12') ->assertSee('Dashboard Firma 03') @@ -188,7 +188,7 @@ test('profile completeness hint with percentage appears for partial profiles', f $this->actingAs($customer); - LivewireVolt::test('customer.dashboard') + Livewire::test('customer.dashboard') ->assertSee(__('Profil unvollständig')) ->assertSee('33'); }); @@ -202,7 +202,7 @@ test('the booking-required banner stays hidden while the gate is open', function $this->actingAs($customer); - LivewireVolt::test('customer.dashboard') + Livewire::test('customer.dashboard') ->assertDontSee(__('Buchung erforderlich, um zu veröffentlichen')); }); @@ -215,7 +215,7 @@ test('the booking-required banner appears when the gate is enforced and no booki $this->actingAs($customer); - LivewireVolt::test('customer.dashboard') + Livewire::test('customer.dashboard') ->assertSee(__('Buchung erforderlich, um zu veröffentlichen')) ->assertSee(route('me.bookings.index'), false); }); @@ -236,7 +236,7 @@ test('a grandfathered bestandskunde does not see the booking-required banner', f $this->actingAs($customer); - LivewireVolt::test('customer.dashboard') + Livewire::test('customer.dashboard') ->assertDontSee(__('Buchung erforderlich, um zu veröffentlichen')); }); @@ -266,7 +266,7 @@ test('billing address hint disappears once address is complete', function () { $this->actingAs($customer); - LivewireVolt::test('customer.dashboard') + Livewire::test('customer.dashboard') ->assertDontSee(__('Profil unvollständig')) ->assertDontSee(__('Rechnungsadresse fehlt')) ->assertSee(__('Alles im grünen Bereich')); diff --git a/tests/Feature/CustomerCompanyContextTest.php b/tests/Feature/CustomerCompanyContextTest.php index df7ddf61..539a02b4 100644 --- a/tests/Feature/CustomerCompanyContextTest.php +++ b/tests/Feature/CustomerCompanyContextTest.php @@ -10,7 +10,7 @@ use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Storage; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; test('customer company switcher stores only accessible company context', function () { @@ -26,14 +26,14 @@ test('customer company switcher stores only accessible company context', functio $this->actingAs($customer); - LivewireVolt::test('customer.company-switcher') + Livewire::test('customer.company-switcher') ->assertSee('Alpha GmbH') ->assertDontSee('Fremde GmbH') ->set('activeCompany', (string) $company->id); expect(session(CustomerCompanyContext::SessionKey))->toBe($company->id); - LivewireVolt::test('customer.company-switcher') + Livewire::test('customer.company-switcher') ->set('activeCompany', (string) $inaccessibleCompany->id); expect(session(CustomerCompanyContext::SessionKey))->toBe($company->id); @@ -50,7 +50,7 @@ test('customer company switcher links to selected company detail', function () { $this->actingAs($customer) ->withSession([CustomerCompanyContext::SessionKey => $company->id]); - LivewireVolt::test('customer.company-switcher') + Livewire::test('customer.company-switcher') ->assertSee('Alpha GmbH') ->assertSee('Firma öffnen') ->assertSee(route('me.press-kits.show', $company->id, absolute: false)); @@ -70,7 +70,7 @@ test('customer company switcher limits rendered company options', function () { $this->actingAs($customer); - LivewireVolt::test('customer.company-switcher') + Livewire::test('customer.company-switcher') ->assertViewHas('companies', fn ($companies) => $companies->count() === 50) ->assertSee('Switcher Firma 55') ->assertSee('Switcher Firma 06') @@ -100,7 +100,7 @@ test('customer press release list is filtered by selected company context', func $this->actingAs($customer) ->withSession([CustomerCompanyContext::SessionKey => $company->id]); - LivewireVolt::test('customer.press-releases.index') + Livewire::test('customer.press-releases.index') ->assertSee('Alpha GmbH') ->assertDontSee('Alle Firmen') ->assertSee('Alpha Produktmeldung') @@ -126,7 +126,7 @@ test('customer press release list can filter unassigned legacy press releases', $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.index') + Livewire::test('customer.press-releases.index') ->set('companyFilter', 'unassigned') ->assertSee('Alle Firmen') ->assertSee('Legacy ohne Firma') @@ -155,7 +155,7 @@ test('customer dashboard is filtered by selected company context', function () { $this->actingAs($customer) ->withSession([CustomerCompanyContext::SessionKey => $company->id]); - LivewireVolt::test('customer.dashboard') + Livewire::test('customer.dashboard') ->assertSee('Übersicht für Alpha GmbH') ->assertSee('Alpha Dashboardmeldung') ->assertDontSee('Beta Dashboardmeldung'); @@ -170,7 +170,7 @@ test('customer dashboard shows data quality hints', function () { $this->actingAs($customer) ->withSession([CustomerCompanyContext::SessionKey => $company->id]); - LivewireVolt::test('customer.dashboard') + Livewire::test('customer.dashboard') ->assertSee('Datenqualität') ->assertSee('Profil unvollständig') ->assertSee('Rechnungsadresse fehlt') @@ -191,7 +191,7 @@ test('customer dashboard links unassigned press release hint to filtered list', $this->actingAs($customer); - LivewireVolt::test('customer.dashboard') + Livewire::test('customer.dashboard') ->assertSee('Pressemitteilung ohne Firma') ->assertSee('company=unassigned'); }); @@ -207,7 +207,7 @@ test('create press release uses selected company context as default', function ( $this->actingAs($customer) ->withSession([CustomerCompanyContext::SessionKey => $otherCompany->id]); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->assertSet('companyId', $otherCompany->id) ->assertSee('Beta GmbH'); }); @@ -238,11 +238,11 @@ test('customer can browse own press kits and open a press kit detail', function $this->actingAs($customer); - LivewireVolt::test('customer.press-kits.index') + Livewire::test('customer.press-kits.index') ->assertSee('Alpha Pressemappe') ->assertDontSee('Fremde Pressemappe'); - LivewireVolt::test('customer.press-kits.show', ['id' => $company->id]) + Livewire::test('customer.press-kits.show', ['id' => $company->id]) ->assertSee('Alpha Pressemappe') ->assertSee('presse@alpha.test') ->assertSee('Paula Presse') @@ -262,7 +262,7 @@ test('customer cannot open inaccessible press kit detail', function () { $this->actingAs($customer); - LivewireVolt::test('customer.press-kits.show', ['id' => $otherCompany->id]) + Livewire::test('customer.press-kits.show', ['id' => $otherCompany->id]) ->assertNotFound(); }); @@ -276,7 +276,7 @@ test('responsible customer can manage press kit contacts', function () { $this->actingAs($customer); - LivewireVolt::test('customer.press-kits.show', ['id' => $company->id]) + Livewire::test('customer.press-kits.show', ['id' => $company->id]) ->call('startCreateContact') ->set('contactFirstName', 'Mara') ->set('contactLastName', 'Muster') @@ -291,7 +291,7 @@ test('responsible customer can manage press kit contacts', function () { expect($contact->email)->toBe('mara@example.test'); - LivewireVolt::test('customer.press-kits.show', ['id' => $company->id]) + Livewire::test('customer.press-kits.show', ['id' => $company->id]) ->call('editContact', $contact->id) ->set('contactEmail', 'presse@example.test') ->call('saveContact') @@ -300,7 +300,7 @@ test('responsible customer can manage press kit contacts', function () { expect($contact->refresh()->email)->toBe('presse@example.test'); - LivewireVolt::test('customer.press-kits.show', ['id' => $company->id]) + Livewire::test('customer.press-kits.show', ['id' => $company->id]) ->call('deleteContact', $contact->id) ->assertSee('Pressekontakt wurde gelöscht.'); @@ -317,7 +317,7 @@ test('member customer cannot manage press kit contacts', function () { $this->actingAs($customer); - LivewireVolt::test('customer.press-kits.show', ['id' => $company->id]) + Livewire::test('customer.press-kits.show', ['id' => $company->id]) ->assertDontSee('Kontakt hinzufügen') ->call('startCreateContact') ->assertForbidden(); @@ -338,7 +338,7 @@ test('responsible customer can manage press kit company master data', function ( $logo = UploadedFile::fake()->image('logo.png', 800, 400); - LivewireVolt::test('customer.press-kits.show', ['id' => $company->id]) + Livewire::test('customer.press-kits.show', ['id' => $company->id]) ->call('startEditCompany') ->set('companyName', 'Neue Pressemappe GmbH') ->set('companyEmail', 'neu@example.test') @@ -374,7 +374,7 @@ test('member customer cannot manage press kit company master data', function () $this->actingAs($customer); - LivewireVolt::test('customer.press-kits.show', ['id' => $company->id]) + Livewire::test('customer.press-kits.show', ['id' => $company->id]) ->assertDontSee('Stammdaten bearbeiten') ->call('startEditCompany') ->assertForbidden(); @@ -394,14 +394,14 @@ test('a deleted press kit contact disappears from the list and cannot be edited $this->actingAs($customer); - LivewireVolt::test('customer.press-kits.show', ['id' => $company->id]) + Livewire::test('customer.press-kits.show', ['id' => $company->id]) ->assertSee('Kontaktperson') ->call('deleteContact', $contact->id) ->assertDontSee('Kontaktperson'); // Seit Livewire 4.4.7 rendert der Testhelfer ModelNotFoundException wie // ein echter Request als 404, statt sie zu werfen. - LivewireVolt::test('customer.press-kits.show', ['id' => $company->id]) + Livewire::test('customer.press-kits.show', ['id' => $company->id]) ->assertDontSee('Kontaktperson') ->call('editContact', $contact->id) ->assertNotFound(); @@ -427,7 +427,7 @@ test('saving or deleting a press kit contact drops the cached newsroom page', fu $this->get($url)->assertOk(); expect(Cache::has($cacheKey()))->toBeTrue(); - LivewireVolt::test('customer.press-kits.show', ['id' => $company->id]) + Livewire::test('customer.press-kits.show', ['id' => $company->id]) ->call('startCreateContact') ->set('contactLastName', 'Neu') ->set('contactEmail', 'neu@example.test') @@ -443,7 +443,7 @@ test('saving or deleting a press kit contact drops the cached newsroom page', fu $this->get($url)->assertOk(); expect(Cache::has($cacheKey()))->toBeTrue(); - LivewireVolt::test('customer.press-kits.show', ['id' => $company->id]) + Livewire::test('customer.press-kits.show', ['id' => $company->id]) ->call('deleteContact', $contact->id); expect(Cache::has($cacheKey()))->toBeFalse(); @@ -470,7 +470,7 @@ test('a failed logo write keeps the previous press kit logo and reports a valida $this->actingAs($customer); - LivewireVolt::test('customer.press-kits.show', ['id' => $company->id]) + Livewire::test('customer.press-kits.show', ['id' => $company->id]) ->call('startEditCompany') ->set('companyLogo', UploadedFile::fake()->image('neu.png', 400, 400)) ->call('saveCompany') diff --git a/tests/Feature/CustomerPortalTest.php b/tests/Feature/CustomerPortalTest.php index b6e9cea6..2f9542ce 100644 --- a/tests/Feature/CustomerPortalTest.php +++ b/tests/Feature/CustomerPortalTest.php @@ -8,7 +8,7 @@ use App\Models\LegacyInvoice; use App\Models\User; use App\Models\UserPaymentOption; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; test('customer can create and revoke api tokens with selected abilities', function () { @@ -23,7 +23,7 @@ test('customer can create and revoke api tokens with selected abilities', functi $this->actingAs($customer); - LivewireVolt::test('customer.tokens') + Livewire::test('customer.tokens') ->assertSee('API-Tokens') ->set('tokenName', 'Website Integration') ->set('selectedAbilities', ['press-releases:read', 'companies:read']) @@ -36,7 +36,7 @@ test('customer can create and revoke api tokens with selected abilities', functi expect($token->name)->toBe('Website Integration'); expect($token->abilities)->toBe(['press-releases:read', 'companies:read']); - LivewireVolt::test('customer.tokens') + Livewire::test('customer.tokens') ->call('revokeToken', $token->id) ->assertSee('Token wurde widerrufen.'); @@ -51,7 +51,7 @@ test('the tokens page links the api docs page and the named spec download', func // Doku-Button öffnet die API-Seite; der Spec-Download ist ein eigener, // klar benannter Button (kein Sofort-Download hinter „Dokumentation“). - LivewireVolt::test('customer.tokens') + Livewire::test('customer.tokens') ->assertSee('API-Dokumentation') ->assertSee(route('api', ['edition' => 'de'])) ->assertSee('OpenAPI-Spezifikation (YAML)') @@ -64,7 +64,7 @@ test('customer cannot create api token without active payment access', function $this->actingAs($customer); - LivewireVolt::test('customer.tokens') + Livewire::test('customer.tokens') ->set('tokenName', 'Website Integration') ->set('selectedAbilities', ['press-releases:read']) ->call('createToken') @@ -88,14 +88,14 @@ test('api tokens cannot be created or revoked during impersonation', function () $this->actingAs($customer) ->withSession([UserImpersonation::SessionKey => $admin->id]); - LivewireVolt::test('customer.tokens') + Livewire::test('customer.tokens') ->assertSee('Während der Benutzer-Impersonation können keine API-Tokens erstellt oder widerrufen werden.') ->set('tokenName', 'Impersonated token') ->set('selectedAbilities', ['press-releases:read']) ->call('createToken') ->assertForbidden(); - LivewireVolt::test('customer.tokens') + Livewire::test('customer.tokens') ->call('revokeToken', $token->id) ->assertForbidden(); @@ -151,7 +151,7 @@ test('customer sees only own legacy invoices', function () { $this->actingAs($customer); - LivewireVolt::test('customer.invoices') + Livewire::test('customer.invoices') ->assertSee('RE-CUSTOMER-001') ->assertDontSee('RE-OTHER-001') ->assertDontSee('RE-CUSTOMER-HOLD') @@ -179,7 +179,7 @@ test('the legacy invoice archive is hidden for customers without archived invoic $this->actingAs($customer); - LivewireVolt::test('customer.invoices') + Livewire::test('customer.invoices') ->assertSee('Aktuelle Rechnungen') ->assertDontSee('Rechnungsarchiv (Altsystem)') ->assertDontSee('Filter & Suche'); @@ -214,7 +214,7 @@ test('current STR and MAN invoices are listed with a stripe link where available $this->actingAs($customer); - LivewireVolt::test('customer.invoices') + Livewire::test('customer.invoices') ->assertSee('Aktuelle Rechnungen') ->assertSee('STR-00042') ->assertSee('MAN-00007') @@ -291,7 +291,7 @@ test('customer can open generated legacy invoice pdf inline from archive data', $this->actingAs($customer); - LivewireVolt::test('customer.invoices') + Livewire::test('customer.invoices') ->assertSee('Rechnungsarchiv (Altsystem)') ->assertSee('Rechnungsadresse im Profil pflegen') ->assertSee('Öffnen'); diff --git a/tests/Feature/CustomerPressKitCreatePhase8eTest.php b/tests/Feature/CustomerPressKitCreatePhase8eTest.php index b2ae4965..caa315b6 100644 --- a/tests/Feature/CustomerPressKitCreatePhase8eTest.php +++ b/tests/Feature/CustomerPressKitCreatePhase8eTest.php @@ -4,7 +4,7 @@ use App\Enums\Portal; use App\Models\Company; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -41,7 +41,7 @@ test('save erstellt eine Firma und ordnet sie dem User als Owner zu', function ( /** @var TestCase $this */ $customer = makeCustomerForCreate(); - LivewireVolt::actingAs($customer) + Livewire::actingAs($customer) ->test('customer.press-kits.create') ->set('name', 'Neue Brauerei AG') ->set('portal', 'presseecho') @@ -70,7 +70,7 @@ test('save validiert Pflichtfelder Name und Portal', function () { /** @var TestCase $this */ $customer = makeCustomerForCreate(); - LivewireVolt::actingAs($customer) + Livewire::actingAs($customer) ->test('customer.press-kits.create') ->set('name', '') ->set('portal', '') @@ -82,7 +82,7 @@ test('save lehnt unbekannte Portal-Werte ab', function () { /** @var TestCase $this */ $customer = makeCustomerForCreate(); - LivewireVolt::actingAs($customer) + Livewire::actingAs($customer) ->test('customer.press-kits.create') ->set('name', 'Test GmbH') ->set('portal', 'invalid') @@ -94,7 +94,7 @@ test('save lehnt Portal Both ab', function () { /** @var TestCase $this */ $customer = makeCustomerForCreate(); - LivewireVolt::actingAs($customer) + Livewire::actingAs($customer) ->test('customer.press-kits.create') ->set('name', 'Beide Portale GmbH') ->set('portal', Portal::Both->value) @@ -109,7 +109,7 @@ test('Portal-Auswahl bietet Beide Portale nicht an', function () { /** @var TestCase $this */ $customer = makeCustomerForCreate(); - LivewireVolt::actingAs($customer) + Livewire::actingAs($customer) ->test('customer.press-kits.create') ->assertSeeText(Portal::Presseecho->label()) ->assertSeeText(Portal::Businessportal24->label()) diff --git a/tests/Feature/CustomerPressKitIndexPhase8eTest.php b/tests/Feature/CustomerPressKitIndexPhase8eTest.php index bcba5120..cee8d0a0 100644 --- a/tests/Feature/CustomerPressKitIndexPhase8eTest.php +++ b/tests/Feature/CustomerPressKitIndexPhase8eTest.php @@ -6,7 +6,7 @@ use App\Models\PressRelease; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Facades\Schema; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -64,7 +64,7 @@ test('Saved-View Aktiv filtert nur is_active = true Firmen', function () { $inactive = Company::factory()->presseecho()->inactive()->create(['name' => 'ZetaInaktiv GmbH']); $customer->companies()->attach($inactive->id, ['role' => 'owner']); - LivewireVolt::actingAs($customer) + Livewire::actingAs($customer) ->test('customer.press-kits.index') ->call('setSavedView', 'active') ->assertSet('savedView', 'active') @@ -82,7 +82,7 @@ test('Saved-View Inaktiv filtert nur is_active = false Firmen', function () { $inactive = Company::factory()->presseecho()->inactive()->create(['name' => 'ZetaInaktiv GmbH']); $customer->companies()->attach($inactive->id, ['role' => 'owner']); - LivewireVolt::actingAs($customer) + Livewire::actingAs($customer) ->test('customer.press-kits.index') ->call('setSavedView', 'inactive') ->assertSee('ZetaInaktiv GmbH') @@ -105,7 +105,7 @@ test('Saved-View Geteilt zeigt nur Firmen, bei denen User nicht Owner ist', func ]); $customer->companies()->attach($sharedCompany->id, ['role' => 'responsible']); - LivewireVolt::actingAs($customer) + Livewire::actingAs($customer) ->test('customer.press-kits.index') ->call('setSavedView', 'shared') ->assertSee('GeteilteFirma GmbH') @@ -123,7 +123,7 @@ test('Portal-Filter zeigt nur Firmen des gewählten Portals (oder both)', functi $bp->id => ['role' => 'owner'], ]); - LivewireVolt::actingAs($customer) + Livewire::actingAs($customer) ->test('customer.press-kits.index') ->call('setPortalFilter', 'presseecho') ->assertSee('PresseechoCo GmbH') @@ -146,7 +146,7 @@ test('Rollen-Filter Owner zeigt nur Firmen, in denen User Owner ist', function ( ]); $customer->companies()->attach($memberCompany->id, ['role' => 'member']); - LivewireVolt::actingAs($customer) + Livewire::actingAs($customer) ->test('customer.press-kits.index') ->call('setRoleFilter', 'owner') ->assertSee('EigeneFirma GmbH') @@ -164,7 +164,7 @@ test('Suche filtert auf Firmennamen', function () { $beta->id => ['role' => 'owner'], ]); - LivewireVolt::actingAs($customer) + Livewire::actingAs($customer) ->test('customer.press-kits.index') ->set('search', 'Brauerei') ->assertSee('Alpha Brauerei AG') @@ -177,7 +177,7 @@ test('View-Mode kann auf list umgeschaltet werden', function () { $company = Company::factory()->presseecho()->create(['name' => 'FirmaA GmbH']); $customer->companies()->attach($company->id, ['role' => 'owner']); - LivewireVolt::actingAs($customer) + Livewire::actingAs($customer) ->test('customer.press-kits.index') ->call('setViewMode', 'list') ->assertSet('viewMode', 'list') @@ -202,7 +202,7 @@ test('Empty-State Filter-ohne-Treffer wird bei aktiven Filtern ohne Match gezeig $company = Company::factory()->presseecho()->create(['name' => 'Alpha GmbH']); $customer->companies()->attach($company->id, ['role' => 'owner']); - LivewireVolt::actingAs($customer) + Livewire::actingAs($customer) ->test('customer.press-kits.index') ->set('search', 'Zeta') ->assertSee('Keine Firmen mit diesen Filtern'); @@ -214,7 +214,7 @@ test('Filter zurücksetzen leert alle Filter und Suche', function () { $company = Company::factory()->presseecho()->create(['name' => 'Alpha GmbH']); $customer->companies()->attach($company->id, ['role' => 'owner']); - LivewireVolt::actingAs($customer) + Livewire::actingAs($customer) ->test('customer.press-kits.index') ->set('search', 'Zeta') ->call('setSavedView', 'inactive') @@ -234,7 +234,7 @@ test('Add-Tile wird nur auf der letzten Seite des Card-Grids gerendert', functio $company = Company::factory()->presseecho()->create(['name' => 'Alpha GmbH']); $customer->companies()->attach($company->id, ['role' => 'owner']); - LivewireVolt::actingAs($customer) + Livewire::actingAs($customer) ->test('customer.press-kits.index') ->assertSee('Neue Firma anlegen'); }); @@ -250,7 +250,7 @@ test('Firmenübersicht paginiert mit 50 Firmen pro Seite', function () { ]); } - LivewireVolt::actingAs($customer) + Livewire::actingAs($customer) ->test('customer.press-kits.index') ->assertViewHas('pressKits', fn ($pressKits) => $pressKits->perPage() === 50 && $pressKits->count() === 50) ->assertSee('portal-pagination', false) diff --git a/tests/Feature/CustomerPressReleaseCreatePhase7Test.php b/tests/Feature/CustomerPressReleaseCreatePhase7Test.php index 609b33cd..92cdb02a 100644 --- a/tests/Feature/CustomerPressReleaseCreatePhase7Test.php +++ b/tests/Feature/CustomerPressReleaseCreatePhase7Test.php @@ -8,7 +8,7 @@ use App\Models\PressRelease; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Database\Eloquent\Factories\Sequence; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -36,7 +36,7 @@ test('mount picks the alphabetically first contact of the default company', func $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->assertSet('companyId', $company->id) ->assertSet('contactId', $contactA->id); }); @@ -50,7 +50,7 @@ test('the pre-submit check component renders the checklist', function () { $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->assertSee('Pre-Submit-Check') ->assertSee('Firma zugeordnet') ->assertSee('Alpha GmbH'); @@ -71,7 +71,7 @@ test('changing the company resets the contactId to the new company default', fun $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->set('companyId', $betaCo->id) ->assertSet('contactId', $betaContact->id) ->set('companyId', $alphaCo->id) @@ -98,7 +98,7 @@ test('company options are limited and searchable', function () { $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->assertViewHas('companyOptions', fn ($companyOptions): bool => $companyOptions->count() === 10 && ! $companyOptions->pluck('id')->contains($hiddenCompany->id)) ->set('companySearch', 'Zielunternehmen') @@ -119,7 +119,7 @@ test('company options show portal abbreviations for duplicate names', function ( $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->set('companySearch', 'Doppel') ->assertSee('Doppel GmbH (PE)') ->assertSee('Doppel GmbH (B24)'); @@ -138,7 +138,7 @@ test('company search ignores trailing portal abbreviation from selected label', $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->set('companySearch', 'Wein & Würze / N8Schicht GmbH (B24)') ->assertViewHas('companyOptions', fn ($companyOptions): bool => $companyOptions->pluck('id')->contains($businessportalCompany->id)); }); @@ -154,7 +154,7 @@ test('save with all required fields persists the press release and syncs contact $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->set('title', 'Eine neue Eröffnung der Brauerei') ->set('subtitle', 'Subline mit ein wenig Kontext.') ->set('text', str_repeat('Inhaltlich relevanter Fließtext. ', 5)) @@ -188,7 +188,7 @@ test('save without a contact id succeeds and leaves contacts empty', function () $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->set('contactId', null) ->set('title', 'Titel mit genug Zeichen') ->set('text', str_repeat('x', 60)) @@ -209,7 +209,7 @@ test('presubmit check for missing contact is warning, not error', function () { $this->actingAs($customer); - $component = LivewireVolt::test('customer.press-releases.create') + $component = Livewire::test('customer.press-releases.create') ->set('contactId', null); $checks = collect($component->instance()->presubmitChecks); @@ -229,7 +229,7 @@ test('boilerplate override is null when toggle is off even if text is filled', f $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->set('title', 'Genug Zeichen Titel') ->set('text', str_repeat('x', 60)) ->set('categoryId', $category->id) @@ -254,7 +254,7 @@ test('ensureDraft saves a draft with current data and redirects to the editor', $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->set('title', 'Frühzeitiger Upload') ->set('categoryId', $category->id) ->call('ensureDraft') @@ -278,7 +278,7 @@ test('ensureDraft uses a placeholder title when the title is still empty', funct $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->set('categoryId', $category->id) ->call('ensureDraft') ->assertHasNoErrors(); @@ -298,7 +298,7 @@ test('ensureDraft requires a category before creating a draft', function () { $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->set('categoryId', null) ->call('ensureDraft') ->assertHasErrors(['categoryId']); @@ -315,7 +315,7 @@ test('addTag appends to keywords and removeTag drops it', function () { $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->call('addTag', 'Brauerei') ->call('addTag', 'Tegernsee') ->call('addTag', 'Brauerei') @@ -333,7 +333,7 @@ test('addTag stops adding once the 5-tag limit is reached', function () { $this->actingAs($customer); - $component = LivewireVolt::test('customer.press-releases.create'); + $component = Livewire::test('customer.press-releases.create'); foreach (['A', 'B', 'C', 'D', 'E'] as $tag) { $component->call('addTag', $tag); diff --git a/tests/Feature/CustomerPressReleaseEditPhase7Test.php b/tests/Feature/CustomerPressReleaseEditPhase7Test.php index 600484a4..66d3c050 100644 --- a/tests/Feature/CustomerPressReleaseEditPhase7Test.php +++ b/tests/Feature/CustomerPressReleaseEditPhase7Test.php @@ -10,7 +10,7 @@ use App\Models\PressReleaseStatusLog; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Database\Eloquent\Factories\Sequence; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -53,7 +53,7 @@ test('editor shows the content score panel when a score exists', function () { $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.edit', ['id' => $pr->id]) + Livewire::test('customer.press-releases.edit', ['id' => $pr->id]) ->assertSet('contentScore', 67) ->assertSee('67') ->assertSee('Geprüft') @@ -68,7 +68,7 @@ test('mount converts legacy plain-text body to editable html so line breaks surv $this->actingAs($customer); - $component = LivewireVolt::test('customer.press-releases.edit', ['id' => $pr->id]); + $component = Livewire::test('customer.press-releases.edit', ['id' => $pr->id]); $loaded = $component->get('text'); expect($loaded)->toContain(''); @@ -84,7 +84,7 @@ test('mount leaves stored html body untouched in structure', function () { $this->actingAs($customer); - $loaded = LivewireVolt::test('customer.press-releases.edit', ['id' => $pr->id])->get('text'); + $loaded = Livewire::test('customer.press-releases.edit', ['id' => $pr->id])->get('text'); expect($loaded)->toContain('
Absatz eins.
'); expect($loaded)->toContain('Absatz zwei.
'); @@ -100,7 +100,7 @@ test('mount loads all Phase 7 fields and pivot contact', function () { $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.edit', ['id' => $pr->id]) + Livewire::test('customer.press-releases.edit', ['id' => $pr->id]) ->assertSet('subtitle', 'Untertitel der PM') ->assertSet('boilerplateOverride', 'Spezielle Boilerplate.') ->assertSet('useBoilerplateOverride', true) @@ -117,7 +117,7 @@ test('mount falls back to first company contact when no pivot exists', function $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.edit', ['id' => $pr->id]) + Livewire::test('customer.press-releases.edit', ['id' => $pr->id]) ->assertSet('contactId', $contact->id); }); @@ -140,7 +140,7 @@ test('edit page shows uploaded title image instead of placeholder controls', fun $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.edit', ['id' => $pr->id]) + Livewire::test('customer.press-releases.edit', ['id' => $pr->id]) ->assertDontSee('Dieser Platzhalter wird angezeigt, bis ein eigenes Titelbild hochgeladen ist.') ->assertDontSee('Platzhalter wählen'); }); @@ -154,7 +154,7 @@ test('save persists all new Phase 7 fields and syncs contact', function () { $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.edit', ['id' => $pr->id]) + Livewire::test('customer.press-releases.edit', ['id' => $pr->id]) ->set('title', 'Aktualisierter Titel mit genug Zeichen') ->set('subtitle', 'Neue Subline') ->set('text', str_repeat('Aktualisierter Fließtext mit etwas Inhalt. ', 5)) @@ -180,7 +180,7 @@ test('save without contact id succeeds and detaches existing contact', function $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.edit', ['id' => $pr->id]) + Livewire::test('customer.press-releases.edit', ['id' => $pr->id]) ->set('contactId', null) ->call('save') ->assertHasNoErrors(['contactId']); @@ -196,7 +196,7 @@ test('save nulls boilerplate_override when toggle is turned off', function () { $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.edit', ['id' => $pr->id]) + Livewire::test('customer.press-releases.edit', ['id' => $pr->id]) ->assertSet('useBoilerplateOverride', true) ->set('useBoilerplateOverride', false) ->call('save') @@ -219,7 +219,7 @@ test('changing the company resets the contact to the new company default', funct $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.edit', ['id' => $pr->id]) + Livewire::test('customer.press-releases.edit', ['id' => $pr->id]) ->set('companyId', $secondCompany->id) ->assertSet('contactId', $secondContact->id); }); @@ -243,7 +243,7 @@ test('company options keep selected company and search without loading all compa $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.edit', ['id' => $pr->id]) + Livewire::test('customer.press-releases.edit', ['id' => $pr->id]) ->assertViewHas('companyOptions', fn ($companyOptions): bool => $companyOptions->count() === 10 && $companyOptions->pluck('id')->contains($selectedCompany->id)) ->set('companySearch', 'Suchtreffer') @@ -259,7 +259,7 @@ test('rejected press releases can be edited and re-submitted', function () { $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.edit', ['id' => $pr->id]) + Livewire::test('customer.press-releases.edit', ['id' => $pr->id]) ->assertSet('currentStatus', 'rejected'); }); @@ -292,7 +292,7 @@ test('editor shows the rejection reason for a rejected press release', function $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.edit', ['id' => $pr->id]) + Livewire::test('customer.press-releases.edit', ['id' => $pr->id]) ->assertSee('Diese Pressemitteilung wurde abgelehnt') ->assertSee('Werbliche Sprache, bitte überarbeiten.') ->assertSee('Abgelehnt am'); @@ -304,7 +304,7 @@ test('editor shows no rejection panel for drafts', function () { $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.edit', ['id' => $pr->id]) + Livewire::test('customer.press-releases.edit', ['id' => $pr->id]) ->assertDontSee('Diese Pressemitteilung wurde abgelehnt'); }); @@ -316,7 +316,7 @@ test('addTag and removeTag work in edit form', function () { $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.edit', ['id' => $pr->id]) + Livewire::test('customer.press-releases.edit', ['id' => $pr->id]) ->call('addTag', 'Zwei') ->assertSet('keywords', 'Eins, Zwei') ->call('removeTag', 'Eins') diff --git a/tests/Feature/CustomerPressReleaseSchedulingFormTest.php b/tests/Feature/CustomerPressReleaseSchedulingFormTest.php index 2329b9ef..e414b78f 100644 --- a/tests/Feature/CustomerPressReleaseSchedulingFormTest.php +++ b/tests/Feature/CustomerPressReleaseSchedulingFormTest.php @@ -7,7 +7,7 @@ use App\Models\PressRelease; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Carbon; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -38,7 +38,7 @@ test('create form persistiert scheduled_at aus datum und uhrzeit ohne embargo', ['customer' => $customer, 'category' => $category] = makeSchedulingCustomer(); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->set('title', 'Phase 7F Scheduling Demo') ->set('text', str_repeat('Inhalt eines Tests. ', 5)) ->set('categoryId', $category->id) @@ -65,7 +65,7 @@ test('create form lehnt scheduled_at in der Vergangenheit ab', function () { ['customer' => $customer, 'category' => $category] = makeSchedulingCustomer(); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->set('title', 'Vergangene Veröffentlichung') ->set('text', str_repeat('Inhalt eines Tests. ', 5)) ->set('categoryId', $category->id) @@ -82,7 +82,7 @@ test('create form lehnt geplanten termin aus datum und uhrzeit in der vergangenh ['customer' => $customer, 'category' => $category] = makeSchedulingCustomer(); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->set('publishMode', 'scheduled') ->set('scheduledDate', '2026-05-30') ->set('scheduledTime', '10:00') @@ -95,7 +95,7 @@ test('publishMode now setzt scheduled_at auf null beim Save', function () { ['customer' => $customer, 'category' => $category] = makeSchedulingCustomer(); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->set('title', 'Sofort veröffentlichen') ->set('text', str_repeat('Inhalt eines Tests. ', 5)) ->set('categoryId', $category->id) @@ -129,7 +129,7 @@ test('edit form hydriert scheduled_at in datum und uhrzeit ohne embargo', functi $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.edit', ['id' => $pr->id]) + Livewire::test('customer.press-releases.edit', ['id' => $pr->id]) ->assertSet('publishMode', 'scheduled') ->assertSet('scheduledAt', '2026-06-05T14:30') ->assertSet('scheduledDate', '2026-06-05') diff --git a/tests/Feature/CustomerProfileSecurityTest.php b/tests/Feature/CustomerProfileSecurityTest.php index 50cacd1a..91f4cf5a 100644 --- a/tests/Feature/CustomerProfileSecurityTest.php +++ b/tests/Feature/CustomerProfileSecurityTest.php @@ -16,7 +16,7 @@ use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Mail; use Illuminate\Support\Facades\URL; use Livewire\Features\SupportLockedProperties\CannotUpdateLockedPropertyException; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use PragmaRX\Google2FA\Google2FA; use Tests\TestCase; @@ -30,7 +30,7 @@ test('customer can update own profile fields', function () { $this->actingAs($customer); - LivewireVolt::test('customer.profile') + Livewire::test('customer.profile') ->assertSee('Rechnungsadresse') ->assertSee('Agentur-Angaben') ->set('name', 'Neuer Anzeigename') @@ -80,7 +80,7 @@ test('an incomplete billing address reports each missing field exactly once', fu $this->actingAs($customer); - LivewireVolt::test('customer.profile') + Livewire::test('customer.profile') ->set('billingCompany', 'Nur Firma GmbH') ->call('saveProfile') ->assertHasErrors(['billingLastName', 'billingAddress1', 'billingPostalCode', 'billingCity']); @@ -95,7 +95,7 @@ test('every profile panel offers a save button', function () { // 6 Panels (Persönliche Daten, Konto & Sicherheit, Rechnungsadresse, // Agentur-Angaben, E-Mail-Benachrichtigungen, Einstellungen) — jedes mit // eigenem Submit-Button für dasselbe Formular. - $html = LivewireVolt::test('customer.profile')->html(); + $html = Livewire::test('customer.profile')->html(); expect(substr_count($html, 'type="submit"'))->toBe(6); }); @@ -106,7 +106,7 @@ test('a malformed vat id blocks saving with a field error', function () { $this->actingAs($customer); - LivewireVolt::test('customer.profile') + Livewire::test('customer.profile') ->set('taxIdNumber', '123-nicht-gueltig') ->call('saveProfile') ->assertHasErrors(['taxIdNumber']); @@ -118,7 +118,7 @@ test('the profile data can be copied into the billing address', function () { $this->actingAs($customer); - LivewireVolt::test('customer.profile') + Livewire::test('customer.profile') ->set('salutationKey', 'mr') ->set('firstName', 'Kopier') ->set('lastName', 'Kunde') @@ -141,7 +141,7 @@ test('customer profile keeps company management out of the profile page', functi $this->actingAs($customer); - LivewireVolt::test('customer.profile') + Livewire::test('customer.profile') ->assertSee('Rechnungsadresse') ->assertSee('Persönliche Daten') ->assertSee('Firmen verwalten') @@ -158,7 +158,7 @@ test('customer can save profile settings without a billing address', function () $this->actingAs($customer); - LivewireVolt::test('customer.profile') + Livewire::test('customer.profile') ->set('name', 'Nur Profil') ->set('firstName', 'Nur') ->set('lastName', 'Profil') @@ -178,7 +178,7 @@ test('customer security page renders password and email forms', function () { $this->actingAs($customer); - LivewireVolt::test('customer.security') + Livewire::test('customer.security') ->assertSee('Konto-Sicherheit') ->assertSee('Letzter Login') ->assertSee('Aktive Sessions') @@ -196,7 +196,7 @@ test('customer can change own password through security page', function () { $this->actingAs($customer); - LivewireVolt::test('customer.security') + Livewire::test('customer.security') ->set('current_password', 'current-password') ->set('password', 'new-strong-password') ->set('password_confirmation', 'new-strong-password') @@ -214,7 +214,7 @@ test('two factor setup only becomes active after confirming an app code', functi $this->actingAs($customer); - $component = LivewireVolt::test('customer.security') + $component = Livewire::test('customer.security') ->call('enableTwoFactorAuthentication'); $customer->refresh(); @@ -243,7 +243,7 @@ test('an invalid two factor confirmation code is rejected', function () { $this->actingAs($customer); - LivewireVolt::test('customer.security') + Livewire::test('customer.security') ->call('enableTwoFactorAuthentication') ->set('twoFactorCode', '000000') ->call('confirmTwoFactorAuthentication') @@ -263,7 +263,7 @@ test('recovery codes stay hidden on a later visit to the security page', functio $this->actingAs($customer); - LivewireVolt::test('customer.security') + Livewire::test('customer.security') ->assertDontSee('geheim-code-eins') ->call('regenerateRecoveryCodes') ->assertSee('Wiederherstellungs-Codes'); @@ -281,7 +281,7 @@ test('changing the email keeps the old address active and mails a confirm link t $this->actingAs($customer); - LivewireVolt::test('customer.security') + Livewire::test('customer.security') ->set('email', 'neu@example.com') ->set('securityPassword', 'password') ->call('updateEmail') @@ -352,7 +352,7 @@ test('a pending email change can be discarded', function () { $this->actingAs($customer); - LivewireVolt::test('customer.security') + Livewire::test('customer.security') ->call('cancelPendingEmailChange'); expect($customer->refresh()->pending_email)->toBeNull(); @@ -430,7 +430,7 @@ test('customer press releases derive portal from selected company', function () $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->set('companyId', $company->id) ->set('portal', Portal::Businessportal24->value) ->set('categoryId', Category::factory()->create()->id) @@ -485,7 +485,7 @@ test('customer press release detail shows assigned contacts and status history', $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pressRelease->id]) + Livewire::test('customer.press-releases.show', ['id' => $pressRelease->id]) ->assertSee('Alpha Detailmeldung') ->assertSee('Status-Workflow') ->assertSee('Firma & Pressekontakt') @@ -554,7 +554,7 @@ test('recovery codes cannot be revealed by mutating the component property (Audi $this->actingAs($customer); - LivewireVolt::test('customer.security') + Livewire::test('customer.security') ->set('showRecoveryCodes', true) ->assertDontSee('geheim-code-eins'); })->throws(CannotUpdateLockedPropertyException::class); @@ -571,18 +571,18 @@ test('disabling two-factor requires a current app code (Audit F03)', function () $this->actingAs($customer); - LivewireVolt::test('customer.security') + Livewire::test('customer.security') ->call('disableTwoFactorAuthentication') ->assertHasErrors(['securityCode']); - LivewireVolt::test('customer.security') + Livewire::test('customer.security') ->set('securityCode', '000000') ->call('disableTwoFactorAuthentication') ->assertHasErrors(['securityCode']); expect($customer->fresh()->hasEnabledTwoFactorAuthentication())->toBeTrue(); - LivewireVolt::test('customer.security') + Livewire::test('customer.security') ->set('securityCode', app(Google2FA::class)->getCurrentOtp($secret)) ->call('disableTwoFactorAuthentication') ->assertHasNoErrors(); @@ -601,13 +601,13 @@ test('regenerating recovery codes accepts a recovery code as proof and consumes $this->actingAs($customer); - LivewireVolt::test('customer.security') + Livewire::test('customer.security') ->call('regenerateRecoveryCodes') ->assertHasErrors(['securityCode']); expect($customer->fresh()->recoveryCodes())->toContain('geheim-code-eins'); - LivewireVolt::test('customer.security') + Livewire::test('customer.security') ->set('securityCode', 'geheim-code-eins') ->call('regenerateRecoveryCodes') ->assertHasNoErrors() @@ -622,7 +622,7 @@ test('cancelling an unconfirmed two-factor setup needs no proof', function () { $customer = User::factory()->create(['is_active' => true]); $this->actingAs($customer); - LivewireVolt::test('customer.security') + Livewire::test('customer.security') ->call('enableTwoFactorAuthentication') ->call('disableTwoFactorAuthentication') ->assertHasNoErrors(); @@ -637,12 +637,12 @@ test('changing the email asks for the password, or for the app code once two-fac $customer = User::factory()->create(['is_active' => true, 'email' => 'alt2@example.com']); $this->actingAs($customer); - LivewireVolt::test('customer.security') + Livewire::test('customer.security') ->set('email', 'neu2@example.com') ->call('updateEmail') ->assertHasErrors(['securityPassword']); - LivewireVolt::test('customer.security') + Livewire::test('customer.security') ->set('email', 'neu2@example.com') ->set('securityPassword', 'falsch') ->call('updateEmail') @@ -657,13 +657,13 @@ test('changing the email asks for the password, or for the app code once two-fac 'two_factor_confirmed_at' => now(), ])->save(); - LivewireVolt::test('customer.security') + Livewire::test('customer.security') ->set('email', 'neu2@example.com') ->set('securityPassword', 'password') ->call('updateEmail') ->assertHasErrors(['securityCode']); - LivewireVolt::test('customer.security') + Livewire::test('customer.security') ->set('email', 'neu2@example.com') ->set('securityCode', app(Google2FA::class)->getCurrentOtp($secret)) ->call('updateEmail') @@ -682,7 +682,7 @@ test('a passwordless magic-link account can still start an email change', functi DB::table('users')->where('id', $customer->id)->update(['password' => '']); $this->actingAs($customer->fresh()); - LivewireVolt::test('customer.security') + Livewire::test('customer.security') ->set('email', 'magic-neu@example.com') ->call('updateEmail') ->assertHasNoErrors(); diff --git a/tests/Feature/EmailNotificationPreferencesTest.php b/tests/Feature/EmailNotificationPreferencesTest.php index 730d031c..0d195d13 100644 --- a/tests/Feature/EmailNotificationPreferencesTest.php +++ b/tests/Feature/EmailNotificationPreferencesTest.php @@ -11,7 +11,7 @@ use App\Services\PressRelease\PressReleaseService; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Facades\Mail; use Illuminate\Support\Facades\URL; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; /** @@ -174,14 +174,14 @@ test('customers can manage their email notification preferences in the profile', $this->actingAs($customer); - LivewireVolt::test('customer.profile') + Livewire::test('customer.profile') ->set('emailNotifications.'.EmailNotificationType::PressReleasePublished->value, false) ->call('saveProfile') ->assertHasNoErrors(); expect($customer->fresh()->wantsEmailNotification(EmailNotificationType::PressReleasePublished))->toBeFalse(); - LivewireVolt::test('customer.profile') + Livewire::test('customer.profile') ->set('emailNotifications.'.EmailNotificationType::PressReleasePublished->value, true) ->call('saveProfile') ->assertHasNoErrors(); diff --git a/tests/Feature/Images/ImageLifecycleTest.php b/tests/Feature/Images/ImageLifecycleTest.php index 92745d44..292d5089 100644 --- a/tests/Feature/Images/ImageLifecycleTest.php +++ b/tests/Feature/Images/ImageLifecycleTest.php @@ -25,7 +25,7 @@ use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Mail; use Illuminate\Support\Facades\Storage; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\Support\FailingDisk; use Tests\TestCase; @@ -164,7 +164,7 @@ test('the admin page reports the gate instead of crashing', function () { lifecycleImage($pr, confirmed: false); $this->actingAs(lifecycleAdmin()); - LivewireVolt::test('admin.press-releases.show', ['id' => $pr->id]) + Livewire::test('admin.press-releases.show', ['id' => $pr->id]) ->call('publish') ->assertHasNoErrors(); @@ -358,7 +358,7 @@ test('the admin page applies a correction with a mandatory reason', function () $image = lifecycleImage($pr); $this->actingAs(lifecycleAdmin()); - LivewireVolt::test('admin.press-releases.show', ['id' => $pr->id]) + Livewire::test('admin.press-releases.show', ['id' => $pr->id]) ->assertSee('Bildnachweis und Kennzeichnung korrigieren') ->set('correctionAiDeclaration', 'ai_edited') ->call('correctImage') diff --git a/tests/Feature/Images/ImagePipelineAuditTest.php b/tests/Feature/Images/ImagePipelineAuditTest.php index 7b7157cf..26df6693 100644 --- a/tests/Feature/Images/ImagePipelineAuditTest.php +++ b/tests/Feature/Images/ImagePipelineAuditTest.php @@ -41,7 +41,7 @@ use Illuminate\Support\Facades\Exceptions; use Illuminate\Support\Facades\Mail; use Illuminate\Support\Facades\Storage; use Laravel\Sanctum\Sanctum; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Mockery\MockInterface; use Tests\Support\FailingDisk; use Tests\TestCase; @@ -182,7 +182,7 @@ test('the start page feed shows the placeholder for a withheld and for an unconf ['pr' => $pr] = pipelineRelease(); $image = PressReleaseImage::factory()->for($pr)->rulesV2()->create(array_merge(['copyright' => 'Geheime Agentur'], $attributes)); - LivewireVolt::test('web.press-release-feed', ['portal' => Portal::Presseecho->value, 'language' => 'de']) + Livewire::test('web.press-release-feed', ['portal' => Portal::Presseecho->value, 'language' => 'de']) ->assertSee($pr->title) ->assertDontSee(route('media.press-release-images.show', ['image' => $image->id]), false) ->assertDontSee('Geheime Agentur'); @@ -196,7 +196,7 @@ test('the start page feed still shows a released image with its credit', functio ['pr' => $pr] = pipelineRelease(); $image = PressReleaseImage::factory()->for($pr)->rulesV2()->create(['copyright' => 'Freie Agentur']); - LivewireVolt::test('web.press-release-feed', ['portal' => Portal::Presseecho->value, 'language' => 'de']) + Livewire::test('web.press-release-feed', ['portal' => Portal::Presseecho->value, 'language' => 'de']) ->assertSee(route('media.press-release-images.show', ['image' => $image->id]), false) ->assertSee('Foto: Freie Agentur'); }); @@ -249,7 +249,7 @@ test('a 13 mib file passes the livewire upload in the v2 manager', function () { ['owner' => $owner, 'pr' => $pr] = pipelineRelease('draft'); $this->actingAs($owner); - LivewireVolt::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) ->call('openUploadForm') ->set('newImage', UploadedFile::fake()->image('gross.jpg', 1200, 800)->size(13 * 1024)) ->assertHasNoErrors('newImage'); @@ -361,7 +361,7 @@ test('the customer confirmation is bound to the image shown and refuses a replac $first = PressReleaseImage::factory()->for($pr)->rulesV2()->create(['rights_confirmed_at' => null, 'customer_confirmation_requested_at' => now()]); $this->actingAs($owner); - $component = LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + $component = Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSet('confirmImageId', $first->id) ->set('imageRightsConfirmed', true); @@ -653,7 +653,7 @@ test('an admin who owns the release follows the customer status rule in the mana $pr->forceFill(['user_id' => $admin->id])->save(); $this->actingAs($admin); - LivewireVolt::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) ->call('openUploadForm') ->set('newImage', UploadedFile::fake()->image('foto.jpg', 1200, 800)) ->set('newCopyright', 'Beispiel AG') @@ -759,7 +759,7 @@ test('a processing error in the image service becomes a form error instead of a $mock->shouldReceive('deletePressReleaseImage')->andReturnNull(); })); - LivewireVolt::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) ->call('openUploadForm') ->set('newImage', UploadedFile::fake()->image('foto.jpg', 1200, 800)) ->set('newCopyright', 'Beispiel AG') diff --git a/tests/Feature/Images/ImagePrecheckTest.php b/tests/Feature/Images/ImagePrecheckTest.php index b6191a47..0d2ae956 100644 --- a/tests/Feature/Images/ImagePrecheckTest.php +++ b/tests/Feature/Images/ImagePrecheckTest.php @@ -25,7 +25,7 @@ use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Storage; use Laravel\Sanctum\Sanctum; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -415,7 +415,7 @@ test('the admin page shows the review panel and approves with a note', function $this->actingAs(precheckAdmin()); - LivewireVolt::test('admin.press-releases.show', ['id' => $pr->id]) + Livewire::test('admin.press-releases.show', ['id' => $pr->id]) ->assertSee('Bild-Sichtung: Vorab-Check hat etwas gefunden') ->assertSee('Kfz-Kennzeichen lesbar') ->call('approvePrecheck') @@ -439,14 +439,14 @@ test('the form shows the rejection under the file field and hints after prefligh precheckFakeSequence(['stock_watermark' => 0.9], ['persons_visible' => 0.9, 'looks_ai_generated' => 0.8]); - LivewireVolt::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) ->call('openUploadForm') ->set('newImage', UploadedFile::fake()->image('foto.jpg', 1200, 800)) ->assertHasErrors(['newImage']) ->assertSee('Wasserzeichen einer Bildagentur') ->assertSet('newImage', null); - LivewireVolt::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) ->call('openUploadForm') ->set('newImage', UploadedFile::fake()->image('foto.jpg', 1200, 800)) ->assertHasNoErrors() diff --git a/tests/Feature/Images/PressReleaseImageRightsV2Test.php b/tests/Feature/Images/PressReleaseImageRightsV2Test.php index 8d308f18..037322d9 100644 --- a/tests/Feature/Images/PressReleaseImageRightsV2Test.php +++ b/tests/Feature/Images/PressReleaseImageRightsV2Test.php @@ -21,7 +21,7 @@ use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Mail; use Illuminate\Support\Facades\Storage; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; /** @@ -120,12 +120,12 @@ test('the edit page embeds the v2 manager only while the flag is on', function ( ['owner' => $owner, 'pr' => $pr] = makeRightsV2Draft(); $this->actingAs($owner); - LivewireVolt::test('customer.press-releases.edit', ['id' => $pr->id]) + Livewire::test('customer.press-releases.edit', ['id' => $pr->id]) ->assertSeeLivewire('components.press-release-images-manager-v2'); config()->set('images.rights_v2', false); - LivewireVolt::test('customer.press-releases.edit', ['id' => $pr->id]) + Livewire::test('customer.press-releases.edit', ['id' => $pr->id]) ->assertSeeLivewire('components.press-release-images-manager') ->assertDontSeeLivewire('components.press-release-images-manager-v2'); }); @@ -135,7 +135,7 @@ test('nachweis, kennzeichnung and the confirmation are the only required inputs' ['owner' => $owner, 'pr' => $pr] = makeRightsV2Draft(); $this->actingAs($owner); - LivewireVolt::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) ->call('openUploadForm') ->set('newImage', UploadedFile::fake()->image('foto.jpg', 1200, 800)) ->set('newCopyright', '') @@ -151,7 +151,7 @@ test('without metadata the company name is suggested as credit and the state say ['owner' => $owner, 'pr' => $pr] = makeRightsV2Draft(); $this->actingAs($owner); - LivewireVolt::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) ->call('openUploadForm') ->set('newImage', UploadedFile::fake()->image('foto.jpg', 1200, 800)) ->assertSet('newCopyright', 'Beispiel AG') @@ -164,7 +164,7 @@ test('iptc and xmp metadata prefill credit and ai declaration and can be changed ['owner' => $owner, 'pr' => $pr] = makeRightsV2Draft(); $this->actingAs($owner); - $component = LivewireVolt::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) + $component = Livewire::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) ->call('openUploadForm') ->set('newImage', rightsV2Fixture('camera-iptc.jpg')) ->assertSet('newCopyright', 'Musterfirma GmbH / Anna Beispiel') @@ -186,7 +186,7 @@ test('a manual credit survives a file change but the confirmation toggle does no ['owner' => $owner, 'pr' => $pr] = makeRightsV2Draft(); $this->actingAs($owner); - LivewireVolt::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) ->call('openUploadForm') ->set('newImage', UploadedFile::fake()->image('a.jpg', 640, 480)) ->set('newCopyright', 'Eigener Nachweis') @@ -201,7 +201,7 @@ test('an unreadable file shows the error state and is not accepted', function () ['owner' => $owner, 'pr' => $pr] = makeRightsV2Draft(); $this->actingAs($owner); - LivewireVolt::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) ->call('openUploadForm') ->set('newImage', rightsV2Fixture('broken.jpg')) ->assertHasErrors(['newImage']); @@ -212,7 +212,7 @@ test('a valid upload stores the image under the new rules with a confirmation an ['owner' => $owner, 'pr' => $pr] = makeRightsV2Draft(); $this->actingAs($owner); - LivewireVolt::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) ->call('openUploadForm') ->set('newImage', rightsV2Fixture('camera-iptc.jpg')) ->set('newAiDeclaration', AiImageDeclaration::Original->value) @@ -257,7 +257,7 @@ test('an admin upload skips the confirmation, mails the customer and blocks noth $admin->assignRole('admin'); $this->actingAs($admin); - LivewireVolt::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) ->call('openUploadForm') ->set('newImage', UploadedFile::fake()->image('foto.jpg', 1200, 800)) ->set('newCopyright', 'Beispiel AG') @@ -285,7 +285,7 @@ test('the customer confirms an admin upload on the detail page with the magic li ]); $this->actingAs($owner); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Titelbild bestätigen') ->call('confirmImageRights') ->assertHasErrors(['imageRightsConfirmed']) @@ -308,7 +308,7 @@ test('removing a never published image deletes original, derivatives and confirm ['owner' => $owner, 'pr' => $pr] = makeRightsV2Draft(); $this->actingAs($owner); - $component = LivewireVolt::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) + $component = Livewire::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) ->call('openUploadForm') ->set('newImage', UploadedFile::fake()->image('foto.jpg', 1200, 800)) ->set('newAiDeclaration', AiImageDeclaration::Original->value) @@ -335,7 +335,7 @@ test('removing a once published image moves original and confirmation into the e $admin->assignRole('admin'); $this->actingAs($admin); - LivewireVolt::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) ->call('openUploadForm') ->set('newImage', UploadedFile::fake()->image('foto.jpg', 1200, 800)) ->set('newCopyright', 'Beispiel AG') @@ -346,7 +346,7 @@ test('removing a once published image moves original and confirmation into the e $image = $pr->images()->sole(); $image->forceFill(['published_ever_at' => now()])->save(); - LivewireVolt::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) ->call('remove', $image->id); $trashed = PressReleaseImage::withTrashed()->whereKey($image->id)->sole(); @@ -370,7 +370,7 @@ test('an admin upload on a published press release stays hidden on page, og and $admin->assignRole('admin'); $this->actingAs($admin); - LivewireVolt::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) ->call('openUploadForm') ->set('newImage', UploadedFile::fake()->image('foto.jpg', 1200, 800)) ->set('newCopyright', 'Beispiel AG') @@ -393,7 +393,7 @@ test('an admin upload on a published press release stays hidden on page, og and $this->get($mediaUrl)->assertNotFound(); $this->actingAs($owner); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Titelbild bestätigen') ->set('imageRightsConfirmed', true) ->call('confirmImageRights') @@ -433,7 +433,7 @@ test('only the account owner may confirm an admin upload: team member, super adm ->and($owner->can('confirmImageRights', $pr))->toBeTrue(); $this->actingAs($member); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertDontSee('Titelbild bestätigen') ->set('imageRightsConfirmed', true) ->call('confirmImageRights') @@ -460,7 +460,7 @@ test('a confirmation text replaced between render and save must be read and conf ['pr' => $pr, 'owner' => $owner] = makeRightsV2Draft(); $this->actingAs($owner); - $component = LivewireVolt::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) + $component = Livewire::test('components.press-release-images-manager-v2', ['pressReleaseId' => $pr->id]) ->assertSet('legalTextKey', 'img-confirm-v2') ->call('openUploadForm') ->set('newImage', UploadedFile::fake()->image('foto.jpg', 1200, 800)) @@ -493,7 +493,7 @@ test('the confirmation on the detail page is bound to the text version shown', f ]); $this->actingAs($owner); - $component = LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + $component = Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSet('imageLegalTextKey', 'img-confirm-v2') ->set('imageRightsConfirmed', true); diff --git a/tests/Feature/Legal/AdminLegalRequestExecutionTest.php b/tests/Feature/Legal/AdminLegalRequestExecutionTest.php index c588f7aa..f907e7a0 100644 --- a/tests/Feature/Legal/AdminLegalRequestExecutionTest.php +++ b/tests/Feature/Legal/AdminLegalRequestExecutionTest.php @@ -10,7 +10,7 @@ use App\Models\User; use App\Services\PressRelease\AnonymizationService; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Facades\Mail; -use Livewire\Volt\Volt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function () { @@ -37,7 +37,7 @@ test('an admin can preview and execute an anonymization from the queue', functio ->type(LegalRequestType::Dsgvo) ->create(['press_release_id' => $pressRelease->id]); - Volt::test('admin.legal-requests.show', ['id' => $request->id]) + Livewire::test('admin.legal-requests.show', ['id' => $request->id]) ->set('redactionTerms', "Matvey Teplitsky\nTeplitsky") ->set('redactionReplacement', 'der Sprecher') ->call('previewAnonymization') @@ -66,7 +66,7 @@ test('the panel prefills the replacement and shows the full content for copying ->type(LegalRequestType::Dsgvo) ->create(['press_release_id' => $pressRelease->id]); - Volt::test('admin.legal-requests.show', ['id' => $request->id]) + Livewire::test('admin.legal-requests.show', ['id' => $request->id]) ->assertSet('redactionReplacement', AnonymizationService::DEFAULT_REPLACEMENT) ->assertSee('Ansprechpartner ist Matvey Teplitsky') ->set('redactionTerms', 'Matvey Teplitsky') @@ -99,7 +99,7 @@ test('the editor is prefilled from a structured web redaction order', function ( ], ]); - Volt::test('admin.legal-requests.show', ['id' => $request->id]) + Livewire::test('admin.legal-requests.show', ['id' => $request->id]) ->assertSet('redactionTerms', "Max Mustermann\nMustermanns") ->assertSet('detachContacts', false) ->assertSee('Strukturierter Schwärzungsauftrag') @@ -121,7 +121,7 @@ test('executing sends an execution confirmation to the requester', function () { 'requester_email' => 'presse@firma.example', ]); - Volt::test('admin.legal-requests.show', ['id' => $request->id]) + Livewire::test('admin.legal-requests.show', ['id' => $request->id]) ->set('redactionTerms', 'Matvey Teplitsky') ->call('previewAnonymization') ->call('executeAnonymization') @@ -141,7 +141,7 @@ test('execute without a prior preview is refused', function () { ->type(LegalRequestType::Dsgvo) ->create(['press_release_id' => $pressRelease->id]); - Volt::test('admin.legal-requests.show', ['id' => $request->id]) + Livewire::test('admin.legal-requests.show', ['id' => $request->id]) ->set('redactionTerms', 'Original') ->call('executeAnonymization') ->assertHasErrors('redactionTerms'); @@ -159,7 +159,7 @@ test('an admin can depublish instead of anonymizing', function () { ->type(LegalRequestType::Dsgvo) ->create(['press_release_id' => $pressRelease->id]); - Volt::test('admin.legal-requests.show', ['id' => $request->id]) + Livewire::test('admin.legal-requests.show', ['id' => $request->id]) ->call('depublishRelease') ->assertHasNoErrors(); @@ -184,7 +184,7 @@ test('an executed anonymization can be rolled back from the snapshot', function ->type(LegalRequestType::Dsgvo) ->create(['press_release_id' => $pressRelease->id]); - Volt::test('admin.legal-requests.show', ['id' => $request->id]) + Livewire::test('admin.legal-requests.show', ['id' => $request->id]) ->set('redactionTerms', 'Matvey Teplitsky') ->call('previewAnonymization') ->call('executeAnonymization') @@ -212,7 +212,7 @@ test('anonymization actions are forbidden without the compliance permission', fu ->type(LegalRequestType::Dsgvo) ->create(['press_release_id' => $pressRelease->id]); - Volt::test('admin.legal-requests.show', ['id' => $request->id]) + Livewire::test('admin.legal-requests.show', ['id' => $request->id]) ->set('redactionTerms', 'Original') ->call('previewAnonymization') ->assertForbidden(); diff --git a/tests/Feature/Legal/CustomerCorrectionPanelTest.php b/tests/Feature/Legal/CustomerCorrectionPanelTest.php index 4709809f..e11c2223 100644 --- a/tests/Feature/Legal/CustomerCorrectionPanelTest.php +++ b/tests/Feature/Legal/CustomerCorrectionPanelTest.php @@ -10,7 +10,7 @@ use App\Services\PressRelease\BlacklistService; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Facades\Mail; use Illuminate\Support\Facades\Queue; -use Livewire\Volt\Volt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function () { @@ -39,7 +39,7 @@ test('an owner can apply a minor correction from the panel and it goes live inst 'title' => 'Betrieb genomen', ]); - Volt::test('customer.press-releases.show', ['id' => $pressRelease->id]) + Livewire::test('customer.press-releases.show', ['id' => $pressRelease->id]) ->call('startCorrection') ->set('correctionValues.title', 'Betrieb genommen') ->call('previewCorrection') @@ -73,7 +73,7 @@ test('a major change passes the green precheck and unlocks the payment step', fu 'title' => 'Solaranlage in Hamburg eroeffnet und in Betrieb', ]); - Volt::test('customer.press-releases.show', ['id' => $pressRelease->id]) + Livewire::test('customer.press-releases.show', ['id' => $pressRelease->id]) ->call('startCorrection') ->set('correctionValues.title', 'Solaranlage in Muenchen eroeffnet und in Vollbetrieb') ->call('previewCorrection') @@ -108,7 +108,7 @@ test('a red precheck rejects the change before payment and the process is one-ti 'title' => 'Solaranlage in Hamburg eroeffnet und in Betrieb', ]); - Volt::test('customer.press-releases.show', ['id' => $pressRelease->id]) + Livewire::test('customer.press-releases.show', ['id' => $pressRelease->id]) ->call('startCorrection') ->set('correctionValues.title', 'Solaranlage in Hamburg eroeffnet mit Skandalwort dabei') ->call('previewCorrection') @@ -125,7 +125,7 @@ test('a red precheck rejects the change before payment and the process is one-ti ->and($pressRelease->fresh()->title)->toBe('Solaranlage in Hamburg eroeffnet und in Betrieb'); // Nur einmal möglich: nach der Ablehnung gibt es keinen zweiten Anlauf. - Volt::test('customer.press-releases.show', ['id' => $pressRelease->id]) + Livewire::test('customer.press-releases.show', ['id' => $pressRelease->id]) ->call('startCorrection') ->set('correctionValues.title', 'Solaranlage in Muenchen eroeffnet und in Vollbetrieb') ->call('previewCorrection') @@ -145,7 +145,7 @@ test('a change above the paid distance limit cannot be booked at all', function 'title' => 'Kurzer Titel der Mitteilung', ]); - Volt::test('customer.press-releases.show', ['id' => $pressRelease->id]) + Livewire::test('customer.press-releases.show', ['id' => $pressRelease->id]) ->call('startCorrection') ->set('correctionValues.title', 'Ein voellig anderer, deutlich laengerer und inhaltlich komplett neuer Titel') ->call('previewCorrection') @@ -166,7 +166,7 @@ test('a legacy plain-text release is prefilled as paragraphs and counts as uncha 'text' => "Erster Absatz.\r\n\r\nZweiter Absatz mit Inhalt.", ]); - $component = Volt::test('customer.press-releases.show', ['id' => $pressRelease->id]) + $component = Livewire::test('customer.press-releases.show', ['id' => $pressRelease->id]) ->call('startCorrection'); expect($component->get('correctionValues')['text'])->toContain('Erster Absatz.
'); @@ -192,7 +192,7 @@ test('the panel names the weekly limit and the brake message states it too', fun 'title' => 'Titel B1', ]); - $component = Volt::test('customer.press-releases.show', ['id' => $pressRelease->id]) + $component = Livewire::test('customer.press-releases.show', ['id' => $pressRelease->id]) ->assertSee('höchstens eine kostenlose Korrektur pro Woche') ->call('startCorrection') ->set('correctionValues.title', 'Titel B2') @@ -221,7 +221,7 @@ test('apply without preview is refused', function () { 'title' => 'Original', ]); - Volt::test('customer.press-releases.show', ['id' => $pressRelease->id]) + Livewire::test('customer.press-releases.show', ['id' => $pressRelease->id]) ->call('startCorrection') ->set('correctionValues.title', 'Origina') ->call('applyCorrection') diff --git a/tests/Feature/Legal/CustomerDsgvoPanelTest.php b/tests/Feature/Legal/CustomerDsgvoPanelTest.php index 011a7fd8..aea50734 100644 --- a/tests/Feature/Legal/CustomerDsgvoPanelTest.php +++ b/tests/Feature/Legal/CustomerDsgvoPanelTest.php @@ -10,7 +10,7 @@ use App\Models\PressRelease; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Facades\Mail; -use Livewire\Volt\Volt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function () { @@ -33,7 +33,7 @@ test('the concerns modal offers all four tracks', function () { $pressRelease = PressRelease::factory()->published()->create(['user_id' => $owner->id]); - Volt::test('customer.press-releases.show', ['id' => $pressRelease->id]) + Livewire::test('customer.press-releases.show', ['id' => $pressRelease->id]) ->assertSee('Was möchten Sie tun?') ->assertSee('Kleine Korrektur') ->assertSee('Inhaltliche Änderung') @@ -51,7 +51,7 @@ test('the dsgvo preview validates input and never touches the release', function 'title' => 'Max Mustermann übernimmt die Leitung', ]); - $component = Volt::test('customer.press-releases.show', ['id' => $pressRelease->id]); + $component = Livewire::test('customer.press-releases.show', ['id' => $pressRelease->id]); // Leeres Formular → Fehler. $component->call('previewDsgvo')->assertHasErrors('dsgvo'); @@ -83,7 +83,7 @@ test('the confirmed dsgvo submission creates a verified open request for the adm 'title' => 'Max Mustermann übernimmt die Leitung', ]); - Volt::test('customer.press-releases.show', ['id' => $pressRelease->id]) + Livewire::test('customer.press-releases.show', ['id' => $pressRelease->id]) ->set('dsgvoTerms', "Max Mustermann\nMustermanns") ->set('dsgvoDetachContacts', true) ->set('dsgvoMessage', 'Ich bin die betroffene Person und wünsche die Entfernung.') @@ -126,7 +126,7 @@ test('a second open dsgvo request for the same release is blocked', function () 'status' => LegalRequestStatus::Open, ]); - Volt::test('customer.press-releases.show', ['id' => $pressRelease->id]) + Livewire::test('customer.press-releases.show', ['id' => $pressRelease->id]) ->set('dsgvoTerms', 'Max Mustermann') ->set('dsgvoMessage', 'Bitte meinen Namen entfernen, danke.') ->call('previewDsgvo') diff --git a/tests/Feature/Legal/LegalAcceptanceGateTest.php b/tests/Feature/Legal/LegalAcceptanceGateTest.php index 91a8f59f..65113b9d 100644 --- a/tests/Feature/Legal/LegalAcceptanceGateTest.php +++ b/tests/Feature/Legal/LegalAcceptanceGateTest.php @@ -15,7 +15,7 @@ use Illuminate\Support\Facades\Exceptions; use Illuminate\Support\Facades\Mail; use Laravel\Sanctum\Sanctum; use Livewire\Features\SupportLockedProperties\CannotUpdateLockedPropertyException; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; /** @@ -57,7 +57,7 @@ test('with the gate off nothing is required and submitting works as before', fun expect(app(LegalAcceptanceGate::class)->requiredFor($owner))->toBeEmpty(); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertDontSee('Neue Fassung unserer Bedingungen') ->set('aiTextDeclaration', 'none') ->set('aiDeclarationConfirmed', true) @@ -76,7 +76,7 @@ test('with the gate on the submit requires an active acceptance of agb and guide expect(app(LegalAcceptanceGate::class)->requiredFor($owner)->pluck('type')->all())->toBe(['agb', 'richtlinien']); - $component = LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + $component = Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Neue Fassung unserer Bedingungen') ->assertSee('Version 0.6') ->set('aiTextDeclaration', 'none') @@ -106,7 +106,7 @@ test('a confirmation is bound to the versions that were shown, a newer version m ['owner' => $owner, 'pr' => $pr] = legalGateDraft(); $this->actingAs($owner); - $component = LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + $component = Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Version 0.6') ->set('aiTextDeclaration', 'none') ->set('aiDeclarationConfirmed', true) @@ -195,7 +195,7 @@ test('the shown versions cannot be changed from the browser', function () { ['owner' => $owner, 'pr' => $pr] = legalGateDraft(); $this->actingAs($owner); - expect(fn () => LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + expect(fn () => Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->set('legalAcceptanceVersions', ['agb' => '9.9', 'richtlinien' => '9.9'])) ->toThrow(CannotUpdateLockedPropertyException::class); }); @@ -223,7 +223,7 @@ test('a version change between validation and saving is rejected instead of sile return $submitCalls === 1 ? $current : collect([$newer]); }); - $component = LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + $component = Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->set('aiTextDeclaration', 'none') ->set('aiDeclarationConfirmed', true) ->set('legalAcceptanceConfirmed', true); @@ -243,7 +243,7 @@ test('with the gate off rendering the submit pages asks nothing about legal docu $this->actingAs($owner); DB::enableQueryLog(); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id])->assertOk(); + Livewire::test('customer.press-releases.show', ['id' => $pr->id])->assertOk(); expect(collect(DB::getQueryLog())->filter(fn (array $query): bool => str_contains($query['query'], 'legal_document_acceptances')))->toBeEmpty(); }); @@ -255,7 +255,7 @@ test('with the gate on a render asks once per request, not once per modal', func $this->actingAs($owner); DB::enableQueryLog(); - LivewireVolt::test('customer.press-releases.index')->assertOk(); + Livewire::test('customer.press-releases.index')->assertOk(); // Eine Abfrage je Dokumenttyp (AGB, Richtlinien) — nicht zusätzlich je Modal. expect(collect(DB::getQueryLog())->filter(fn (array $query): bool => str_contains($query['query'], 'legal_document_acceptances')))->toHaveCount(2); @@ -270,7 +270,7 @@ test('a missing required document fails the submit, not the rendering of the pag LegalDocument::query()->where('type', 'richtlinien')->delete(); Exceptions::fake(); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertOk() ->set('aiTextDeclaration', 'none') ->set('aiDeclarationConfirmed', true) diff --git a/tests/Feature/LegalRequestTest.php b/tests/Feature/LegalRequestTest.php index 2043980f..5c9851a1 100644 --- a/tests/Feature/LegalRequestTest.php +++ b/tests/Feature/LegalRequestTest.php @@ -10,7 +10,7 @@ use App\Models\PressRelease; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Facades\Mail; -use Livewire\Volt\Volt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function () { @@ -222,7 +222,7 @@ test('the admin queue lists open requests', function () { ->type(LegalRequestType::PersonalRights) ->create(['press_release_id' => $release->id, 'status' => LegalRequestStatus::Open]); - Volt::actingAs($admin) + Livewire::actingAs($admin) ->test('admin.legal-requests.index') ->assertOk() ->assertSee('Compliance-Test PM') @@ -238,7 +238,7 @@ test('an admin can resolve a request with a note', function () { ->type(LegalRequestType::Dsgvo) ->create(['status' => LegalRequestStatus::Open]); - Volt::actingAs($admin) + Livewire::actingAs($admin) ->test('admin.legal-requests.show', ['id' => $legalRequest->id]) ->set('adminNote', 'Daten anonymisiert.') ->call('resolve'); @@ -260,7 +260,7 @@ test('an admin can reject a request', function () { ->type(LegalRequestType::Report) ->create(['status' => LegalRequestStatus::Open]); - Volt::actingAs($admin) + Livewire::actingAs($admin) ->test('admin.legal-requests.show', ['id' => $legalRequest->id]) ->call('reject'); diff --git a/tests/Feature/MailSuppressionAdminTest.php b/tests/Feature/MailSuppressionAdminTest.php index a06f4f38..a9a027ab 100644 --- a/tests/Feature/MailSuppressionAdminTest.php +++ b/tests/Feature/MailSuppressionAdminTest.php @@ -8,7 +8,7 @@ use App\Models\User; use App\Services\Mail\EmailSuppressionService; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Facades\Mail; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; /** @@ -52,7 +52,7 @@ test('the admin company page marks unreachable company and contact addresses', f app(EmailSuppressionService::class)->suppress('presse@tot.example', EmailSuppressionReason::HardBounce, 'imap'); app(EmailSuppressionService::class)->suppress('kontakt@tot.example', EmailSuppressionReason::HardBounce, 'imap'); - LivewireVolt::test('admin.companies.show', ['id' => $company->id]) + Livewire::test('admin.companies.show', ['id' => $company->id]) ->assertSee('E-Mail nicht erreichbar') ->call('setTab', 'contacts') ->assertSee('kontakt@tot.example') @@ -64,7 +64,7 @@ test('the suppression list shows, releases and manually suppresses addresses', f $admin = suppressionAdmin(); app(EmailSuppressionService::class)->suppress('presse@tot.example', EmailSuppressionReason::HardBounce, 'imap'); - $component = LivewireVolt::test('admin.mail.suppressions') + $component = Livewire::test('admin.mail.suppressions') ->assertSee('presse@tot.example') ->assertSee('Postfach existiert nicht'); diff --git a/tests/Feature/ManualReviewGateTest.php b/tests/Feature/ManualReviewGateTest.php index 22fbd405..f76ce82e 100644 --- a/tests/Feature/ManualReviewGateTest.php +++ b/tests/Feature/ManualReviewGateTest.php @@ -13,7 +13,7 @@ use App\Services\PressRelease\PressReleaseService; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Facades\Mail; use Illuminate\Support\Facades\Queue; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; /** @@ -168,12 +168,12 @@ test('the admin sees blocked releases in their own view and the detail page expl $admin->assignRole('admin'); $this->actingAs($admin); - LivewireVolt::test('admin.press-releases.index') + Livewire::test('admin.press-releases.index') ->call('setView', 'manual') ->assertSeeText('Geblockte Meldung') ->assertSeeText('Prüfung nötig'); - LivewireVolt::test('admin.press-releases.show', ['id' => $pr->id]) + Livewire::test('admin.press-releases.show', ['id' => $pr->id]) ->assertSeeText('Automatik erschöpft') ->assertSeeText('K4: Falsche Tatsachenbehauptung') ->assertSeeText('Freischalten') @@ -185,7 +185,7 @@ test('the customer page explains the release button, counts attempts and shows t [$customer, $pr] = gateDraft(); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSeeText('Zur Prüfung freigeben') ->assertSeeText('Was nach der Freigabe passiert') ->assertSeeText('Nach 2 Prüfungen mit Rot'); @@ -193,11 +193,11 @@ test('the customer page explains the release button, counts attempts and shows t $pr->update(['status' => PressReleaseStatus::Rejected->value, 'auto_check_attempts' => 1]); PressReleaseStatusLog::query()->create(['press_release_id' => $pr->id, 'from_status' => 'review', 'to_status' => 'rejected', 'reason' => 'K1: Werblich', 'source' => 'ki']); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSeeText('Automatische Prüfung 1 von 2 genutzt'); $pr->update(['status' => PressReleaseStatus::Review->value, 'auto_check_attempts' => 2, 'manual_review_required_at' => now()]); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSeeText('von einem Menschen geprüft'); }); diff --git a/tests/Feature/NewsroomProfileTest.php b/tests/Feature/NewsroomProfileTest.php index f6c3c6e2..d4018f14 100644 --- a/tests/Feature/NewsroomProfileTest.php +++ b/tests/Feature/NewsroomProfileTest.php @@ -8,7 +8,7 @@ use App\Models\ConversionEvent; use App\Models\PressRelease; use App\Models\User; use App\Services\Auth\MagicLinkGenerator; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; /** @@ -36,7 +36,7 @@ test('a customer can write the newsroom description and it shows on the public n // Seiten-Cache warm — die Änderung muss trotzdem sofort sichtbar sein. $this->get('https://businessportal24.test/de/newsroom/muster-gmbh')->assertOk()->assertDontSeeText('führender Anbieter'); - LivewireVolt::test('customer.press-kits.show', ['id' => $company->id]) + Livewire::test('customer.press-kits.show', ['id' => $company->id]) ->call('startEditCompany') ->set('companyBoilerplate', "Muster ist ein führender Anbieter für Musterlösungen.\nLink") ->call('saveCompany') @@ -55,7 +55,7 @@ test('a description that hits the red level is rejected and nothing is saved', f /** @var TestCase $this */ [$customer, $company] = profileCustomer(); - LivewireVolt::test('customer.press-kits.show', ['id' => $company->id]) + Livewire::test('customer.press-kits.show', ['id' => $company->id]) ->call('startEditCompany') ->set('companyName', 'Muster GmbH neu') ->set('companyBoilerplate', 'Wir sind ein spam-keyword Anbieter.') @@ -73,7 +73,7 @@ test('saving the profile records step three once, with the origin of the last ma $link = app(MagicLinkGenerator::class)->createLoginLink($customer, null, 15, ConversionSource::ProfileClaim); $link['magic_link']->update(['consumed_at' => now()]); - $component = LivewireVolt::test('customer.press-kits.show', ['id' => $company->id]); + $component = Livewire::test('customer.press-kits.show', ['id' => $company->id]); $component->call('startEditCompany')->set('companyBoilerplate', 'Erste Fassung.')->call('saveCompany')->assertHasNoErrors(); $component->call('startEditCompany')->set('companyBoilerplate', 'Zweite Fassung.')->call('saveCompany')->assertHasNoErrors(); @@ -88,7 +88,7 @@ test('image upload is shown as a placeholder, not offered', function () { /** @var TestCase $this */ [$customer, $company] = profileCustomer(); - LivewireVolt::test('customer.press-kits.show', ['id' => $company->id]) + Livewire::test('customer.press-kits.show', ['id' => $company->id]) ->call('startEditCompany') ->assertSee('Bilder im Newsroom') ->assertSee('BALD') diff --git a/tests/Feature/NoPromotionalTextTest.php b/tests/Feature/NoPromotionalTextTest.php index 0d4bbe69..ecacd499 100644 --- a/tests/Feature/NoPromotionalTextTest.php +++ b/tests/Feature/NoPromotionalTextTest.php @@ -5,7 +5,7 @@ use App\Models\Contact; use App\Models\User; use App\Rules\NoPromotionalText; use Illuminate\Support\Facades\Validator; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; /** @@ -64,7 +64,7 @@ test('a company name or address with a link is not saved', function () { /** @var TestCase $this */ $company = newsroomEditor($this); - LivewireVolt::test('customer.press-kits.show', ['id' => $company->id]) + Livewire::test('customer.press-kits.show', ['id' => $company->id]) ->call('startEditCompany') ->set('companyName', 'Muster GmbH – https://spam.example') ->set('companyAddress', "Musterstraße 1\nwww.spam.example") @@ -79,7 +79,7 @@ test('an address that hits the red level of the release check is not saved', fun /** @var TestCase $this */ $company = newsroomEditor($this); - LivewireVolt::test('customer.press-kits.show', ['id' => $company->id]) + Livewire::test('customer.press-kits.show', ['id' => $company->id]) ->call('startEditCompany') ->set('companyAddress', 'Musterstraße 1, spam-keyword Musterstadt') ->call('saveCompany') @@ -92,7 +92,7 @@ test('a press contact with a link in the role is not saved', function () { /** @var TestCase $this */ $company = newsroomEditor($this); - LivewireVolt::test('customer.press-kits.show', ['id' => $company->id]) + Livewire::test('customer.press-kits.show', ['id' => $company->id]) ->call('startCreateContact') ->set('contactLastName', 'Muster') ->set('contactResponsibility', 'Pressesprecher – Angebote unter https://spam.example') @@ -108,7 +108,7 @@ test('creating a company with a promotional name is refused', function () { $customer = User::factory()->create(['is_active' => true]); $this->actingAs($customer); - LivewireVolt::test('customer.press-kits.create') + Livewire::test('customer.press-kits.create') ->set('name', 'Casino Royale Bonus') ->set('portal', 'businessportal24') ->call('save') diff --git a/tests/Feature/PressReleaseAiDeclarationTest.php b/tests/Feature/PressReleaseAiDeclarationTest.php index 88b3907b..9d3de6d6 100644 --- a/tests/Feature/PressReleaseAiDeclarationTest.php +++ b/tests/Feature/PressReleaseAiDeclarationTest.php @@ -15,7 +15,7 @@ use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Queue; use Illuminate\Support\Facades\Storage; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; /** @@ -166,7 +166,7 @@ test('the create editor requires the ai declaration only when submitting for rev $this->actingAs($customer); - $component = LivewireVolt::test('customer.press-releases.create') + $component = Livewire::test('customer.press-releases.create') ->set('categoryId', $category->id) ->set('title', 'Ein gültiger Titel für die PM') ->set('text', str_repeat('Aussagekräftiger Fließtext. ', 5)); @@ -195,7 +195,7 @@ test('submitting from the create editor persists the declaration and the audit e $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->set('categoryId', $category->id) ->set('title', 'Ein gültiger Titel für die PM') ->set('text', str_repeat('Aussagekräftiger Fließtext. ', 5)) @@ -230,13 +230,13 @@ test('submitting from the detail page validates and persists the declaration', f $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->call('submitForReview') ->assertHasErrors(['aiTextDeclaration', 'aiDeclarationConfirmed']); expect($pr->fresh()->status)->toBe(PressReleaseStatus::Draft); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->set('aiTextDeclaration', AiTextDeclaration::Assisted->value) ->set('aiDeclarationConfirmed', true) ->call('submitForReview') @@ -263,7 +263,7 @@ test('the submit modal renders the declaration options and the binding confirmat $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('KI-Kennzeichnung') ->assertSee('Ohne generative KI erstellt – oder KI nur als Formulierungshilfe, mit anschließender menschlicher Überarbeitung und Verantwortung.') ->assertSee('Ganz oder überwiegend mit generativer KI erstellt.') @@ -286,7 +286,7 @@ test('image uploads require the per-image ai declaration', function () { Storage::fake('local'); $this->actingAs($customer); - LivewireVolt::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) ->set('newImage', UploadedFile::fake()->image('foto.jpg', 1200, 800)) ->set('newCopyright', 'Foto: Jane Doe') ->set('newAuthor', 'Jane Doe') diff --git a/tests/Feature/PressReleaseAttachmentsManagerTest.php b/tests/Feature/PressReleaseAttachmentsManagerTest.php index 2dfc86d1..4657d3ec 100644 --- a/tests/Feature/PressReleaseAttachmentsManagerTest.php +++ b/tests/Feature/PressReleaseAttachmentsManagerTest.php @@ -12,7 +12,7 @@ use Illuminate\Auth\Access\AuthorizationException; use Illuminate\Filesystem\FilesystemAdapter; use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Storage; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; function privateAttachmentDisk(): FilesystemAdapter @@ -56,7 +56,7 @@ test('owner can upload a PDF attachment', function () { $file = UploadedFile::fake()->create('factsheet.pdf', 200, 'application/pdf'); - LivewireVolt::test('components.press-release-attachments-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-attachments-manager', ['pressReleaseId' => $pr->id]) ->set('newFile', $file) ->set('newTitle', 'Factsheet Q1') ->set('newDescription', 'Wirtschaftliche Kennzahlen') @@ -83,7 +83,7 @@ test('upload rejects executable / disallowed file types', function () { $bad = UploadedFile::fake()->create('shell.exe', 50, 'application/octet-stream'); - LivewireVolt::test('components.press-release-attachments-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-attachments-manager', ['pressReleaseId' => $pr->id]) ->set('newFile', $bad) ->call('upload') ->assertHasErrors(['newFile']); @@ -137,7 +137,7 @@ test('upload rejects oversized files', function () { // 26 MB (limit ist 25 MB). $tooBig = UploadedFile::fake()->create('big.pdf', 26 * 1024, 'application/pdf'); - LivewireVolt::test('components.press-release-attachments-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-attachments-manager', ['pressReleaseId' => $pr->id]) ->set('newFile', $tooBig) ->call('upload') ->assertHasErrors(['newFile']); @@ -155,13 +155,13 @@ test('sort_order increments and moveUp / moveDown swap order', function () { $this->actingAs($owner); - LivewireVolt::test('components.press-release-attachments-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-attachments-manager', ['pressReleaseId' => $pr->id]) ->call('moveUp', $c->id); expect($b->fresh()->sort_order)->toBe(3); expect($c->fresh()->sort_order)->toBe(2); - LivewireVolt::test('components.press-release-attachments-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-attachments-manager', ['pressReleaseId' => $pr->id]) ->call('moveDown', $a->id); // Nach moveDown sind a und c gleich (jeweils sort=2 nach swap). Es wird der Vorgänger getauscht — also a tauscht mit c (new neighbour). @@ -177,7 +177,7 @@ test('remove deletes the row and the file', function () { $file = UploadedFile::fake()->create('toDelete.pdf', 50, 'application/pdf'); - $component = LivewireVolt::test('components.press-release-attachments-manager', ['pressReleaseId' => $pr->id]) + $component = Livewire::test('components.press-release-attachments-manager', ['pressReleaseId' => $pr->id]) ->set('newFile', $file) ->call('upload') ->assertHasNoErrors(); @@ -201,7 +201,7 @@ test('startEdit + updateAttachment update title and description', function () { $this->actingAs($owner); - LivewireVolt::test('components.press-release-attachments-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-attachments-manager', ['pressReleaseId' => $pr->id]) ->call('startEdit', $att->id) ->assertSet('editingId', $att->id) ->assertSet('editTitle', 'Alt') @@ -228,7 +228,7 @@ test('foreign customer cannot upload attachments', function () { $file = UploadedFile::fake()->create('any.pdf', 30, 'application/pdf'); try { - LivewireVolt::test('components.press-release-attachments-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-attachments-manager', ['pressReleaseId' => $pr->id]) ->set('newFile', $file) ->call('upload'); } catch (AuthorizationException) { @@ -247,7 +247,7 @@ test('attachments cannot be uploaded when PR is published', function () { $file = UploadedFile::fake()->create('any.pdf', 30, 'application/pdf'); try { - LivewireVolt::test('components.press-release-attachments-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-attachments-manager', ['pressReleaseId' => $pr->id]) ->set('newFile', $file) ->call('upload'); } catch (AuthorizationException) { @@ -285,7 +285,7 @@ test('a failed disk write creates no attachment row', function () { $file = UploadedFile::fake()->create('factsheet.pdf', 200, 'application/pdf'); - expect(fn () => LivewireVolt::test('components.press-release-attachments-manager', ['pressReleaseId' => $pr->id]) + expect(fn () => Livewire::test('components.press-release-attachments-manager', ['pressReleaseId' => $pr->id]) ->set('newFile', $file) ->set('newTitle', 'Factsheet Q1') ->call('upload')) diff --git a/tests/Feature/PressReleaseBookingGateTest.php b/tests/Feature/PressReleaseBookingGateTest.php index 475a4f0b..9188d749 100644 --- a/tests/Feature/PressReleaseBookingGateTest.php +++ b/tests/Feature/PressReleaseBookingGateTest.php @@ -12,7 +12,7 @@ use App\Services\PressRelease\BookingRequiredException; use App\Services\PressRelease\PressReleaseService; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Facades\Queue; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -46,7 +46,7 @@ test('with the gate on a draft without a booking shows the notice and links to b $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Noch keine Buchung') ->assertSee('Buchung wählen') ->assertSee(route('me.bookings.index'), false) @@ -61,7 +61,7 @@ test('with the gate on a paid single purchase unlocks the submission action', fu $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertDontSee('Noch keine Buchung') ->assertSee('Zur Prüfung freigeben'); }); @@ -103,7 +103,7 @@ test('with the gate off the notice never shows', function () { $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertDontSee('Noch keine Buchung') ->assertSee('Zur Prüfung freigeben'); }); diff --git a/tests/Feature/PressReleaseContactWarningPhase8cTest.php b/tests/Feature/PressReleaseContactWarningPhase8cTest.php index 6041980e..817bfcb3 100644 --- a/tests/Feature/PressReleaseContactWarningPhase8cTest.php +++ b/tests/Feature/PressReleaseContactWarningPhase8cTest.php @@ -7,7 +7,7 @@ use App\Models\Contact; use App\Models\PressRelease; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -48,7 +48,7 @@ test('customer create zeigt Warn-Box, wenn kein Pressekontakt gewählt ist', fun ['customer' => $customer, 'company' => $company] = makeCustomerForContactWarning(); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->set('companyId', $company->id) ->set('contactId', null) ->assertSee('Noch kein Pressekontakt ausgewählt'); @@ -59,7 +59,7 @@ test('customer create zeigt Warn-Box NICHT, wenn ein Kontakt gewählt ist', func ['customer' => $customer, 'company' => $company, 'contact' => $contact] = makeCustomerForContactWarning(); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->set('companyId', $company->id) ->set('contactId', $contact->id) ->assertDontSee('Noch kein Pressekontakt ausgewählt'); @@ -78,7 +78,7 @@ test('customer edit zeigt Warn-Box, wenn kein Pressekontakt gewählt ist', funct 'status' => PressReleaseStatus::Draft->value, ]); - LivewireVolt::test('customer.press-releases.edit', ['id' => $pr->id]) + Livewire::test('customer.press-releases.edit', ['id' => $pr->id]) ->set('contactId', null) ->assertSee('Noch kein Pressekontakt ausgewählt'); }); @@ -97,7 +97,7 @@ test('customer edit zeigt Warn-Box NICHT, wenn ein Kontakt gewählt ist', functi ]); $pr->contacts()->sync([$contact->id]); - LivewireVolt::test('customer.press-releases.edit', ['id' => $pr->id]) + Livewire::test('customer.press-releases.edit', ['id' => $pr->id]) ->assertDontSee('Noch kein Pressekontakt ausgewählt'); }); @@ -112,7 +112,7 @@ test('admin create zeigt Warn-Box, wenn kein Pressekontakt gewählt ist', functi 'phone' => '+49 30 7654321', ]); - LivewireVolt::test('admin.press-releases.create') + Livewire::test('admin.press-releases.create') ->set('companyId', $company->id) ->set('contactId', null) ->assertSee('Noch kein Pressekontakt ausgewählt'); @@ -137,7 +137,7 @@ test('admin edit zeigt Warn-Box, wenn kein Pressekontakt gewählt ist', function 'status' => PressReleaseStatus::Draft->value, ]); - LivewireVolt::test('admin.press-releases.edit', ['id' => $pr->id]) + Livewire::test('admin.press-releases.edit', ['id' => $pr->id]) ->set('contactId', null) ->assertSee('Noch kein Pressekontakt ausgewählt'); }); @@ -162,6 +162,6 @@ test('admin edit zeigt Warn-Box NICHT, wenn ein Kontakt gewählt ist', function ]); $pr->contacts()->sync([$contact->id]); - LivewireVolt::test('admin.press-releases.edit', ['id' => $pr->id]) + Livewire::test('admin.press-releases.edit', ['id' => $pr->id]) ->assertDontSee('Noch kein Pressekontakt ausgewählt'); }); diff --git a/tests/Feature/PressReleaseCreateCompanyGuardTest.php b/tests/Feature/PressReleaseCreateCompanyGuardTest.php index c55ed5a8..f37b4235 100644 --- a/tests/Feature/PressReleaseCreateCompanyGuardTest.php +++ b/tests/Feature/PressReleaseCreateCompanyGuardTest.php @@ -2,7 +2,7 @@ use App\Models\Company; use App\Models\User; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; test('the pm create page shows a notice instead of the form without a company', function () { @@ -11,7 +11,7 @@ test('the pm create page shows a notice instead of the form without a company', $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->assertSet('hasCompanies', false) ->assertSee('Ohne Firma kann keine Pressemitteilung angelegt werden.') ->assertSee('Firma anlegen') @@ -26,7 +26,7 @@ test('the pm create page shows the editor when a company exists', function () { $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->assertSet('hasCompanies', true) ->assertSet('companyId', $company->id) ->assertDontSee('Ohne Firma kann keine Pressemitteilung angelegt werden.') diff --git a/tests/Feature/PressReleaseDraftNotLostTest.php b/tests/Feature/PressReleaseDraftNotLostTest.php index 324b1ae5..b65927e7 100644 --- a/tests/Feature/PressReleaseDraftNotLostTest.php +++ b/tests/Feature/PressReleaseDraftNotLostTest.php @@ -7,7 +7,7 @@ use App\Models\Contact; use App\Models\PressRelease; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -28,7 +28,7 @@ test('create: choosing a booking from the submit modal saves the draft first', f $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->set('title', 'Entwurf der auf keinen Fall verloren gehen darf') ->set('text', str_repeat('Inhaltlich relevanter Fließtext. ', 5)) ->set('categoryId', $category->id) @@ -53,7 +53,7 @@ test('create: the submit modal offers the saving booking button when no booking $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->assertSee('Buchung erforderlich') ->assertSee('Speichern & Buchung auswählen'); }); @@ -75,7 +75,7 @@ test('edit: choosing a booking from the submit modal persists the edits first', $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.edit', ['id' => $pr->id]) + Livewire::test('customer.press-releases.edit', ['id' => $pr->id]) ->set('title', 'Bearbeiteter Titel der erhalten bleiben muss') ->set('text', str_repeat('Neuer Fließtext mit Inhalt. ', 5)) ->call('saveDraftAndChooseBooking') diff --git a/tests/Feature/PressReleaseImageLicenseTest.php b/tests/Feature/PressReleaseImageLicenseTest.php index c70cfd89..587ff690 100644 --- a/tests/Feature/PressReleaseImageLicenseTest.php +++ b/tests/Feature/PressReleaseImageLicenseTest.php @@ -9,7 +9,7 @@ use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Storage; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -43,7 +43,7 @@ test('image upload requires author, license type and rights confirmation', funct ['owner' => $owner, 'pr' => $pr] = makeImageDraftOwner(); $this->actingAs($owner); - LivewireVolt::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) ->set('newImage', UploadedFile::fake()->image('foto.jpg', 1200, 800)) ->call('saveImage') ->assertHasErrors(['newAuthor', 'newLicenseType', 'newPeopleRightsStatus', 'newPropertyRightsStatus', 'newRightsConfirmed']); @@ -56,7 +56,7 @@ test('license type starts with an explicit placeholder before own photo option', ['owner' => $owner, 'pr' => $pr] = makeImageDraftOwner(); $this->actingAs($owner); - LivewireVolt::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) ->call('openUploadForm') ->set('newImage', UploadedFile::fake()->image('foto.jpg', 1200, 800)) ->assertSet('newLicenseType', '') @@ -69,7 +69,7 @@ test('detail fields only appear after an image was selected', function () { ['owner' => $owner, 'pr' => $pr] = makeImageDraftOwner(); $this->actingAs($owner); - LivewireVolt::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) ->call('openUploadForm') ->assertSee('Bild hierher ziehen oder klicken') ->assertDontSee('Herkunft & Bildnachweis') @@ -86,7 +86,7 @@ test('title image upload form is collapsed until requested', function () { ['owner' => $owner, 'pr' => $pr] = makeImageDraftOwner(); $this->actingAs($owner); - LivewireVolt::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) ->assertSee('Hier fehlt ein Titelbild') ->assertSee('Eigenes Titelbild hochladen') ->assertDontSee('Bild hierher ziehen oder klicken') @@ -102,7 +102,7 @@ test('unclear rights selections are not accepted', function () { ['owner' => $owner, 'pr' => $pr] = makeImageDraftOwner(); $this->actingAs($owner); - LivewireVolt::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) ->set('newImage', UploadedFile::fake()->image('foto.jpg', 1200, 800)) ->set('newAuthor', 'Jane Doe') ->set('newLicenseType', ImageLicenseType::Own->value) @@ -120,7 +120,7 @@ test('cc license requires a license url', function () { ['owner' => $owner, 'pr' => $pr] = makeImageDraftOwner(); $this->actingAs($owner); - LivewireVolt::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) ->set('newImage', UploadedFile::fake()->image('foto.jpg', 1200, 800)) ->set('newAuthor', 'Jane Doe') ->set('newLicenseType', ImageLicenseType::CreativeCommons->value) @@ -139,7 +139,7 @@ test('cc license requires a concrete cc variant', function () { ['owner' => $owner, 'pr' => $pr] = makeImageDraftOwner(); $this->actingAs($owner); - LivewireVolt::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) ->set('newImage', UploadedFile::fake()->image('foto.jpg', 1200, 800)) ->set('newAuthor', 'Jane Doe') ->set('newLicenseType', ImageLicenseType::CreativeCommons->value) @@ -158,7 +158,7 @@ test('other license requires details', function () { ['owner' => $owner, 'pr' => $pr] = makeImageDraftOwner(); $this->actingAs($owner); - LivewireVolt::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) ->set('newImage', UploadedFile::fake()->image('foto.jpg', 1200, 800)) ->set('newAuthor', 'Jane Doe') ->set('newLicenseType', ImageLicenseType::Other->value) @@ -176,7 +176,7 @@ test('non previewable image uploads fail validation without preview exception', ['owner' => $owner, 'pr' => $pr] = makeImageDraftOwner(); $this->actingAs($owner); - LivewireVolt::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) ->set('newImage', UploadedFile::fake()->create('scan.tif', 100, 'image/tiff')) ->set('newAuthor', 'Jane Doe') ->set('newLicenseType', ImageLicenseType::Own->value) @@ -194,7 +194,7 @@ test('valid upload stores license metadata and confirms rights', function () { ['owner' => $owner, 'pr' => $pr] = makeImageDraftOwner(); $this->actingAs($owner); - LivewireVolt::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) ->set('newImage', UploadedFile::fake()->image('foto.jpg', 1200, 800)) ->set('newTitle', 'Maschine im Einsatz') ->set('newCopyright', 'Foto: Jane Doe / Beispiel GmbH') @@ -245,7 +245,7 @@ test('valid cc upload stores license detail and license url', function () { ['owner' => $owner, 'pr' => $pr] = makeImageDraftOwner(); $this->actingAs($owner); - LivewireVolt::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) ->set('newImage', UploadedFile::fake()->image('foto.jpg', 1200, 800)) ->set('newAuthor', 'Jane Doe') ->set('newCopyright', 'Foto: Jane Doe (CC BY 4.0)') @@ -272,7 +272,7 @@ test('the public image credit is required even when the suggestion was cleared', ['owner' => $owner, 'pr' => $pr] = makeImageDraftOwner(); $this->actingAs($owner); - LivewireVolt::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) ->set('newImage', UploadedFile::fake()->image('foto.jpg', 1200, 800)) ->set('newAuthor', 'Jane Doe') ->set('newLicenseType', ImageLicenseType::Own->value) @@ -290,7 +290,7 @@ test('switching the license type clears the stale license detail', function () { ['owner' => $owner, 'pr' => $pr] = makeImageDraftOwner(); $this->actingAs($owner); - LivewireVolt::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) ->set('newLicenseType', ImageLicenseType::CreativeCommons->value) ->set('newLicenseDetail', 'cc_by') ->set('newLicenseType', ImageLicenseType::Other->value) @@ -302,7 +302,7 @@ test('ai generated images require tool and provider terms confirmation', functio ['owner' => $owner, 'pr' => $pr] = makeImageDraftOwner(); $this->actingAs($owner); - LivewireVolt::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) ->set('newImage', UploadedFile::fake()->image('ki-bild.jpg', 1200, 800)) ->set('newAuthor', 'Beispiel GmbH') ->set('newLicenseType', ImageLicenseType::AiGenerated->value) @@ -318,7 +318,7 @@ test('a valid ai generated upload stores tool and ai flag', function () { ['owner' => $owner, 'pr' => $pr] = makeImageDraftOwner(); $this->actingAs($owner); - LivewireVolt::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) ->set('newImage', UploadedFile::fake()->image('ki-bild.jpg', 1200, 800)) ->set('newAuthor', 'Beispiel GmbH') ->set('newLicenseType', ImageLicenseType::AiGenerated->value) @@ -347,7 +347,7 @@ test('the copyright suggestion follows the author but respects manual input', fu ['owner' => $owner, 'pr' => $pr] = makeImageDraftOwner(); $this->actingAs($owner); - LivewireVolt::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) ->set('newLicenseType', ImageLicenseType::Own->value) ->set('newAuthor', 'Jane Doe') ->assertSet('newCopyright', 'Jane Doe') @@ -363,7 +363,7 @@ test('switching to ai replaces an automatically suggested author copyright', fun ['owner' => $owner, 'pr' => $pr] = makeImageDraftOwner(); $this->actingAs($owner); - LivewireVolt::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) ->set('newLicenseType', ImageLicenseType::Own->value) ->set('newAuthor', 'Jane Doe') ->assertSet('newCopyright', 'Jane Doe') @@ -378,7 +378,7 @@ test('the ai copyright suggestion follows the tool but respects manual input', f ['owner' => $owner, 'pr' => $pr] = makeImageDraftOwner(); $this->actingAs($owner); - LivewireVolt::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) ->set('newLicenseType', ImageLicenseType::AiGenerated->value) ->assertSet('newCopyright', 'KI-generiert') ->set('newLicenseDetail', 'DALL·E 3') @@ -406,7 +406,7 @@ test('existing title image hides upload form and can be removed', function () { 'sort_order' => 1, ]); - LivewireVolt::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) ->assertSee('Messefoto') ->assertSee('Bildnachweis: Pressefoto GmbH') ->assertSee('Titelbild löschen') @@ -433,7 +433,7 @@ test('second title image upload is blocked while one exists', function () { 'sort_order' => 1, ]); - LivewireVolt::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) + Livewire::test('components.press-release-images-manager', ['pressReleaseId' => $pr->id]) ->set('newImage', UploadedFile::fake()->image('zweites.jpg', 1200, 800)) ->set('newAuthor', 'Jane Doe') ->set('newLicenseType', ImageLicenseType::Own->value) diff --git a/tests/Feature/PressReleaseIndexPhase8bTest.php b/tests/Feature/PressReleaseIndexPhase8bTest.php index 9073ce1e..1d436ca0 100644 --- a/tests/Feature/PressReleaseIndexPhase8bTest.php +++ b/tests/Feature/PressReleaseIndexPhase8bTest.php @@ -7,7 +7,7 @@ use App\Models\Company; use App\Models\PressRelease; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -47,7 +47,7 @@ test('customer list zeigt Scheduling-Sub-Zeile bei review-PMs mit scheduled_at', 'scheduled_at' => now()->addDays(3)->setTime(14, 30), ]); - LivewireVolt::test('customer.press-releases.index') + Livewire::test('customer.press-releases.index') ->assertSee('geplant'); }); @@ -67,7 +67,7 @@ test('customer list zeigt Embargo-Sub-Zeile bei PMs mit embargo_at in der Zukunf 'embargo_at' => now()->addDays(7), ]); - LivewireVolt::test('customer.press-releases.index') + Livewire::test('customer.press-releases.index') ->assertSee('Embargo bis'); }); @@ -87,7 +87,7 @@ test('customer list zeigt KEINE Scheduling-Sub-Zeile wenn scheduled_at in der Ve 'scheduled_at' => now()->subDay(), ]); - LivewireVolt::test('customer.press-releases.index') + Livewire::test('customer.press-releases.index') ->assertDontSee('geplant ·'); }); @@ -107,7 +107,7 @@ test('customer list zeigt KEINE Embargo-Sub-Zeile wenn embargo_at abgelaufen', f 'embargo_at' => now()->subDay(), ]); - LivewireVolt::test('customer.press-releases.index') + Livewire::test('customer.press-releases.index') ->assertDontSee('Embargo bis'); }); @@ -121,7 +121,7 @@ test('admin list zeigt Scheduling-Sub-Zeile bei review-PMs mit scheduled_at', fu 'scheduled_at' => now()->addDays(2)->setTime(10, 0), ]); - LivewireVolt::test('admin.press-releases.index') + Livewire::test('admin.press-releases.index') ->assertSee('geplant'); }); @@ -135,7 +135,7 @@ test('admin list zeigt Embargo-Sub-Zeile bei PMs mit embargo_at in der Zukunft', 'embargo_at' => now()->addDays(5), ]); - LivewireVolt::test('admin.press-releases.index') + Livewire::test('admin.press-releases.index') ->assertSee('Embargo bis'); }); @@ -150,7 +150,7 @@ test('admin list zeigt KEINE Sub-Zeilen wenn weder scheduled_at noch embargo_at' 'embargo_at' => null, ]); - LivewireVolt::test('admin.press-releases.index') + Livewire::test('admin.press-releases.index') ->assertDontSee('geplant ·') ->assertDontSee('Embargo bis'); }); @@ -166,7 +166,7 @@ test('admin list zeigt Content-Score-Stufe', function () { 'content_tier' => PressReleaseContentTier::Hochwertig->value, ]); - LivewireVolt::test('admin.press-releases.index') + Livewire::test('admin.press-releases.index') ->assertSee('84 · Hochwertig'); }); @@ -180,7 +180,7 @@ test('admin list zeigt KI-Klassifikations-Badge', function () { 'classification' => PressReleaseClassification::Yellow->value, ]); - LivewireVolt::test('admin.press-releases.index') + Livewire::test('admin.press-releases.index') ->assertSee('KI: Gelb'); }); @@ -200,7 +200,7 @@ test('admin list filtert nach KI-Klassifikation', function () { 'title' => 'Grüne Mitteilung', ]); - LivewireVolt::test('admin.press-releases.index') + Livewire::test('admin.press-releases.index') ->set('classificationFilter', PressReleaseClassification::Yellow->value) ->assertSee('Gelber Grenzfall') ->assertDontSee('Grüne Mitteilung'); @@ -231,7 +231,7 @@ test('customer list zeigt das Titelbild als Thumbnail in der Bild-Spalte', funct 'sort_order' => 1, ]); - LivewireVolt::test('customer.press-releases.index') + Livewire::test('customer.press-releases.index') ->assertSee('Bild') ->assertSee('storage/press/cover-thumb.jpg', false) ->assertDontSee('storage/press/second-thumb.jpg', false); @@ -248,6 +248,6 @@ test('customer list zeigt den gewählten Platzhalter als Thumbnail bei bildlosen 'placeholder_variant' => '05-lines-green', ]); - LivewireVolt::test('customer.press-releases.index') + Livewire::test('customer.press-releases.index') ->assertSee('press-release-placeholders/05-lines-green.svg', false); }); diff --git a/tests/Feature/PressReleasePlaceholderTest.php b/tests/Feature/PressReleasePlaceholderTest.php index 9d5bf1a0..912864f8 100644 --- a/tests/Feature/PressReleasePlaceholderTest.php +++ b/tests/Feature/PressReleasePlaceholderTest.php @@ -4,7 +4,7 @@ use App\Enums\PressReleasePlaceholder; use App\Models\PressRelease; use App\Services\PressRelease\PressReleaseCoverImage; use Illuminate\Foundation\Testing\RefreshDatabase; -use Livewire\Volt\Volt; +use Livewire\Livewire; uses(RefreshDatabase::class); @@ -101,7 +101,7 @@ test('cover resolver falls back from cover to large when cover variant is missin }); test('placeholder picker mounts with the current variant and confirms a selection', function () { - Volt::test('components.press-release-placeholder-picker', ['current' => '05-lines-green']) + Livewire::test('components.press-release-placeholder-picker', ['current' => '05-lines-green']) ->assertSet('selected', '05-lines-green') ->call('choose', '08-dots-green') ->assertSet('selected', '08-dots-green') diff --git a/tests/Feature/PressReleasePreviewTest.php b/tests/Feature/PressReleasePreviewTest.php index 2b4aefc5..09255250 100644 --- a/tests/Feature/PressReleasePreviewTest.php +++ b/tests/Feature/PressReleasePreviewTest.php @@ -8,7 +8,7 @@ use App\Models\User; use App\Services\Auth\MagicLinkGenerator; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Facades\Storage; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; function makePreviewCustomerWithPressRelease(Portal $portal): array @@ -268,7 +268,7 @@ test('share panel offers a direct open button for single portal releases', funct [$customer, $pr] = makePreviewCustomerWithPressRelease(Portal::Presseecho); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->call('generateShareLink') ->assertSee('Vorschau öffnen') ->assertDontSee('Vorschau presseecho') @@ -280,7 +280,7 @@ test('share panel offers one open button per portal for both portal releases', f [$customer, $pr] = makePreviewCustomerWithPressRelease(Portal::Both); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->call('generateShareLink') ->assertSee('Vorschau presseecho') ->assertSee('Vorschau businessportal24') diff --git a/tests/Feature/PressReleasePublishModalPhase8iTest.php b/tests/Feature/PressReleasePublishModalPhase8iTest.php index ccf3a766..fec27d05 100644 --- a/tests/Feature/PressReleasePublishModalPhase8iTest.php +++ b/tests/Feature/PressReleasePublishModalPhase8iTest.php @@ -6,7 +6,7 @@ use App\Enums\PressReleaseStatus; use App\Models\Plan; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Facades\Queue; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -33,7 +33,7 @@ test('customer show renders the publish confirmation modal with legal note and q subscribeUserToPlan($customer, $plan); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Pressemitteilung zur Prüfung freigeben') ->assertSee('Rechtliche Hinweise') ->assertSee('Mit der Freigabe versichern Sie:') @@ -48,7 +48,7 @@ test('the quota block is hidden for users with an unlimited quota', function () $this->actingAs($customer); // Launch-Schalter aus → Kontingent unbegrenzt → kein Quota-Block. - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Pressemitteilung zur Prüfung freigeben') ->assertDontSee('PM-Kontingent diesen Monat'); }); @@ -59,7 +59,7 @@ test('submitting from the show modal moves the draft into review without consumi $customer->update(['press_release_quota_used_this_month' => 0]); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) // KI-Kennzeichnung (Art. 50 KI-VO) ist Pflicht im Submit-Modal. ->set('aiTextDeclaration', AiTextDeclaration::None->value) ->set('aiDeclarationConfirmed', true) @@ -76,7 +76,7 @@ test('the image rights confirmation is hidden while only the placeholder is acti ['customer' => $customer, 'pr' => $pr] = makeCustomerForShowPhase8a(); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Ihre Bestätigungen') ->assertDontSee('Alle Bildrechte sind geklärt.') ->assertSeeHtml("' / 4'"); @@ -99,7 +99,7 @@ test('the image rights confirmation appears once an own title image exists', fun $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Alle Bildrechte sind geklärt.') ->assertSeeHtml("' / 5'"); }); @@ -111,7 +111,7 @@ test('the modal shows a booking notice instead of the submit flow when the gate ['customer' => $customer, 'pr' => $pr] = makeCustomerForShowPhase8a(); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Buchung erforderlich') ->assertDontSee('Mit der Freigabe versichern Sie:'); }); diff --git a/tests/Feature/PressReleaseShowAddonsTest.php b/tests/Feature/PressReleaseShowAddonsTest.php index 51d24d5b..208e450b 100644 --- a/tests/Feature/PressReleaseShowAddonsTest.php +++ b/tests/Feature/PressReleaseShowAddonsTest.php @@ -11,7 +11,7 @@ use App\Services\Billing\CreditWalletService; use App\Services\Billing\ProofPdfService; use App\Services\PressRelease\BoostService; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -49,7 +49,7 @@ test('a published green release shows the boost and proof add-ons', function () $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Add-ons') ->assertSee('Startseiten-Boost') ->assertSee('7 Tage für 12 Credits buchen') @@ -78,7 +78,7 @@ test('the slot hint counts down when competitors occupy places', function () { $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Noch 3 von 5 Plätzen frei.') ->assertSee('Noch 3 von 3 Plätzen frei.'); }); @@ -90,7 +90,7 @@ test('add-on buttons only debit after the purchase confirmation modal', function $this->actingAs($customer); - $component = LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + $component = Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->call('confirmBoost', 14) ->assertSet('pendingPurchase', [ 'type' => 'boost', @@ -134,7 +134,7 @@ test('the confirmation modal warns when the purchase extends a running boost', f $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->call('confirmBoost', 7) ->assertSet('pendingPurchase.extendsUntil', $activeUntil->format('d.m.Y H:i')) ->assertSet('pendingPurchase.newEndsAt', $activeUntil->copy()->addDays(7)->format('d.m.Y H:i')) @@ -148,7 +148,7 @@ test('the proof purchase runs through the confirmation modal as well', function $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->call('confirmProof') ->assertSet('pendingPurchase.type', 'proof') ->assertSet('pendingPurchase.credits', 3) @@ -167,7 +167,7 @@ test('an unknown boost duration does not open the confirmation modal', function $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->call('confirmBoost', 999) ->assertSet('pendingPurchase', null) ->call('buyPendingAddOn'); @@ -182,7 +182,7 @@ test('booking a boost from the detail page debits the wallet and activates it', $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->call('buyBoost', 14); expect($customer->fresh()->creditBalance())->toBe(20); // 40 - 20 (14 Tage) @@ -196,7 +196,7 @@ test('a category boost books through the confirmation modal at the half staffel' $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->call('confirmBoost', 7, 'category') ->assertSet('pendingPurchase.placement', 'category') ->assertSet('pendingPurchase.label', 'Kategorie-Boost — 7 Tage') @@ -226,14 +226,14 @@ test('sold-out slots replace the buy buttons with the next free date', function $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Derzeit ausgebucht — der nächste Platz wird am '.$freeAt->format('d.m.Y').' frei.') ->assertDontSee('7 Tage für 12 Credits buchen') // Der Kategorie-Boost hat ein eigenes Slot-Inventar und bleibt buchbar. ->assertSee('7 Tage für 6 Credits buchen'); // Serverseitiges Gate: ein direkter Kauf-Call bucht trotzdem nicht. - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->call('buyBoost', 7); expect($customer->fresh()->creditBalance())->toBe(40); @@ -247,7 +247,7 @@ test('buying a proof from the detail page unlocks the download', function () { $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->call('buyProof') ->assertSee('Nachweis herunterladen'); @@ -262,7 +262,7 @@ test('an add-on purchase without enough credits opens the shortfall modal with a $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->call('buyProof') ->assertSet('creditShortfall', [ 'label' => 'Der Veröffentlichungsnachweis', @@ -283,7 +283,7 @@ test('a boost without enough credits opens the shortfall modal instead of bookin $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->call('buyBoost', 7) ->assertSet('creditShortfall.label', 'Der Boost') ->assertSee('Nicht genügend Credits'); @@ -299,7 +299,7 @@ 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') + Livewire::test('customer.press-releases.index') ->assertDontSee('Boost bis') ->assertSee('Boost möglich'); @@ -307,7 +307,7 @@ test('the press release list shows a hint with end date for an active boost', fu 'ends_at' => now()->addDays(7)->setTime(9, 0), ]); - LivewireVolt::test('customer.press-releases.index') + Livewire::test('customer.press-releases.index') ->assertSee('Boost bis '.now()->addDays(7)->format('d.m.Y')) ->assertDontSee('Boost möglich'); }); @@ -320,7 +320,7 @@ test('the list shows the category under the portal and a green check for green r $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.index') + Livewire::test('customer.press-releases.index') ->assertSee('Energie & Klima') ->assertSee('Inhaltsprüfung: Grün'); }); @@ -332,7 +332,7 @@ test('a non-green release shows neither the green check nor the boost hint', fun $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.index') + Livewire::test('customer.press-releases.index') ->assertDontSee('Inhaltsprüfung: Grün') ->assertDontSee('Boost möglich'); }); @@ -345,7 +345,7 @@ test('an expired boost shows no hint in the press release list', function () { Boost::factory()->for($pr)->expired()->create(); - LivewireVolt::test('customer.press-releases.index') + Livewire::test('customer.press-releases.index') ->assertDontSee('Boost bis'); }); @@ -357,7 +357,7 @@ test('a non-green release cannot be boosted from the detail page', function () { $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Nur grün geprüfte Pressemitteilungen sind boostbar') ->call('buyBoost', 7); diff --git a/tests/Feature/PressReleaseShowPhase8aTest.php b/tests/Feature/PressReleaseShowPhase8aTest.php index 07c610fd..a46bc375 100644 --- a/tests/Feature/PressReleaseShowPhase8aTest.php +++ b/tests/Feature/PressReleaseShowPhase8aTest.php @@ -7,7 +7,7 @@ use App\Enums\PressReleaseStatus; use App\Models\PressRelease; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -31,7 +31,7 @@ test('customer show zeigt den Untertitel direkt unter dem Titel', function () { ]); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Brauerei eröffnet zweiten Standort') ->assertSee('Ein Untertitel der Pressemitteilung'); }); @@ -45,7 +45,7 @@ test('customer show zeigt geplante Veröffentlichung wenn gesetzt', function () $this->actingAs($customer); // Die App läuft in Europe/Berlin; 09:30 wird unverändert angezeigt. - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Geplante Veröffentlichung') ->assertSee('01.07.2026 09:30'); }); @@ -59,7 +59,7 @@ test('customer show zeigt Sperrfrist wenn embargo_at gesetzt', function () { $this->actingAs($customer); // Die App läuft in Europe/Berlin; 12:00 wird unverändert angezeigt. - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Sperrfrist bis') ->assertSee('15.08.2026 12:00'); }); @@ -71,7 +71,7 @@ test('customer show zeigt Kein-Export-Hinweis wenn no_export aktiv', function () ]); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Kein Export aktiv'); }); @@ -82,7 +82,7 @@ test('customer show zeigt Boilerplate-Override als eigene Card', function () { ]); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Eigener Abbinder (Boilerplate)') ->assertSee('Über die Beispiel AG: Wir machen Bier seit 1850.'); }); @@ -94,7 +94,7 @@ test('customer show zeigt Boilerplate-Override nicht wenn leer', function () { ]); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertDontSee('Eigener Abbinder (Boilerplate)'); }); @@ -108,7 +108,7 @@ test('customer show links to the public page of a published release', function ( ]); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Öffentlich ansehen') ->assertSee(config('domains.domain_presseecho_url').'/de/press-release/oeffentliche-pm', escape: false); }); @@ -124,7 +124,7 @@ test('customer show links to both portals when the release is published on both' ]); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Auf Presseecho ansehen') ->assertSee('Auf Businessportal24 ansehen') ->assertSee(config('domains.domain_presseecho_url').'/de/press-release/beide-portale-pm', escape: false) @@ -136,7 +136,7 @@ test('customer show shows no public link for drafts', function () { ['customer' => $customer, 'pr' => $pr] = makeCustomerForShowPhase8a(); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertDontSee('Öffentlich ansehen'); }); @@ -150,7 +150,7 @@ test('admin show zeigt den Untertitel direkt unter dem Titel', function () { 'subtitle' => 'Pressekonferenz am Freitag', ]); - LivewireVolt::test('admin.press-releases.show', ['id' => $pr->id]) + Livewire::test('admin.press-releases.show', ['id' => $pr->id]) ->assertSee('Großer Auftritt der Brauerei') ->assertSee('Pressekonferenz am Freitag'); }); @@ -164,7 +164,7 @@ test('admin show zeigt Boilerplate-Override als eigene Card', function () { 'boilerplate_override' => 'Über das Beispiel-Unternehmen: Mehr Infos folgen.', ]); - LivewireVolt::test('admin.press-releases.show', ['id' => $pr->id]) + Livewire::test('admin.press-releases.show', ['id' => $pr->id]) ->assertSee('Eigener Abbinder (Boilerplate)') ->assertSee('Über das Beispiel-Unternehmen: Mehr Infos folgen.'); }); @@ -178,7 +178,7 @@ test('admin show zeigt Boilerplate-Override nicht wenn leer', function () { 'boilerplate_override' => null, ]); - LivewireVolt::test('admin.press-releases.show', ['id' => $pr->id]) + Livewire::test('admin.press-releases.show', ['id' => $pr->id]) ->assertDontSee('Eigener Abbinder (Boilerplate)'); }); @@ -193,7 +193,7 @@ test('customer show zeigt das Pruefergebnis und den Qualitaets-Score', function ]); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Inhaltsprüfung') ->assertSee('Grün') ->assertSee('Qualität') @@ -211,7 +211,7 @@ test('customer show erklaert bei Gelb den fehlenden Boost neutral', function () ]); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Inhaltsprüfung') ->assertSee('Gelb') ->assertSee('Die Boost-Platzierung ist grün geprüften Meldungen vorbehalten.'); @@ -225,7 +225,7 @@ test('customer show zeigt ohne Pruefung Ausstehend und kein Qualitaets-Panel', f ]); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Inhaltsprüfung') ->assertSee('Ausstehend') ->assertDontSee('Höchste Stufe erreicht.'); diff --git a/tests/Feature/PressReleaseValidationFeedbackTest.php b/tests/Feature/PressReleaseValidationFeedbackTest.php index 9a63be82..9b9b1b85 100644 --- a/tests/Feature/PressReleaseValidationFeedbackTest.php +++ b/tests/Feature/PressReleaseValidationFeedbackTest.php @@ -5,7 +5,7 @@ use App\Models\Company; use App\Models\PressRelease; use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; /** @@ -34,7 +34,7 @@ test('create page shows a persistent error summary with German field names when /** @var TestCase $this */ $this->actingAs(makeValidationFeedbackCustomer()); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->set('title', 'Ein gültiger Titel für die PM') ->set('text', str_repeat('Aussagekräftiger Fließtext. ', 5)) ->set('categoryId', null) @@ -50,7 +50,7 @@ test('create page error summary lists every failing field and disappears once re $this->actingAs(makeValidationFeedbackCustomer()); $category = Category::factory()->create(); - $component = LivewireVolt::test('customer.press-releases.create') + $component = Livewire::test('customer.press-releases.create') ->call('save', 'draft') ->assertHasErrors(['categoryId', 'title', 'text']) ->assertSee('Speichern nicht möglich') @@ -71,7 +71,7 @@ test('create page marks the category panel as invalid and keeps the jump anchor' /** @var TestCase $this */ $this->actingAs(makeValidationFeedbackCustomer()); - LivewireVolt::test('customer.press-releases.create') + Livewire::test('customer.press-releases.create') ->assertSeeHtml('data-error-anchor="categoryId"') ->assertDontSeeHtml('is-invalid') ->call('save', 'draft') @@ -94,7 +94,7 @@ test('edit page shows the error summary when saving without a category', functio $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.edit', ['id' => $pr->id]) + Livewire::test('customer.press-releases.edit', ['id' => $pr->id]) ->set('categoryId', null) ->call('save') ->assertHasErrors(['categoryId']) diff --git a/tests/Feature/PressReleaseWithdrawalWaiverTest.php b/tests/Feature/PressReleaseWithdrawalWaiverTest.php index 6f9c1fd6..faf52c30 100644 --- a/tests/Feature/PressReleaseWithdrawalWaiverTest.php +++ b/tests/Feature/PressReleaseWithdrawalWaiverTest.php @@ -4,7 +4,7 @@ use App\Enums\AiTextDeclaration; use App\Enums\PressReleaseStatus; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Facades\Queue; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -19,7 +19,7 @@ test('the submit modal requires the archive notice confirmation', function () { ['customer' => $customer, 'pr' => $pr] = makeCustomerForShowPhase8a(); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) // Archiv-Hinweis (AGB § 13 Abs. 1, T2neu) als eigene Bestätigung — // die frühere Erlöschens-Checkbox entfiel mit B2B-only (E2) … ->assertSee('dauerhaft archiviert') @@ -35,7 +35,7 @@ test('submitting records the archive notice consent timestamp on the press relea expect($pr->withdrawal_waiver_consented_at)->toBeNull(); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) // KI-Kennzeichnung (Art. 50 KI-VO) ist Pflicht im Submit-Modal. ->set('aiTextDeclaration', AiTextDeclaration::None->value) ->set('aiDeclarationConfirmed', true) @@ -53,7 +53,7 @@ test('the index draft action opens the shared submit modal instead of a quick su ['customer' => $customer] = makeCustomerForShowPhase8a(); $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.index') + Livewire::test('customer.press-releases.index') ->assertSee('Zur Prüfung') // Gemeinsames Modal inkl. Archiv-Hinweis statt wire:confirm, // das die rechtlichen Bestätigungen umgehen würde. diff --git a/tests/Feature/PressReleaseWorkflowTest.php b/tests/Feature/PressReleaseWorkflowTest.php index 754a5d59..f4138a7b 100644 --- a/tests/Feature/PressReleaseWorkflowTest.php +++ b/tests/Feature/PressReleaseWorkflowTest.php @@ -11,7 +11,7 @@ use App\Services\PressRelease\PressReleaseService; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Facades\Mail; use Illuminate\Support\Facades\Queue; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; beforeEach(function (): void { @@ -66,7 +66,7 @@ test('admin can reject a review press release with a reason', function () { $this->actingAs($admin); - LivewireVolt::test('admin.press-releases.show', ['id' => $pr->id]) + Livewire::test('admin.press-releases.show', ['id' => $pr->id]) ->set('rejectReason', 'Bitte überarbeiten Sie den werblichen Sprachstil.') ->call('reject') ->assertHasNoErrors(); @@ -100,7 +100,7 @@ test('admin reject without reason fails validation', function () { $this->actingAs($admin); - LivewireVolt::test('admin.press-releases.show', ['id' => $pr->id]) + Livewire::test('admin.press-releases.show', ['id' => $pr->id]) ->set('rejectReason', '') ->call('reject') ->assertHasErrors(['rejectReason']); @@ -228,7 +228,7 @@ test('customer show page surfaces latest reject reason prominently', function () $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $pr->id]) + Livewire::test('customer.press-releases.show', ['id' => $pr->id]) ->assertSee('Werbliche Sprache wurde markiert.') ->assertSee('Erneut zur Prüfung freigeben'); }); @@ -246,7 +246,7 @@ test('admin index publish goes through service and creates audit log', function $this->actingAs($admin); - LivewireVolt::test('admin.press-releases.index') + Livewire::test('admin.press-releases.index') ->call('publish', $pr->id) ->assertHasNoErrors(); @@ -273,7 +273,7 @@ test('admin index reject from list creates audit log with default reason', funct $this->actingAs($admin); - LivewireVolt::test('admin.press-releases.index') + Livewire::test('admin.press-releases.index') ->call('reject', $pr->id); expect($pr->fresh()->status)->toBe(PressReleaseStatus::Rejected); diff --git a/tests/Feature/SecurityHardeningTest.php b/tests/Feature/SecurityHardeningTest.php index 857bffe9..b922cf97 100644 --- a/tests/Feature/SecurityHardeningTest.php +++ b/tests/Feature/SecurityHardeningTest.php @@ -7,7 +7,7 @@ use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\RateLimiter; use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Storage; -use Livewire\Volt\Volt; +use Livewire\Livewire; use Tests\TestCase; test('responses carry the application-level security headers', function () { @@ -32,7 +32,7 @@ test('password reset requests are rate limited per email', function () { RateLimiter::hit('password-reset|spam@example.test', 3600); } - Volt::test('auth.forgot-password') + Livewire::test('auth.forgot-password') ->set('email', 'spam@example.test') ->call('sendPasswordResetLink') ->assertHasErrors(['email']); @@ -43,7 +43,7 @@ test('registration is rate limited per ip', function () { RateLimiter::hit('register-ip|127.0.0.1', 3600); } - Volt::test('auth.register') + Livewire::test('auth.register') ->set('name', 'Bot Bot') ->set('email', 'bot@example.test') ->set('password', 'super-secret-password') @@ -63,7 +63,7 @@ test('company create stores the logo through the image service pipeline', functi $admin = User::factory()->create(['is_active' => true]); $admin->assignRole('admin'); - Volt::actingAs($admin) + Livewire::actingAs($admin) ->test('admin.companies.create') ->set('company_name', 'Logo GmbH') ->set('email', 'logo@example.test') @@ -89,7 +89,7 @@ test('company create rejects svg logos', function () { $admin = User::factory()->create(['is_active' => true]); $admin->assignRole('admin'); - Volt::actingAs($admin) + Livewire::actingAs($admin) ->test('admin.companies.create') ->set('company_name', 'SVG GmbH') ->set('portal', 'presseecho') diff --git a/tests/Feature/Settings/PasswordUpdateTest.php b/tests/Feature/Settings/PasswordUpdateTest.php index d38f32b4..4c95910d 100644 --- a/tests/Feature/Settings/PasswordUpdateTest.php +++ b/tests/Feature/Settings/PasswordUpdateTest.php @@ -2,7 +2,7 @@ use App\Models\User; use Illuminate\Support\Facades\Hash; -use Livewire\Volt\Volt; +use Livewire\Livewire; test('password can be updated', function () { $user = User::factory()->create([ @@ -11,7 +11,7 @@ test('password can be updated', function () { $this->actingAs($user); - $response = Volt::test('settings.password') + $response = Livewire::test('settings.password') ->set('current_password', 'password') ->set('password', 'new-password') ->set('password_confirmation', 'new-password') @@ -29,7 +29,7 @@ test('correct password must be provided to update password', function () { $this->actingAs($user); - $response = Volt::test('settings.password') + $response = Livewire::test('settings.password') ->set('current_password', 'wrong-password') ->set('password', 'new-password') ->set('password_confirmation', 'new-password') diff --git a/tests/Feature/Settings/ProfileUpdateTest.php b/tests/Feature/Settings/ProfileUpdateTest.php index 80dab119..ed5a0188 100644 --- a/tests/Feature/Settings/ProfileUpdateTest.php +++ b/tests/Feature/Settings/ProfileUpdateTest.php @@ -1,7 +1,7 @@ actingAs(User::factory()->create()); @@ -18,7 +18,7 @@ test('profile information can be updated', function () { $this->actingAs($user); - $response = Volt::test('settings.profile') + $response = Livewire::test('settings.profile') ->set('name', 'Test User') ->set('email', 'test@example.com') ->call('updateProfileInformation'); @@ -37,7 +37,7 @@ test('email verification status is unchanged when email address is unchanged', f $this->actingAs($user); - $response = Volt::test('settings.profile') + $response = Livewire::test('settings.profile') ->set('name', 'Test User') ->set('email', $user->email) ->call('updateProfileInformation'); @@ -52,7 +52,7 @@ test('user can delete their account', function () { $this->actingAs($user); - $response = Volt::test('settings.delete-user-form') + $response = Livewire::test('settings.delete-user-form') ->set('password', 'password') ->call('deleteUser'); @@ -69,7 +69,7 @@ test('correct password must be provided to delete account', function () { $this->actingAs($user); - $response = Volt::test('settings.delete-user-form') + $response = Livewire::test('settings.delete-user-form') ->set('password', 'wrong-password') ->call('deleteUser'); diff --git a/tests/Feature/VisibilityStatsTest.php b/tests/Feature/VisibilityStatsTest.php index 7e5c5044..3218bd0f 100644 --- a/tests/Feature/VisibilityStatsTest.php +++ b/tests/Feature/VisibilityStatsTest.php @@ -11,7 +11,7 @@ use App\Models\PressReleaseEvent; use App\Models\PressReleaseIndexCheck; use App\Models\User; use App\Services\PressRelease\VisibilityStats; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; /** @@ -74,7 +74,7 @@ test('the company page lists partner-submitted releases with their views', funct ]); viewsOn($release, 3, daysAgo: 1); - LivewireVolt::test('customer.press-kits.show', ['id' => $company->id]) + Livewire::test('customer.press-kits.show', ['id' => $company->id]) ->assertSeeText('Partnermeldung mit Reichweite') ->assertSeeText('eingereicht über Partner') ->assertSeeText('4.321') @@ -154,7 +154,7 @@ test('the release page shows the delivery panel with daily bars, sitemap date an viewsOn($release, 6, daysAgo: 2); PressReleaseCrawlerHit::factory()->service('anthropic', 'ClaudeBot/1.0')->create(['press_release_id' => $release->id]); - LivewireVolt::test('customer.press-releases.show', ['id' => $release->id]) + Livewire::test('customer.press-releases.show', ['id' => $release->id]) ->assertSeeText('Auslieferung') ->assertSeeText('777') ->assertSeeText('Aufrufe 30 Tage') @@ -181,11 +181,11 @@ test('the index status appears in the delivery panel only once the customer view PressReleaseIndexCheck::factory()->withState(IndexState::Indexed)->create(['press_release_id' => $release->id, 'portal' => Portal::Businessportal24, 'checked_at' => now()->subDays(9)]); config()->set('search_console.customer_visible', false); - LivewireVolt::test('customer.press-releases.show', ['id' => $release->id]) + Livewire::test('customer.press-releases.show', ['id' => $release->id]) ->assertDontSeeText('Google-Index'); config()->set('search_console.customer_visible', true); - LivewireVolt::test('customer.press-releases.show', ['id' => $release->id]) + Livewire::test('customer.press-releases.show', ['id' => $release->id]) ->assertSeeText('Google-Index') ->assertSeeText('Businessportal24: gecrawlt, nicht indexiert') ->assertDontSeeText('Businessportal24: indexiert'); @@ -196,7 +196,7 @@ test('a draft shows no visibility panel', function () { [$customer, $company] = claimant(); $draft = PressRelease::factory()->forPortal(Portal::Businessportal24)->create(['company_id' => $company->id, 'user_id' => $customer->id, 'status' => 'draft', 'hits' => 0, 'published_at' => null]); - LivewireVolt::test('customer.press-releases.show', ['id' => $draft->id]) + Livewire::test('customer.press-releases.show', ['id' => $draft->id]) ->assertDontSeeText('Auslieferung') ->assertSeeText('noch nicht veröffentlicht'); }); @@ -252,7 +252,7 @@ test('the listing date is not claimed when the release has a counterpart on the ->and($summary['in_sitemap_since'])->toBeNull() ->and($summary['sitemap_portals'])->toBe([Portal::Businessportal24->label()]); - LivewireVolt::test('customer.press-releases.show', ['id' => $release->id]) + Livewire::test('customer.press-releases.show', ['id' => $release->id]) ->assertSeeText('In der Sitemap gelistet (Businessportal24)') ->assertDontSeeText('Gelistet seit') ->assertDontSeeText('Derzeit nicht gelistet'); diff --git a/tests/Feature/Web/GoneTombstoneTest.php b/tests/Feature/Web/GoneTombstoneTest.php index f90495ef..b92f84d2 100644 --- a/tests/Feature/Web/GoneTombstoneTest.php +++ b/tests/Feature/Web/GoneTombstoneTest.php @@ -9,7 +9,7 @@ use App\Services\Company\CompanyRemovalService; use App\Services\PressRelease\PressReleaseService; use App\Support\WebPageCache; use Database\Seeders\RolesAndPermissionsSeeder; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; /** @@ -309,7 +309,7 @@ test('admin can remove a press release with 410 from the edit page', function () $release = goneTestRelease(); $this->actingAs(goneTestAdmin()); - LivewireVolt::test('admin.press-releases.edit', ['id' => $release->id]) + Livewire::test('admin.press-releases.edit', ['id' => $release->id]) ->call('markGone') ->assertRedirect(route('admin.press-releases.index')); @@ -322,7 +322,7 @@ test('admin can remove a newsroom with 410 from the edit page', function () { $release = goneTestRelease($company); $this->actingAs(goneTestAdmin()); - LivewireVolt::test('admin.companies.edit', ['id' => $company->id]) + Livewire::test('admin.companies.edit', ['id' => $company->id]) ->set('goneIncludesPressReleases', true) ->call('markGone') ->assertRedirect(route('admin.companies.index')); @@ -340,7 +340,7 @@ test('admin can lift a press release removal from the edit page', function () { app(PressReleaseService::class)->markGone($release); $this->actingAs(goneTestAdmin()); - LivewireVolt::test('admin.press-releases.edit', ['id' => $release->id]) + Livewire::test('admin.press-releases.edit', ['id' => $release->id]) ->assertSee('410-Entfernung aufheben') ->call('restoreGone') ->assertRedirect(route('admin.press-releases.edit', $release->id)); @@ -354,7 +354,7 @@ test('admin can lift a newsroom removal from the edit page', function () { app(CompanyRemovalService::class)->markGone($company); $this->actingAs(goneTestAdmin()); - LivewireVolt::test('admin.companies.edit', ['id' => $company->id]) + Livewire::test('admin.companies.edit', ['id' => $company->id]) ->assertSee('410-Entfernung aufheben') ->call('restoreGone') ->assertRedirect(route('admin.companies.edit', $company->id)); diff --git a/tests/Feature/Web/PageDataCacheTest.php b/tests/Feature/Web/PageDataCacheTest.php index 6f11d67e..ee4b03e9 100644 --- a/tests/Feature/Web/PageDataCacheTest.php +++ b/tests/Feature/Web/PageDataCacheTest.php @@ -6,7 +6,7 @@ use App\Models\Company; use App\Models\PressRelease; use App\Support\WebPageCache; use Illuminate\Support\Facades\Cache; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; function makeCategoryWithSlug(Portal $portal, string $name, string $slug, ?int $parentId = null): Category @@ -333,7 +333,7 @@ test('the press release feed today filter matches the reference day via range co 'published_at' => now()->subDays(11)->setTime(9, 0), ]); - LivewireVolt::test('web.press-release-feed', ['portal' => Portal::Presseecho->value, 'language' => 'de']) + Livewire::test('web.press-release-feed', ['portal' => Portal::Presseecho->value, 'language' => 'de']) ->call('setTimeframe', 'today') ->assertSee('Meldung am Stichtag') ->assertDontSee('Meldung vom Vortag'); diff --git a/tests/Feature/Web/PressReleaseTrackingTest.php b/tests/Feature/Web/PressReleaseTrackingTest.php index 9e649e36..82630d39 100644 --- a/tests/Feature/Web/PressReleaseTrackingTest.php +++ b/tests/Feature/Web/PressReleaseTrackingTest.php @@ -14,7 +14,7 @@ use App\Models\User; use Database\Seeders\RolesAndPermissionsSeeder; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\DB; -use Livewire\Volt\Volt as LivewireVolt; +use Livewire\Livewire; use Tests\TestCase; /** @@ -229,7 +229,7 @@ test('customer panel shows view and share stats for the owner', function () { $this->actingAs($customer); - LivewireVolt::test('customer.press-releases.show', ['id' => $release->id]) + Livewire::test('customer.press-releases.show', ['id' => $release->id]) ->assertSee('Aufrufe') ->assertSee('42') ->assertSee('Geteilt') diff --git a/tests/Feature/Web/SearchPageTest.php b/tests/Feature/Web/SearchPageTest.php index fcd2a12b..47a4f740 100644 --- a/tests/Feature/Web/SearchPageTest.php +++ b/tests/Feature/Web/SearchPageTest.php @@ -5,7 +5,7 @@ use App\Models\Category; use App\Models\Company; use App\Models\PressRelease; use Illuminate\Support\Str; -use Livewire\Volt\Volt; +use Livewire\Livewire; use Tests\TestCase; function createSearchableRelease(string $title, array $attributes = [], ?Category $category = null, ?Company $company = null): PressRelease @@ -50,7 +50,7 @@ test('the search component filters by query and resets', function () { createSearchableRelease('Solarpark geht ans Netz'); createSearchableRelease('Neue Geschäftsführung berufen'); - Volt::test('web.search', ['portal' => Portal::Businessportal24->value, 'language' => 'de']) + Livewire::test('web.search', ['portal' => Portal::Businessportal24->value, 'language' => 'de']) ->set('q', 'Solarpark') ->assertSee('Solarpark geht ans Netz') ->assertDontSee('Neue Geschäftsführung berufen') @@ -64,7 +64,7 @@ test('multi-word queries match releases containing all words in any order', func createSearchableRelease('Solarpark geht ans Netz'); createSearchableRelease('Solarpark-Projekt angekündigt'); - Volt::test('web.search', ['portal' => Portal::Businessportal24->value, 'language' => 'de']) + Livewire::test('web.search', ['portal' => Portal::Businessportal24->value, 'language' => 'de']) ->set('q', 'Netz Solarpark') ->assertSee('Solarpark geht ans Netz') ->assertDontSee('Solarpark-Projekt angekündigt'); @@ -76,7 +76,7 @@ test('the search matches company names and keywords', function () { createSearchableRelease('Quartalszahlen veröffentlicht', company: $company); createSearchableRelease('Neue Geschäftsführung berufen', ['keywords' => 'Logistik, Automatisierung']); - Volt::test('web.search', ['portal' => Portal::Businessportal24->value, 'language' => 'de']) + Livewire::test('web.search', ['portal' => Portal::Businessportal24->value, 'language' => 'de']) ->set('q', 'Windkraft Nord') ->assertSee('Quartalszahlen veröffentlicht') ->assertDontSee('Neue Geschäftsführung berufen') @@ -96,7 +96,7 @@ test('the search component filters by category', function () { createSearchableRelease('Windkraft-Ausbau beschleunigt', category: $energie); createSearchableRelease('Quartalszahlen veröffentlicht', category: $finanzen); - Volt::test('web.search', ['portal' => Portal::Businessportal24->value, 'language' => 'de']) + Livewire::test('web.search', ['portal' => Portal::Businessportal24->value, 'language' => 'de']) ->call('selectCategory', 'energie') ->assertSee('Windkraft-Ausbau beschleunigt') ->assertDontSee('Quartalszahlen veröffentlicht');