<?php

declare(strict_types=1);

use App\Support\OpsUx\OperationUxPresenter;

it('builds canonical queued toast copy', function (): void {
    $toast = OperationUxPresenter::queuedToast('policy.sync');

    expect($toast->getTitle())->toBe('Policy sync queued');
    expect($toast->getBody())->toBe('Running in the background.');
})->group('ops-ux');

it('enforces queued toast duration within 3–5 seconds', function (): void {
    $toast = OperationUxPresenter::queuedToast('policy.sync');

    $duration = $toast->getDuration();

    expect($duration)->toBeInt();
    expect($duration)->toBeGreaterThanOrEqual(3000);
    expect($duration)->toBeLessThanOrEqual(5000);
})->group('ops-ux');
