Implements Spec 081 provider-connection cutover. Highlights: - Adds provider connection resolution + gating for operations/verification. - Adds provider credential observer wiring. - Updates Filament tenant verify flow to block with next-steps when provider connection isn’t ready. - Adds spec docs under specs/081-provider-connection-cutover/ and extensive Spec081 test coverage. Tests: - vendor/bin/sail artisan test --compact tests/Feature/Filament/TenantSetupTest.php - Focused suites for ProviderConnections/Verification ran during implementation (see local logs). Co-authored-by: Ahmed Darrazi <ahmeddarrazi@MacBookPro.fritz.box> Reviewed-on: #98
32 lines
1.1 KiB
PHP
32 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Support\Verification\VerificationReportWriter;
|
|
|
|
it('Spec081 enforces verification next_steps schema as link-only label/url pairs', function (): void {
|
|
$report = VerificationReportWriter::build('provider.connection.check', [
|
|
[
|
|
'key' => 'provider.connection.check',
|
|
'title' => 'Provider Connection',
|
|
'status' => 'fail',
|
|
'severity' => 'high',
|
|
'blocking' => true,
|
|
'reason_code' => 'missing_configuration',
|
|
'message' => 'Missing default provider connection.',
|
|
'next_steps' => [
|
|
['label' => 'Manage Provider Connections', 'url' => '/admin/tenants/example/provider-connections'],
|
|
['label' => '', 'url' => '/admin/invalid'],
|
|
['label' => 'Missing URL'],
|
|
],
|
|
],
|
|
]);
|
|
|
|
expect($report['checks'][0]['next_steps'] ?? [])->toBe([
|
|
[
|
|
'label' => 'Manage Provider Connections',
|
|
'url' => '/admin/tenants/example/provider-connections',
|
|
],
|
|
]);
|
|
});
|