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

@ -2,7 +2,6 @@
use App\Models\User;
use Illuminate\Support\Facades\Hash;
use Livewire\Volt\Volt;
uses(Illuminate\Foundation\Testing\RefreshDatabase::class);
@ -13,7 +12,7 @@ test('password can be updated', function (): void {
$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')
@ -31,7 +30,7 @@ test('correct password must be provided to update password', function (): void {
$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')

View file

@ -1,7 +1,6 @@
<?php
use App\Models\User;
use Livewire\Volt\Volt;
uses(Illuminate\Foundation\Testing\RefreshDatabase::class);
@ -16,7 +15,7 @@ test('profile information can be updated', function (): void {
$this->actingAs($user);
$response = Volt::test('settings.profile')
$response = Livewire::test('settings.profile')
->set('name', 'Test User')
->set('email', 'test@example.com')
->call('updateProfileInformation');
@ -35,7 +34,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');
@ -50,7 +49,7 @@ test('user can delete their account', function (): void {
$this->actingAs($user);
$response = Volt::test('settings.delete-user-form')
$response = Livewire::test('settings.delete-user-form')
->set('password', 'password')
->call('deleteUser');
@ -67,7 +66,7 @@ test('correct password must be provided to delete account', function (): void {
$this->actingAs($user);
$response = Volt::test('settings.delete-user-form')
$response = Livewire::test('settings.delete-user-form')
->set('password', 'wrong-password')
->call('deleteUser');