Skip to content

Commit e2990a2

Browse files
committed
fix(e2e): addressed comments
1 parent 2954a53 commit e2990a2

3 files changed

Lines changed: 2 additions & 24 deletions

File tree

tests/e2e/features/skills.feature

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ Feature: Agent skills tests
215215
"""
216216
When I wait for the response to be completed
217217
Then The status code of the response is 200
218-
And The response is the last streamed fragment
219218
And The body of the "tool_calls" field of the response is the following
220219
"""
221220
[
@@ -284,7 +283,6 @@ Feature: Agent skills tests
284283
"""
285284
When I wait for the response to be completed
286285
Then The status code of the response is 200
287-
And The response is the last streamed fragment
288286
And The body of the "tool_calls" field of the response is the following
289287
"""
290288
[
@@ -358,7 +356,6 @@ Feature: Agent skills tests
358356
"""
359357
When I wait for the response to be completed
360358
Then The status code of the response is 200
361-
And The response is the last streamed fragment
362359
And The body of the "tool_calls" field of the response is the following
363360
"""
364361
[
@@ -428,7 +425,6 @@ Feature: Agent skills tests
428425
"""
429426
When I wait for the response to be completed
430427
Then The status code of the response is 200
431-
And The response is the last streamed fragment
432428
And The body of the "tool_calls" field of the response is the following
433429
"""
434430
[
@@ -494,7 +490,6 @@ Feature: Agent skills tests
494490
"""
495491
When I wait for the response to be completed
496492
Then The status code of the response is 200
497-
And The response is the last streamed fragment
498493
And The body of the "tool_calls" field of the response is the following
499494
"""
500495
[
@@ -623,7 +618,6 @@ Feature: Agent skills tests
623618
"""
624619
When I wait for the response to be completed
625620
Then The status code of the response is 200
626-
And The response is the last streamed fragment
627621
And The body of the "tool_calls" field of the response is the following
628622
"""
629623
[
@@ -716,7 +710,6 @@ Feature: Agent skills tests
716710
"""
717711
When I wait for the response to be completed
718712
Then The status code of the response is 200
719-
And The response is the last streamed fragment
720713
And The body of the "tool_calls" field of the response is the following
721714
"""
722715
[

tests/e2e/features/steps/common_http.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,7 @@ def check_response_field_body(context: Context, field: str) -> None:
328328

329329
actual_value = response_body[field]
330330

331-
if not context.text:
332-
return
331+
assert context.text, "Expected value for response field body is missing"
333332

334333
expected_value = json.loads(context.text)
335334
validate_json_partially(actual_value, expected_value)

tests/e2e/features/steps/llm_query_response.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ def wait_for_complete_response(context: Context) -> None:
9494
context.response_data = _parse_streaming_response(context.response.text)
9595
context.response.raise_for_status()
9696
assert context.response_data["finished"] is True
97+
context.use_streaming_response_data = True
9798

9899

99100
@step('I use "{endpoint}" to ask question')
@@ -404,18 +405,3 @@ def _parse_streaming_response(response_text: str) -> dict:
404405
"finished": finished,
405406
"stream_error": stream_error,
406407
}
407-
408-
409-
@then("The response is the last streamed fragment")
410-
def response_is_last_streamed_fragment(context: Context) -> None:
411-
"""Assert streaming finished and flag context for field checks.
412-
413-
Sets ``context.use_streaming_response_data`` so subsequent steps
414-
read from ``context.response_data`` instead of the raw HTTP JSON.
415-
"""
416-
assert hasattr(context, "response_data"), "Streaming response has not been parsed"
417-
assert (
418-
context.response_data.get("finished") is True
419-
), "Streaming response not finished"
420-
context.use_streaming_response_data = True
421-
print(context.response_data)

0 commit comments

Comments
 (0)