toContain('/admin/workspaces/'.$workspace->getRouteKey().'/operations') ->toContain('operation_type=inventory.sync') ->not->toContain('tableFilters') ->not->toContain('inventory_sync'); }); it('Spec338 operations hub maps operation_type query into the type table filter', function (): void { $environment = ManagedEnvironment::factory()->active()->create([ 'name' => 'Spec338 Environment A', 'external_id' => 'spec338-environment-a', ]); [$user, $environment] = createUserWithTenant(tenant: $environment, role: 'owner', workspaceRole: 'owner'); $workspace = $environment->workspace()->firstOrFail(); $runInventory = OperationRun::factory() ->forTenant($environment) ->create(['type' => 'inventory_sync']); $runPolicy = OperationRun::factory() ->forTenant($environment) ->create(['type' => 'policy.sync']); $this->actingAs($user); setAdminPanelContext(); session()->put(WorkspaceContext::SESSION_KEY, (int) $workspace->getKey()); Livewire::withQueryParams(['operation_type' => 'inventory.sync']) ->actingAs($user) ->test(Operations::class) ->assertSet('tableFilters.type.value', 'inventory.sync') ->assertCanSeeTableRecords([$runInventory]) ->assertCanNotSeeTableRecords([$runPolicy]); });