First public release. - docs: document the audit log, user offboarding, CSV export and the "require a reason for destructive actions" setting across README, docs/ and CLAUDE/AGENTS.md; note retention for panel_audit - docs: fill the publishing placeholders (repo URL, security contact, issue-template links) and add a semantic-versioning policy - move agent/contributor context into CLAUDE/ (AGENTS.md + a README); root CLAUDE.md is now a thin @-import pointer - add a favicon (shield-lock, matching the login screen) to the login page and the app layout - CHANGELOG: promote [Unreleased] to [1.0.0]; keep the earlier internal build as [0.1.0] Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UfuvfwexztdS7LDpGuKsuK
54 lines
1.5 KiB
PHP
54 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use Tests\TestCase;
|
|
|
|
class LocalizationTest extends TestCase
|
|
{
|
|
public function test_default_locale_is_polish(): void
|
|
{
|
|
$this->get('/login')
|
|
->assertOk()
|
|
->assertSee('Zaloguj się kontem domenowym')
|
|
->assertSee('Zaloguj');
|
|
}
|
|
|
|
public function test_login_screen_has_language_and_theme_switchers(): void
|
|
{
|
|
$this->get('/login')
|
|
->assertOk()
|
|
->assertSee('id="themeToggle"', escape: false)
|
|
->assertSee(route('locale.switch', 'pl'), escape: false)
|
|
->assertSee(route('locale.switch', 'en'), escape: false);
|
|
}
|
|
|
|
public function test_switching_language_persists_and_translates_the_ui(): void
|
|
{
|
|
$this->get('/language/en')->assertRedirect();
|
|
$this->assertSame('en', session('locale'));
|
|
|
|
$this->get('/login')
|
|
->assertOk()
|
|
->assertSee('Sign in with your domain account')
|
|
->assertDontSee('Zaloguj się kontem domenowym');
|
|
|
|
$this->get('/language/pl')->assertRedirect();
|
|
$this->assertSame('pl', session('locale'));
|
|
|
|
$this->get('/login')->assertSee('Zaloguj się kontem domenowym');
|
|
}
|
|
|
|
public function test_unknown_locale_is_rejected(): void
|
|
{
|
|
$this->get('/language/de')->assertNotFound();
|
|
$this->get('/language/xx')->assertNotFound();
|
|
}
|
|
|
|
public function test_locale_switch_route_works_without_authentication(): void
|
|
{
|
|
$this->get('/language/en')->assertRedirect();
|
|
$this->assertGuest('ldap');
|
|
}
|
|
}
|