<?php

declare(strict_types=1);

use App\Filament\Resources\ManagedEnvironmentResource;
use App\Support\Links\RequiredPermissionsLinks;

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 = ManagedEnvironmentResource::getUrl('view', ['record' => $tenant]);

    $this->actingAs($user)
        ->get(RequiredPermissionsLinks::requiredPermissions($tenant))
        ->assertSuccessful()
        ->assertSee('No data available')
        ->assertSee($expectedUrl, false)
        ->assertSee('Start verification');
});
