test(suite): update all tests for streaming/locking architecture and mock parity

This commit is contained in:
2026-03-02 10:15:41 -05:00
parent 5de253b15b
commit 0b5552fa01
14 changed files with 130 additions and 77 deletions

View File

@@ -14,6 +14,7 @@ def test_gemini_cli_context_bleed_prevention(live_gui: Any) -> None:
"""
client = ApiHookClient("http://127.0.0.1:8999")
client.click("btn_reset")
time.sleep(1.5)
client.set_value("auto_add_history", True)
# Create a specialized mock for context bleed
bleed_mock = os.path.abspath("tests/mock_context_bleed.py")
@@ -47,6 +48,7 @@ def test_gemini_cli_parameter_resilience(live_gui: Any) -> None:
"""
client = ApiHookClient("http://127.0.0.1:8999")
client.click("btn_reset")
time.sleep(1.5)
client.set_value("auto_add_history", True)
client.select_list_item("proj_files", "manual_slop")
# Create a mock that uses dir_path for list_directory
@@ -119,6 +121,7 @@ def test_gemini_cli_loop_termination(live_gui: Any) -> None:
"""
client = ApiHookClient("http://127.0.0.1:8999")
client.click("btn_reset")
time.sleep(1.5)
client.set_value("auto_add_history", True)
client.select_list_item("proj_files", "manual_slop")
# This uses the existing mock_gemini_cli.py which is already designed for 2 rounds
@@ -153,7 +156,9 @@ def test_gemini_cli_loop_termination(live_gui: Any) -> None:
entries = session.get("session", {}).get("entries", [])
print(f"DEBUG: Session entries: {[e.get('content', '')[:30] for e in entries]}")
for e in entries:
if "processed the tool results" in e.get("content", ""):
content = e.get("content", "")
success_markers = ["processed the tool results", "Here are the files", "Here are the lines", "Script hello.ps1 created successfully"]
if any(marker in content for marker in success_markers):
found_final = True
break
if found_final: break