<?php

declare(strict_types=1);

use App\Models\Finding;
use App\Support\Badges\Domains\FindingTypeBadge;

it('renders entra_admin_roles badge with danger color and identification icon', function (): void {
    $badge = new FindingTypeBadge;
    $spec = $badge->spec(Finding::FINDING_TYPE_ENTRA_ADMIN_ROLES);

    expect($spec->label)->toBe('Entra admin roles')
        ->and($spec->color)->toBe('danger')
        ->and($spec->icon)->toBe('heroicon-m-identification');
});

it('still renders drift badge correctly after adding entra_admin_roles', function (): void {
    $badge = new FindingTypeBadge;
    $spec = $badge->spec(Finding::FINDING_TYPE_DRIFT);

    expect($spec->label)->toBe('Drift')
        ->and($spec->color)->toBe('info');
});

it('still renders permission_posture badge correctly after adding entra_admin_roles', function (): void {
    $badge = new FindingTypeBadge;
    $spec = $badge->spec(Finding::FINDING_TYPE_PERMISSION_POSTURE);

    expect($spec->label)->toBe('Permission posture')
        ->and($spec->color)->toBe('warning');
});
