create(); [$user, $tenant] = createUserWithTenant($tenant, role: 'owner'); OperationRun::factory()->create([ 'managed_environment_id' => (int) $tenant->getKey(), 'workspace_id' => (int) $tenant->workspace_id, 'type' => 'inventory_sync', ]); Filament::setTenant($tenant, true); $this->actingAs($user) ->withSession([WorkspaceContext::SESSION_KEY => (int) $tenant->workspace_id]) ->get(route('admin.operations.index', ['workspace' => $tenant->workspace])) ->assertOk() ->assertSee('Operations Hub') ->assertSee('Execution follow-up workbench') ->assertSee('Which operation needs attention now?') ->assertSee('Operations history') ->assertSee('Open operation'); }); it('surfaces canonical return context separately from the operations work lane', function (): void { $tenant = ManagedEnvironment::factory()->create(); [$user, $tenant] = createUserWithTenant($tenant, role: 'owner'); $context = new CanonicalNavigationContext( sourceSurface: 'backup_set.detail_section', canonicalRouteName: 'admin.operations.index', tenantId: (int) $tenant->getKey(), backLinkLabel: 'Back to backup set', backLinkUrl: '/admin/tenant/backup-sets/1', ); Filament::setTenant($tenant, true); $this->actingAs($user) ->withSession([WorkspaceContext::SESSION_KEY => (int) $tenant->workspace_id]) ->get(OperationRunLinks::index($tenant, $context)) ->assertOk() ->assertSee('Operations Hub') ->assertSee('Which operation needs attention now?') ->assertSee('Back to backup set') ->assertSee('/admin/tenant/backup-sets/1', false) ->assertSee('Operations history'); });