TenantAtlas/apps/platform/tests/Feature/OpsUx/QueuedToastCopyTest.php
Ahmed Darrazi 1741b22203 docs: amend constitution to v2.7.0 (LEAN-001 pre-production lean doctrine)
- Add LEAN-001 to constitution after BIAS-001: forbids legacy aliases,
  migration shims, dual-write logic, and compatibility fixtures in a
  pre-production codebase
- Add compatibility posture default block to spec template
- Add pre-production compatibility check to agent instructions
- Unify backup_set operation type to canonical backup_set.update
- Remove all legacy backup_set.add_policies/remove_policies references
- Add finding ownership semantics (responsibility/accountability labels)
- Clean up roadmap.md and spec-candidates.md
2026-04-20 19:53:04 +02:00

30 lines
1.1 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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('Queued for execution. Open the operation for progress and next steps.');
})->group('ops-ux');
it('enforces queued toast duration within 35 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');
it('builds canonical already-queued toast copy', function (): void {
$toast = OperationUxPresenter::alreadyQueuedToast('backup_set.update');
expect($toast->getTitle())->toBe('Backup set update already queued');
expect($toast->getBody())->toBe('A matching operation is already queued or running. No action needed unless it stays stuck.');
})->group('ops-ux');