Implements Spec 076 enterprise remediation UX for tenant required permissions. Highlights - Above-the-fold overview (impact + counts) with missing-first experience - Feature-based grouping, filters/search, copy-to-clipboard for missing app/delegated permissions - Tenant-scoped deny-as-not-found semantics; DB-only viewing - Centralized badge semantics (no ad-hoc status mapping) Testing - Feature tests for default filters, grouping, copy output, and non-member 404 behavior. Integration - Adds deep links from verification checks to the Required permissions page. Co-authored-by: Ahmed Darrazi <ahmeddarrazi@MacBookPro.fritz.box> Reviewed-on: #92
26 lines
929 B
PHP
26 lines
929 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Models\Tenant;
|
|
|
|
it('renders guidance, admin consent link, re-run verification, and copy actions on the required permissions page', function (): void {
|
|
$tenant = Tenant::factory()->create([
|
|
'external_id' => 'tenant-copy-actions-a',
|
|
'app_client_id' => null,
|
|
]);
|
|
|
|
[$user, $tenant] = createUserWithTenant(tenant: $tenant, role: 'readonly');
|
|
|
|
$this->actingAs($user)
|
|
->get("/admin/t/{$tenant->external_id}/required-permissions")
|
|
->assertSuccessful()
|
|
->assertSee('Guidance')
|
|
->assertSee('Who can fix this?', false)
|
|
->assertSee('Admin consent guide')
|
|
->assertSee('learn.microsoft.com/en-us/entra/identity/enterprise-apps/grant-admin-consent', false)
|
|
->assertSee('Re-run verification')
|
|
->assertSee('Copy missing application permissions')
|
|
->assertSee('Copy missing delegated permissions');
|
|
});
|