## 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
30 lines
1.0 KiB
PHP
30 lines
1.0 KiB
PHP
<?php
|
|
|
|
use App\Models\ManagedEnvironment;
|
|
use App\Support\Links\RequiredPermissionsLinks;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
|
|
uses(RefreshDatabase::class);
|
|
|
|
it('builds a tenant-scoped required permissions link without filters', function (): void {
|
|
$tenant = ManagedEnvironment::factory()->create([
|
|
'external_id' => 'tenant-123',
|
|
]);
|
|
|
|
expect(RequiredPermissionsLinks::requiredPermissions($tenant))
|
|
->toBe(url('/admin/workspaces/'.$tenant->workspace->slug.'/environments/tenant-123/required-permissions'));
|
|
});
|
|
|
|
it('builds a tenant-scoped required permissions link with filters', function (): void {
|
|
$tenant = ManagedEnvironment::factory()->create([
|
|
'external_id' => 'tenant 123',
|
|
]);
|
|
|
|
$url = RequiredPermissionsLinks::requiredPermissions($tenant, [
|
|
'status' => 'all',
|
|
'type' => 'application',
|
|
]);
|
|
|
|
expect($url)->toBe(url('/admin/workspaces/'.$tenant->workspace->slug.'/environments/tenant+123/required-permissions?status=all&type=application'));
|
|
});
|