Kairo-Jinkendo/backend/tests/test_portfolio_steering_api.py
Lars b6434bcc50
All checks were successful
Deploy Development / deploy (push) Successful in 48s
Test Suite / pytest-backend (push) Successful in 4m14s
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Successful in 12s
feat(steering): K-Ext-5 Portfolio-Kernel-Aggregation ueber Initiativen
GET /api/workspace/steering; Portfolio-Widget nutzt Kernel-Attention, Vorschlaege und Agent-Slots.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-27 13:13:36 +02:00

25 lines
987 B
Python

"""Integration tests for portfolio steering API — K-Ext-5."""
from __future__ import annotations
from tests.factories import provision_user_in_tenant
from tests.test_initiatives_actions import _auth, _create_initiative, _login
def test_workspace_steering_aggregates_kernel(client):
user = provision_user_in_tenant(tenant_role="member")
token = _login(client, user)
created = _create_initiative(client, token, title="Portfolio Kernel")
initiative_id = created.json()["id"]
res = client.get("/api/workspace/steering", headers=_auth(token))
assert res.status_code == 200
body = res.json()
assert body["data_source"] == "steering_kernel_portfolio_v0.1"
assert body["initiative_count"] >= 1
assert isinstance(body["attention"], list)
assert isinstance(body["next_work"], list)
assert isinstance(body["proposals_summary"], list)
assert isinstance(body["agent_slots"], list)
assert initiative_id in body["attention_by_initiative"]