fix(tui): strengthen response status assertion in TUI A2A integration steps

Replace weak 'result is not None' check with comprehensive field validation
for tui_events and tui_output in the A2A adapter response result.

Addresses reviewer feedback from PR #10793: step_verify_response_status
was only checking result presence, not actual response content.

ISSUES CLOSED: #10793
This commit is contained in:
2026-05-13 10:36:59 +00:00
committed by drew
parent 12babda94e
commit 2a952dd81c
@@ -447,4 +447,9 @@ def step_get_adapter_response(context: Any) -> None:
@then("the response status should be set correctly")
def step_verify_response_status(context: Any) -> None:
"""Verify the response status is set correctly."""
assert context.adapter_response.result is not None
result = context.adapter_response.result
assert result is not None, "Response result must not be None"
assert "tui_events" in result, "result must contain tui_events"
assert "tui_output" in result, "result must contain tui_output"
assert isinstance(result["tui_events"], list), "tui_events must be a list"
assert isinstance(result["tui_output"], str), "tui_output must be a string"