diff --git a/routes/auth.php b/routes/auth.php index 445c75c..51e50fe 100644 --- a/routes/auth.php +++ b/routes/auth.php @@ -2,32 +2,31 @@ use App\Http\Controllers\Auth\VerifyEmailController; use Illuminate\Support\Facades\Route; -use Livewire\Volt\Volt; Route::middleware('guest')->group(function (): void { - Volt::route('login', 'auth.login') + Route::get('login', \App\Livewire\Auth\Login::class) ->name('login'); - Volt::route('register', 'auth.register') + Route::get('register', \App\Livewire\Auth\Register::class) ->name('register'); - Volt::route('forgot-password', 'auth.forgot-password') + Route::get('forgot-password', \App\Livewire\Auth\ForgotPassword::class) ->name('password.request'); - Volt::route('reset-password/{token}', 'auth.reset-password') + Route::get('reset-password/{token}', \App\Livewire\Auth\ResetPassword::class) ->name('password.reset'); }); Route::middleware('auth')->group(function (): void { - Volt::route('verify-email', 'auth.verify-email') + Route::get('verify-email', \App\Livewire\Auth\VerifyEmail::class) ->name('verification.notice'); Route::get('verify-email/{id}/{hash}', VerifyEmailController::class) ->middleware(['signed', 'throttle:6,1']) ->name('verification.verify'); - Volt::route('confirm-password', 'auth.confirm-password') + Route::get('confirm-password', \App\Livewire\Auth\ConfirmPassword::class) ->name('password.confirm'); }); diff --git a/tests/Feature/Auth/AuthenticationTest.php b/tests/Feature/Auth/AuthenticationTest.php index 10fe617..1ed3624 100644 --- a/tests/Feature/Auth/AuthenticationTest.php +++ b/tests/Feature/Auth/AuthenticationTest.php @@ -1,7 +1,8 @@ create(); - $response = LivewireVolt::test('auth.login') + $response = Livewire::test(Login::class) ->set('email', $user->email) ->set('password', 'password') ->call('login'); diff --git a/tests/Feature/Auth/PasswordConfirmationTest.php b/tests/Feature/Auth/PasswordConfirmationTest.php index 14276e6..4d64d73 100644 --- a/tests/Feature/Auth/PasswordConfirmationTest.php +++ b/tests/Feature/Auth/PasswordConfirmationTest.php @@ -1,7 +1,8 @@ actingAs($user); - $response = Volt::test('auth.confirm-password') + $response = Livewire::test(ConfirmPassword::class) ->set('password', 'password') ->call('confirmPassword'); @@ -32,7 +33,7 @@ $this->actingAs($user); - $response = Volt::test('auth.confirm-password') + $response = Livewire::test(ConfirmPassword::class) ->set('password', 'wrong-password') ->call('confirmPassword'); diff --git a/tests/Feature/Auth/PasswordResetTest.php b/tests/Feature/Auth/PasswordResetTest.php index 1edc49c..3f2ce0e 100644 --- a/tests/Feature/Auth/PasswordResetTest.php +++ b/tests/Feature/Auth/PasswordResetTest.php @@ -1,9 +1,11 @@ create(); - Volt::test('auth.forgot-password') + Livewire::test(ForgotPassword::class) ->set('email', $user->email) ->call('sendPasswordResetLink'); - Notification::assertSentTo($user, ResetPassword::class); + Notification::assertSentTo($user, ResetPasswordNotification::class); }); test('reset password screen can be rendered', function (): void { @@ -30,11 +32,11 @@ $user = User::factory()->create(); - Volt::test('auth.forgot-password') + Livewire::test(ForgotPassword::class) ->set('email', $user->email) ->call('sendPasswordResetLink'); - Notification::assertSentTo($user, ResetPassword::class, function ($notification): true { + Notification::assertSentTo($user, ResetPasswordNotification::class, function ($notification): true { $response = $this->get('/reset-password/'.$notification->token); $response->assertStatus(200); @@ -48,12 +50,12 @@ $user = User::factory()->create(); - Volt::test('auth.forgot-password') + Livewire::test(ForgotPassword::class) ->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]) + Notification::assertSentTo($user, ResetPasswordNotification::class, function ($notification) use ($user): true { + $response = Livewire::test(ResetPassword::class, ['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 08a3265..d36a4d4 100644 --- a/tests/Feature/Auth/RegistrationTest.php +++ b/tests/Feature/Auth/RegistrationTest.php @@ -1,6 +1,7 @@ set('name', 'Test User') ->set('email', 'test@example.com') ->set('password', 'password')