Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 51s
## Summary - decommission the legacy findings lifecycle backfill substrate across command, job, service, and UI layers - remove related platform capabilities, operation catalog entries, and action surface exemptions - add regression and removal verification tests to ensure runtime integrity and surface absence - include spec, plan, tasks, and data-model artifacts for the removal slice ## Scope - active spec: specs/253-remove-findings-backfill-runtime-surfaces - target branch: dev ## Validation - integrated regression and removal verification tests for console, findings, and system ops surfaces - audit log and capability trace verification for the removal path Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #294
43 lines
1.5 KiB
PHP
43 lines
1.5 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Filament\System\Pages\Ops\Controls;
|
|
use App\Models\PlatformUser;
|
|
use App\Support\Auth\PlatformCapabilities;
|
|
use App\Support\OperationalControls\OperationalControlCatalog;
|
|
use Filament\Facades\Filament;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
|
|
uses(RefreshDatabase::class);
|
|
|
|
beforeEach(function (): void {
|
|
Filament::setCurrentPanel('system');
|
|
Filament::bootCurrentPanel();
|
|
});
|
|
|
|
it('does not expose findings lifecycle backfill in operational controls or the control catalog', function (): void {
|
|
$user = PlatformUser::factory()->create([
|
|
'capabilities' => [
|
|
PlatformCapabilities::ACCESS_SYSTEM_PANEL,
|
|
PlatformCapabilities::OPS_CONTROLS_MANAGE,
|
|
],
|
|
'is_active' => true,
|
|
]);
|
|
|
|
$this->actingAs($user, 'platform');
|
|
|
|
$this->get(Controls::getUrl(panel: 'system'))
|
|
->assertSuccessful()
|
|
->assertDontSee('Findings lifecycle backfill')
|
|
->assertDontSee("mountAction('pause_findings_lifecycle_backfill')", escape: false)
|
|
->assertDontSee("mountAction('resume_findings_lifecycle_backfill')", escape: false)
|
|
->assertDontSee("mountAction('view_history_findings_lifecycle_backfill')", escape: false);
|
|
|
|
$catalog = app(OperationalControlCatalog::class);
|
|
|
|
expect($catalog->keys())->not->toContain('findings.lifecycle.backfill')
|
|
->and(fn (): array => $catalog->definition('findings.lifecycle.backfill'))
|
|
->toThrow(InvalidArgumentException::class);
|
|
});
|