Fix: test_backlog_sort_order setzt beide sort_order-Werte ohne Tie.
All checks were successful
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Successful in 1m49s
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 19s
Test Suite / playwright-smoke (push) Successful in 12s

Einzel-PATCH auf 0 kollidierte mit dem ersten Item; entspricht dem Batch-Reorder aus AP1.12c.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Lars 2026-07-09 11:42:42 +02:00
parent 4f2f801889
commit 495993cad6
2 changed files with 8 additions and 1 deletions

View File

@ -255,6 +255,13 @@ def test_backlog_sort_order(client):
second = _create_backlog(client, token, initiative_id, title="Second").json() second = _create_backlog(client, token, initiative_id, title="Second").json()
assert first["sort_order"] < second["sort_order"] assert first["sort_order"] < second["sort_order"]
# Reorder wie im Frontend: beide Geschwister sort_order neu setzen (kein Tie)
bumped = client.patch(
f"/api/backlog/{first['id']}",
json={"sort_order": 10},
headers=_auth(token),
)
assert bumped.status_code == 200
patched = client.patch( patched = client.patch(
f"/api/backlog/{second['id']}", f"/api/backlog/{second['id']}",
json={"sort_order": 0}, json={"sort_order": 0},

View File

@ -1,3 +1,3 @@
APP_VERSION = "0.16.8-ap1.12d" APP_VERSION = "0.16.9-ap1.12d-fix"
DB_SCHEMA_VERSION = "015" DB_SCHEMA_VERSION = "015"
APP_NAME = "jinkendo-kairo" APP_NAME = "jinkendo-kairo"