TenantAtlas/apps/platform/tests/Browser/Spec283ProviderCapabilityRegistrySmokeTest.php
ahmido b159dacd36 feat: clean up legacy tenant environment context (#372)
## Summary
- remove legacy tenant-scoped routing and middleware paths in favor of the current environment/workspace context flow
- update Filament pages and resources to use the cleaned-up admin surface and environment filter context
- add the related spec 317 artifacts and targeted tests for environment filter state and legacy context cleanup

## Testing
- not run as part of this commit/push/PR workflow

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #372
2026-05-16 18:25:36 +00:00

31 lines
1011 B
PHP

<?php
declare(strict_types=1);
use App\Support\Links\RequiredPermissionsLinks;
use App\Support\Workspaces\WorkspaceContext;
use Illuminate\Foundation\Testing\RefreshDatabase;
uses(RefreshDatabase::class);
pest()->browser()->timeout(20_000);
it('smokes provider capability grouping on the required permissions page', function (): void {
[$user, $tenant] = createUserWithTenant(role: 'owner');
$this->actingAs($user)->withSession([
WorkspaceContext::SESSION_KEY => (int) $tenant->workspace_id,
WorkspaceContext::LAST_ENVIRONMENT_IDS_SESSION_KEY => [
(string) $tenant->workspace_id => (int) $tenant->getKey(),
],
]);
visit(RequiredPermissionsLinks::requiredPermissions($tenant, ['status' => 'all']))
->waitForText('Provider capabilities')
->assertSee('Inventory read')
->assertSee('Directory role definitions read')
->assertSee('Technical details')
->assertNoJavaScriptErrors()
->assertNoConsoleLogs();
});