<?php

declare(strict_types=1);

use App\Filament\Resources\TenantResource;

it('renders the no-data state with a canonical start verification link when no stored permission data exists', function (): void {
    [$user, $tenant] = createUserWithTenant(role: 'readonly');

    $expectedUrl = TenantResource::getUrl('view', ['record' => $tenant]);

    $this->actingAs($user)
        ->get("/admin/tenants/{$tenant->external_id}/required-permissions")
        ->assertSuccessful()
        ->assertSee('Keine Daten verfügbar')
        ->assertSee($expectedUrl, false)
        ->assertSee('Start verification');
});
