Fix auth translations and admin PWA UI
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-01-16 12:14:53 +01:00
parent 292c8f0b26
commit 918bff08aa
44 changed files with 2504 additions and 677 deletions

View File

@@ -5,6 +5,7 @@ namespace Tests\Feature\Auth;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\URL;
use Tests\TestCase;
class LoginTest extends TestCase
@@ -221,6 +222,30 @@ class LoginTest extends TestCase
$response->assertRedirect(route('verification.notice', absolute: false));
}
public function test_login_redirects_unverified_user_to_verification_link_when_intended(): void
{
$user = User::factory()->create([
'email' => 'verify@example.com',
'password' => bcrypt('password'),
'email_verified_at' => null,
]);
$verificationUrl = URL::temporarySignedRoute(
'verification.verify',
now()->addMinutes(60),
['id' => $user->id, 'hash' => sha1($user->email)],
absolute: false,
);
$response = $this->withSession(['url.intended' => $verificationUrl])->post(route('login.store'), [
'login' => 'verify@example.com',
'password' => 'password',
]);
$this->assertAuthenticated();
$response->assertRedirect($verificationUrl);
}
public function test_rate_limiting_on_failed_logins()
{
$user = User::factory()->create([