TenantAtlas/tests/Feature/RequiredPermissions/RequiredPermissionsCopyActionsTest.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');
});