TenantAtlas/apps/platform/tests/Feature/Rbac/DriftLandingUiEnforcementTest.php
Ahmed Darrazi 630bd0311c
Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 1m45s
feat: enforce environment-owned baseline compare routing
2026-05-16 22:39:45 +02:00

22 lines
748 B
PHP

<?php
use App\Filament\Pages\BaselineCompareLanding;
use App\Support\Workspaces\WorkspaceContext;
it('uses baseline compare landing as the drift entry point post-cutover', function (): void {
[$user, $tenant] = createUserWithTenant(role: 'owner');
$this->actingAs($user)
->withSession([WorkspaceContext::SESSION_KEY => (int) $tenant->workspace_id])
->get(BaselineCompareLanding::getUrl(tenant: $tenant, panel: 'admin'))
->assertOk();
$this->actingAs($user)
->get('/admin/baseline-compare-landing?tenant='.urlencode((string) $tenant->external_id))
->assertNotFound();
$this->actingAs($user)
->get('/admin/t/'.$tenant->external_id.'/drift-landing')
->assertNotFound();
});