artisan('db:seed'); }); it('renders the login page in a requested locale', function () { // SetLocale reads ?lang= and stores the choice in the session, so the // switch is a full page visit rather than an Inertia one. visit('/login?lang=de') ->assertSee('Anmelden') ->assertAttribute('#username', 'placeholder', 'eMail oder Benutzername'); }); it('keeps the chosen locale for the next request', function () { visit('/login?lang=de')->assertSee('Anmelden'); visit('/login')->assertSee('Anmelden'); }); it('translates the application chrome once signed in', function () { browserLogin(); visit('/?lang=de') ->assertNoJavaScriptErrors() ->assertSee('Benutzer') ->assertSee('Gesamte Benutzeranzahl'); }); it('falls back to english for an unknown locale', function () { visit('/login?lang=xx')->assertSee('Login'); });