<?php

declare(strict_types=1);

use App\Support\OperationCatalog;

it('renders Unknown operation for unknown operation types and never renders raw types', function (): void {
    $label = OperationCatalog::label('some.new_operation');

    expect($label)->toBe('Unknown operation');
    expect($label)->not->toContain('some.new_operation');
})->group('ops-ux');

it('renders a label for RBAC health check', function (): void {
    expect(OperationCatalog::label('rbac.health_check'))
        ->toBe('RBAC health check');
})->group('ops-ux');

it('does not normalize unknown values to nearby canonical operation labels', function (): void {
    expect(OperationCatalog::label('inventory-sync'))
        ->toBe('Unknown operation')
        ->not->toBe(OperationCatalog::label('inventory.sync'));
})->group('ops-ux');
