set('tenantpilot.onboarding.credentials_required', false); config()->set('intune_permissions.permissions', [[ 'key' => 'DeviceManagementApps.Read.All', 'type' => 'application', 'description' => 'Read apps', 'features' => ['apps'], ]]); [$user, $tenant] = createUserWithTenant(role: 'owner'); $this->actingAs($user); TenantPermission::create([ 'tenant_id' => $tenant->getKey(), 'permission_key' => 'DeviceManagementApps.Read.All', 'status' => 'granted', 'details' => ['source' => 'test'], 'last_checked_at' => now(), ]); TenantOnboardingSession::factory()->create([ 'tenant_id' => $tenant->getKey(), 'created_by_user_id' => $user->getKey(), 'status' => 'active', 'current_step' => 'permissions', 'payload' => [ 'tenant_id' => $tenant->tenant_id, 'environment' => $tenant->environment, 'name' => $tenant->name, ], ]); Livewire::withQueryParams([ 'tenant' => (string) $tenant->external_id, ]) ->test(TenantOnboardingWizard::class) ->assertSee('Required permissions') ->assertSee('DeviceManagementApps.Read.All') ->assertSee('Granted'); });