fix: stabilize maintenance flow run/resume and procedural scrolling

This commit is contained in:
chihlasm
2026-02-17 20:12:07 -05:00
parent 058e2c5a23
commit db715929e7
10 changed files with 151 additions and 13 deletions

View File

@@ -98,6 +98,23 @@ async def test_get_schedule_not_found(client: AsyncClient, auth_headers: dict):
assert resp.status_code == 404
@pytest.mark.asyncio
async def test_cannot_create_schedule_for_non_maintenance_tree(
client: AsyncClient, auth_headers: dict, test_tree: dict
):
"""Schedules are restricted to maintenance flows."""
resp = await client.post(
"/api/v1/maintenance-schedules",
json={
"tree_id": test_tree["id"],
"cron_expression": "0 0 1 * *",
"timezone": "UTC",
},
headers=auth_headers,
)
assert resp.status_code == 400
@pytest.mark.asyncio
async def test_cannot_schedule_other_teams_tree(client: AsyncClient, auth_headers: dict, test_db):
"""User cannot create a schedule for a tree belonging to another team."""