## Summary - restore broad full-suite green-signal coverage across platform governance, operations, onboarding, dashboard/productization, and customer review flows - align related platform tests and supporting behavior with the current expected state for this restoration pass - update the spec-candidates queue as part of the same suite-restoration sweep ## Validation - `cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Browser/Dashboard/TenantDashboardProductizationSmokeTest.php tests/Browser/Reviews/CustomerReviewWorkspaceSmokeTest.php tests/Browser/Spec194GovernanceFrictionSmokeTest.php tests/Browser/Spec265DecisionRegisterSmokeTest.php` Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #351
29 lines
1.3 KiB
PHP
29 lines
1.3 KiB
PHP
<?php
|
|
|
|
use App\Support\Auth\Capabilities;
|
|
use Illuminate\Support\Facades\Gate;
|
|
|
|
it('enforces manager must-allow and must-not capabilities', function () {
|
|
[$user, $tenant] = createUserWithTenant(role: 'manager');
|
|
|
|
$gate = Gate::forUser($user);
|
|
|
|
expect($gate->allows(Capabilities::TENANT_VIEW, $tenant))->toBeTrue();
|
|
expect($gate->allows(Capabilities::TENANT_SYNC, $tenant))->toBeTrue();
|
|
expect($gate->allows(Capabilities::TENANT_INVENTORY_SYNC_RUN, $tenant))->toBeTrue();
|
|
expect($gate->allows(Capabilities::TENANT_FINDINGS_TRIAGE, $tenant))->toBeTrue();
|
|
expect($gate->allows(Capabilities::TENANT_MANAGE, $tenant))->toBeTrue();
|
|
|
|
expect($gate->allows(Capabilities::TENANT_BACKUP_SCHEDULES_RUN, $tenant))->toBeTrue();
|
|
expect($gate->allows(Capabilities::TENANT_BACKUP_SCHEDULES_MANAGE, $tenant))->toBeTrue();
|
|
|
|
expect($gate->allows(Capabilities::PROVIDER_VIEW, $tenant))->toBeTrue();
|
|
expect($gate->allows(Capabilities::PROVIDER_RUN, $tenant))->toBeTrue();
|
|
expect($gate->allows(Capabilities::PROVIDER_MANAGE, $tenant))->toBeTrue();
|
|
|
|
expect($gate->allows(Capabilities::AUDIT_VIEW, $tenant))->toBeTrue();
|
|
|
|
expect($gate->allows(Capabilities::TENANT_MEMBERSHIP_MANAGE, $tenant))->toBeTrue();
|
|
expect($gate->allows(Capabilities::TENANT_DELETE, $tenant))->toBeFalse();
|
|
});
|