Files
fotospiel-app/tests/Feature/Auth/TenantAdminEntryTest.php
Codex Agent 4ce409e918 Completed the full mobile app polish pass: navigation feel, safe‑area consistency, input styling, list rows, FAB
patterns, skeleton loading, photo selection/bulk actions with shared‑element transitions, notification detail sheet,
  offline banner, maskable manifest icons, and route prefetching.

  Key changes

  - Navigation/shell: press feedback on all header actions, glassy sticky header and tab bar, safer bottom spacing
    (resources/js/admin/mobile/components/MobileShell.tsx, resources/js/admin/mobile/components/BottomNav.tsx).
  - Forms + lists: shared mobile form controls, list‑style rows in settings/profile, consistent inputs across core
    flows (resources/js/admin/mobile/components/FormControls.tsx, resources/js/admin/mobile/SettingsPage.tsx,
    resources/js/admin/mobile/ProfilePage.tsx, resources/js/admin/mobile/EventFormPage.tsx, resources/js/admin/mobile/
    EventMembersPage.tsx, resources/js/admin/mobile/EventTasksPage.tsx, resources/js/admin/mobile/
    EventGuestNotificationsPage.tsx, resources/js/admin/mobile/NotificationsPage.tsx, resources/js/admin/mobile/
    EventPhotosPage.tsx, resources/js/admin/mobile/EventsPage.tsx).
  - Media workflows: shared‑element photo transitions, selection mode + bulk actions bar (resources/js/admin/mobile/
    EventPhotosPage.tsx).
  - Loading UX: shimmering skeletons (resources/css/app.css, resources/js/admin/mobile/components/Primitives.tsx).
  - PWA polish + perf: maskable icons, offline banner hook, and route prefetch (public/manifest.json, resources/js/
    admin/mobile/hooks/useOnlineStatus.tsx, resources/js/admin/mobile/prefetch.ts, resources/js/admin/main.tsx).
2025-12-27 23:55:48 +01:00

44 lines
1.1 KiB
PHP

<?php
namespace Tests\Feature\Auth;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class TenantAdminEntryTest extends TestCase
{
use RefreshDatabase;
public function test_guest_is_redirected_to_admin_start(): void
{
$response = $this->get('/event-admin/dashboard');
$response->assertRedirect('/event-admin/start');
}
public function test_tenant_admin_can_access_admin_shell(): void
{
$user = User::factory()->create([
'role' => 'tenant_admin',
]);
$response = $this->actingAs($user)->get('/event-admin/dashboard');
$response->assertOk();
$response->assertViewIs('admin');
$response->assertSee('viewport-fit=cover', false);
}
public function test_regular_user_is_redirected_to_packages(): void
{
$user = User::factory()->create([
'role' => 'user',
]);
$response = $this->actingAs($user)->get('/event-admin/dashboard');
$response->assertRedirect('/packages');
}
}