- 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>
77 lines
2.3 KiB
PHP
77 lines
2.3 KiB
PHP
<?php
|
|
|
|
use App\Models\TerminationRequest;
|
|
use App\Models\User;
|
|
use Database\Seeders\RolesAndPermissionsSeeder;
|
|
use Livewire\Livewire;
|
|
use Tests\TestCase;
|
|
|
|
beforeEach(function () {
|
|
/** @var TestCase $this */
|
|
$this->seed(RolesAndPermissionsSeeder::class);
|
|
});
|
|
|
|
function terminationAdmin(): User
|
|
{
|
|
$admin = User::factory()->create(['is_active' => true]);
|
|
$admin->assignRole('admin');
|
|
|
|
return $admin;
|
|
}
|
|
|
|
test('the legal queue lists open termination requests', function () {
|
|
$termination = TerminationRequest::factory()->extraordinary()->create([
|
|
'name' => 'Paula Presse',
|
|
'email' => 'paula@example.test',
|
|
'contract_reference' => 'STR-2026-0042',
|
|
'reason' => 'Wiederholte Störung der Leistung.',
|
|
]);
|
|
|
|
Livewire::actingAs(terminationAdmin())
|
|
->test('admin.legal-requests.index')
|
|
->assertOk()
|
|
->assertSee('Kündigungen')
|
|
->assertSee('K-'.$termination->id)
|
|
->assertSee('Paula Presse')
|
|
->assertSee('paula@example.test')
|
|
->assertSee('STR-2026-0042')
|
|
->assertSee('Außerordentlich');
|
|
});
|
|
|
|
test('an admin can resolve a termination request', function () {
|
|
$termination = TerminationRequest::factory()->create();
|
|
|
|
Livewire::actingAs(terminationAdmin())
|
|
->test('admin.legal-requests.index')
|
|
->call('resolveTermination', $termination->id)
|
|
->assertOk();
|
|
|
|
$termination->refresh();
|
|
|
|
expect($termination->status)->toBe('resolved');
|
|
expect($termination->resolved_at)->not->toBeNull();
|
|
});
|
|
|
|
test('an admin can reopen a resolved termination request', function () {
|
|
$termination = TerminationRequest::factory()->resolved()->create();
|
|
|
|
Livewire::actingAs(terminationAdmin())
|
|
->test('admin.legal-requests.index')
|
|
->set('terminationStatusFilter', 'all')
|
|
->call('reopenTermination', $termination->id)
|
|
->assertOk();
|
|
|
|
$termination->refresh();
|
|
|
|
expect($termination->status)->toBe('open');
|
|
expect($termination->resolved_at)->toBeNull();
|
|
});
|
|
|
|
test('resolved terminations are hidden from the default open view', function () {
|
|
TerminationRequest::factory()->resolved()->create(['name' => 'Erledigte Kündigung']);
|
|
|
|
Livewire::actingAs(terminationAdmin())
|
|
->test('admin.legal-requests.index')
|
|
->assertOk()
|
|
->assertDontSee('Erledigte Kündigung');
|
|
});
|