livewire: Volt entfernt — Komponenten als Livewire-4-Single-File-Components, Route::livewire(), Livewire::test(); livewire/volt deinstalliert
- 83 Komponenten: Livewire\Volt\Component → Livewire\Component
- 73 Routen (admin, auth, customer): Volt::route() → Route::livewire()
- 88 Testdateien: Volt::test/actingAs → Livewire::test/actingAs
- VoltServiceProvider gelöscht; composer remove livewire/volt
- config/livewire.php auf v4-Schlüssel (component_layout, component_placeholder,
component_locations, make_command: SFC ohne ⚡). Der alte Schlüssel layout war
wirkungslos; alle gerouteten Komponenten setzen ihr Layout selbst.
- CLAUDE.md, AGENTS.md, boost.json, .cursorrules, Skill volt-development
- Roadmap: erledigt; Larastan erfasst SFCs weiterhin nicht (Blade-Dateien)
Suite 2.325 grün, einer übersprungen; Larastan und Pint ohne Meldung;
route:cache und view:cache laufen.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
79bb6cf1d0
commit
31da9ea8b6
186 changed files with 889 additions and 1075 deletions
|
|
@ -7,7 +7,7 @@ use App\Models\User;
|
|||
use App\Support\WebPageCache;
|
||||
use Database\Seeders\RolesAndPermissionsSeeder;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Livewire\Volt\Volt as LivewireVolt;
|
||||
use Livewire\Livewire;
|
||||
use Tests\TestCase;
|
||||
|
||||
beforeEach(function (): void {
|
||||
|
|
@ -27,7 +27,7 @@ test('admin can render category create page', function () {
|
|||
});
|
||||
|
||||
test('admin can create a new category with both translations', function () {
|
||||
LivewireVolt::test('admin.categories.create')
|
||||
Livewire::test('admin.categories.create')
|
||||
->set('portal', Portal::Both->value)
|
||||
->set('nameDe', 'Künstliche Intelligenz')
|
||||
->set('nameEn', 'Artificial Intelligence')
|
||||
|
|
@ -52,7 +52,7 @@ test('admin can create a new category with both translations', function () {
|
|||
});
|
||||
|
||||
test('category create requires both names', function () {
|
||||
LivewireVolt::test('admin.categories.create')
|
||||
Livewire::test('admin.categories.create')
|
||||
->set('nameDe', '')
|
||||
->set('nameEn', '')
|
||||
->call('save')
|
||||
|
|
@ -66,7 +66,7 @@ test('category create generates unique slug per locale on collision', function (
|
|||
['locale' => 'en', 'name' => 'Business', 'slug' => 'business'],
|
||||
]);
|
||||
|
||||
LivewireVolt::test('admin.categories.create')
|
||||
Livewire::test('admin.categories.create')
|
||||
->set('nameDe', 'Wirtschaft')
|
||||
->set('nameEn', 'Business')
|
||||
->call('save')
|
||||
|
|
@ -87,7 +87,7 @@ test('admin can edit an existing category and rename slugs in place', function (
|
|||
['locale' => 'en', 'name' => 'Old Name', 'slug' => 'old-name'],
|
||||
]);
|
||||
|
||||
LivewireVolt::test('admin.categories.edit', ['id' => $category->id])
|
||||
Livewire::test('admin.categories.edit', ['id' => $category->id])
|
||||
->set('nameDe', 'Neuer Name')
|
||||
->set('slugDe', 'neuer-name')
|
||||
->set('nameEn', 'New Name')
|
||||
|
|
@ -116,7 +116,7 @@ test('category edit refuses parent assignment that would create a hierarchy loop
|
|||
['locale' => 'en', 'name' => 'Child', 'slug' => 'child-en'],
|
||||
]);
|
||||
|
||||
LivewireVolt::test('admin.categories.edit', ['id' => $parent->id])
|
||||
Livewire::test('admin.categories.edit', ['id' => $parent->id])
|
||||
->set('nameDe', 'Parent')
|
||||
->set('slugDe', 'parent')
|
||||
->set('nameEn', 'Parent')
|
||||
|
|
@ -137,7 +137,7 @@ test('category cannot be deleted while it has press releases', function () {
|
|||
'category_id' => $category->id,
|
||||
]);
|
||||
|
||||
LivewireVolt::test('admin.categories.edit', ['id' => $category->id])
|
||||
Livewire::test('admin.categories.edit', ['id' => $category->id])
|
||||
->call('deleteCategory');
|
||||
|
||||
expect(Category::query()->find($category->id))->not->toBeNull();
|
||||
|
|
@ -150,7 +150,7 @@ test('category can be deleted when empty', function () {
|
|||
['locale' => 'en', 'name' => 'Empty', 'slug' => 'empty-en'],
|
||||
]);
|
||||
|
||||
LivewireVolt::test('admin.categories.edit', ['id' => $category->id])
|
||||
Livewire::test('admin.categories.edit', ['id' => $category->id])
|
||||
->call('deleteCategory')
|
||||
->assertRedirect(route('admin.categories.index'));
|
||||
|
||||
|
|
@ -170,7 +170,7 @@ test('deactivating a category clears the cached public pages and its feed at onc
|
|||
// Feed warm im Seiten-Cache.
|
||||
$this->get('https://presseecho.test/de/category/handel/feed')->assertSuccessful();
|
||||
|
||||
LivewireVolt::test('admin.categories.edit', ['id' => $category->id])
|
||||
Livewire::test('admin.categories.edit', ['id' => $category->id])
|
||||
->set('isActive', false)
|
||||
->call('save')
|
||||
->assertHasNoErrors();
|
||||
|
|
@ -184,7 +184,7 @@ test('creating an active category clears the cached public pages at once', funct
|
|||
$generation = WebPageCache::generation();
|
||||
Cache::put('web.llms.presseecho.test', 'alt', 3600);
|
||||
|
||||
LivewireVolt::test('admin.categories.create')
|
||||
Livewire::test('admin.categories.create')
|
||||
->set('portal', Portal::Presseecho->value)
|
||||
->set('nameDe', 'Energie')
|
||||
->set('nameEn', 'Energy')
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use App\Models\Category;
|
|||
use App\Models\FooterCode;
|
||||
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('admin can create a category-bound footer code', function () {
|
|||
['locale' => 'en', 'name' => 'Business', 'slug' => 'business'],
|
||||
]);
|
||||
|
||||
LivewireVolt::test('admin.footer-codes.create')
|
||||
Livewire::test('admin.footer-codes.create')
|
||||
->set('title', 'Wirtschafts-Disclaimer')
|
||||
->set('content', '<p>Powered by Pressekonto</p>')
|
||||
->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', '<p>Hinweis</p>')
|
||||
->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();
|
||||
|
|
|
|||
|
|
@ -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']);
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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([
|
||||
|
|
|
|||
|
|
@ -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('<p>Erster Absatz der Meldung.</p>')
|
||||
|
|
@ -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');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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'])
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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', '<p>Nachfassen.</p>')
|
||||
->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', '<p>Es gibt <em>Neuigkeiten</em>.</p>')
|
||||
->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();
|
||||
|
|
|
|||
|
|
@ -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'])
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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'));
|
||||
|
|
|
|||
|
|
@ -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'));
|
||||
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue