actingAs($user); $tenant->makeCurrent(); Filament::setTenant($tenant, true); /** @var OperationRunService $service */ $service = app(OperationRunService::class); $run = $service->ensureRun( tenant: $tenant, type: 'policy.sync', inputs: ['scope' => 'all'], initiator: $user, ); $service->dispatchOrFail($run, function (): void { // no-op (dispatch succeeded) }); expect($user->notifications()->count())->toBe(1); $this->assertDatabaseHas('notifications', [ 'notifiable_id' => $user->getKey(), 'notifiable_type' => $user->getMorphClass(), 'type' => OperationRunQueued::class, ]); })->group('ops-ux');