refactor: upgrade to Livewire 4

This commit is contained in:
Benjamin Nussbaum 2026-01-14 23:59:00 +01:00
parent c94dd89361
commit a15645ad88
56 changed files with 166 additions and 278 deletions

View file

@ -3,7 +3,6 @@
use App\Models\User;
use Illuminate\Auth\Notifications\ResetPassword;
use Illuminate\Support\Facades\Notification;
use Livewire\Volt\Volt;
uses(Illuminate\Foundation\Testing\RefreshDatabase::class);
@ -18,7 +17,7 @@ test('reset password link can be requested', function (): void {
$user = User::factory()->create();
Volt::test('auth.forgot-password')
Livewire::test('auth.forgot-password')
->set('email', $user->email)
->call('sendPasswordResetLink');
@ -30,7 +29,7 @@ test('reset password screen can be rendered', function (): void {
$user = User::factory()->create();
Volt::test('auth.forgot-password')
Livewire::test('auth.forgot-password')
->set('email', $user->email)
->call('sendPasswordResetLink');
@ -48,12 +47,12 @@ test('password can be reset with valid token', function (): void {
$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): true {
$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')