🔥 **Cleanup & Tests:** Removed the obsolete auth.register component and its related route, feature tests, and browser tests. Disabled public registration and added tests to ensure /register returns a 404. Added new tests for service, lecturer, city, venue, and meetup CRUD flows.

This commit is contained in:
BT
2026-05-03 20:09:07 +02:00
parent a4cbb10604
commit a363c99453
13 changed files with 344 additions and 120 deletions
@@ -0,0 +1,46 @@
<?php
use App\Models\User;
it('lets an authenticated user update their profile name and persists it', function () {
$user = actingAsUser(['name' => 'Old Name']);
$page = visit('/de/settings/profile');
$page->assertSee('Old Name')
->fill('name', 'New Browser Name')
->click('Save')
->wait(1)
->assertSee('Saved.')
->assertNoJavaScriptErrors();
expect($user->refresh()->name)->toBe('New Browser Name');
});
it('shows a validation error when the profile name is cleared', function () {
actingAsUser(['name' => 'Original']);
$page = visit('/de/settings/profile');
$page->fill('name', '')
->click('Save')
->wait(1)
->assertNoJavaScriptErrors();
expect(User::query()->where('name', '')->exists())->toBeFalse();
});
it('still shows the updated name after a full page reload', function () {
$user = actingAsUser(['name' => 'Before Reload']);
$page = visit('/de/settings/profile');
$page->fill('name', 'After Reload')
->click('Save')
->wait(1);
$reloaded = visit('/de/settings/profile');
$reloaded->assertSee('After Reload')
->assertNoJavaScriptErrors();
expect($user->refresh()->name)->toBe('After Reload');
});