TenantAtlas/apps/platform/tests/Feature/Guards/Spec367OperationRunActionabilityGuardTest.php
ahmido 564da05096 feat: implement operation run actionability system (#439)
This PR introduces the Operation Run Actionability System.

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #439
2026-06-08 13:34:25 +00:00

33 lines
1.5 KiB
PHP

<?php
declare(strict_types=1);
it('keeps current UI consumers off historical terminal follow-up queries in Spec367', function (): void {
$repoRoot = repo_root();
$currentConsumerFiles = [
'apps/platform/app/Filament/Widgets/Dashboard/NeedsAttention.php',
'apps/platform/app/Filament/Pages/Monitoring/Operations.php',
'apps/platform/app/Support/GovernanceInbox/GovernanceInboxSectionBuilder.php',
'apps/platform/app/Support/Workspaces/WorkspaceOverviewBuilder.php',
'apps/platform/app/Support/EnvironmentDashboard/EnvironmentDashboardSummaryBuilder.php',
'apps/platform/app/Support/OpsUx/ActiveRuns.php',
];
foreach ($currentConsumerFiles as $relativePath) {
$contents = file_get_contents($repoRoot.DIRECTORY_SEPARATOR.$relativePath);
expect($contents)->not->toContain('->terminalFollowUp(');
}
});
it('keeps dashboard follow-up and operator review helpers backed by derived actionability in Spec367', function (): void {
$repoRoot = repo_root();
$operationRunModel = file_get_contents($repoRoot.'/apps/platform/app/Models/OperationRun.php');
$presenter = file_get_contents($repoRoot.'/apps/platform/app/Support/OpsUx/OperationUxPresenter.php');
expect($operationRunModel)->toContain('currentTerminalFollowUp()')
->and($operationRunModel)->toContain('OperationRunActionabilityResolver::class')
->and($presenter)->toContain('OperationRunActionabilityResolver::class');
});