## Summary - retire the tenant panel runtime and converge operator routing on the workspace-first admin shell - update tenant, operations, and required-permissions navigation helpers to use canonical workspace-scoped URLs - repair the focused feature coverage, add the Spec 280 browser smoke, and record the implementation close-out in the requirements checklist ## Validation - `cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/WorkspaceFoundation tests/Feature/Workspaces tests/Feature/ManagedEnvironment tests/Feature/RequiredPermissions tests/Feature/Operations tests/Feature/MonitoringOperationsTest.php` - `cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Browser/Spec280WorkspaceTenancyEnvironmentRoutingSmokeTest.php` - `cd apps/platform && ./vendor/bin/sail bin pint --dirty --format agent` ## Note - `origin/platform` is not present on the remote; `platform-dev` is the clean base branch that limits this PR to the Spec 280 prep commit plus the implementation commit. Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #340
35 lines
1.2 KiB
PHP
35 lines
1.2 KiB
PHP
<?php
|
|
|
|
use App\Models\TenantPermission;
|
|
use App\Support\Links\RequiredPermissionsLinks;
|
|
|
|
it('renders required permissions overview with missing-first ordering and feature cards', function (): void {
|
|
[$user, $tenant] = createUserWithTenant(role: 'readonly');
|
|
|
|
$configured = config('intune_permissions.permissions', []);
|
|
if (! is_array($configured) || count($configured) < 2) {
|
|
test()->markTestSkipped('Need at least 2 required permissions configured.');
|
|
}
|
|
|
|
$grantedKey = (string) ($configured[0]['key'] ?? '');
|
|
$missingKey = (string) ($configured[1]['key'] ?? '');
|
|
|
|
if ($grantedKey === '' || $missingKey === '') {
|
|
test()->markTestSkipped('Configured permission keys missing.');
|
|
}
|
|
|
|
TenantPermission::create([
|
|
'managed_environment_id' => (int) $tenant->getKey(),
|
|
'permission_key' => $grantedKey,
|
|
'status' => 'granted',
|
|
'details' => ['source' => 'db'],
|
|
'last_checked_at' => now(),
|
|
]);
|
|
|
|
$this->actingAs($user)
|
|
->get(RequiredPermissionsLinks::requiredPermissions($tenant, ['status' => 'all']))
|
|
->assertSuccessful()
|
|
->assertSee('Blocked', false)
|
|
->assertSeeInOrder([$missingKey, $grantedKey], false);
|
|
});
|