fix: Add debug logging to patch endpoints

This commit is contained in:
2026-03-07 00:45:07 -05:00
parent 14dab8e67f
commit d520d5d6c2
4 changed files with 52 additions and 26 deletions

View File

@@ -31,12 +31,14 @@ def test_patch_modal_appears_on_trigger(live_gui) -> None:
return True"""
result = client.trigger_patch(sample_patch, ["test_file.py"])
print(f"[DEBUG] trigger_patch result: {result}")
assert result.get("status") == "ok", f"Failed to trigger patch: {result}"
time.sleep(2)
status = client.get_patch_status()
assert status.get("show_modal") == True, "Patch modal should be visible"
print(f"[DEBUG] get_patch_status result: {status}")
assert status.get("show_modal") == True, f"Patch modal should be visible but got {status}"
assert status.get("patch_text") == sample_patch
assert "test_file.py" in status.get("file_paths", [])