feat(testing): stabilize simulation suite and fix gemini caching

This commit is contained in:
2026-02-25 01:44:46 -05:00
parent fb80ce8c5a
commit c952d2f67b
23 changed files with 784 additions and 596 deletions

View File

@@ -45,27 +45,28 @@ def test_full_live_workflow(live_gui):
# Enable auto-add so the response ends up in history
client.set_value("auto_add_history", True)
client.set_value("current_model", "gemini-2.5-flash-lite")
time.sleep(0.5)
# 3. Discussion Turn
client.set_value("ai_input", "Hello! This is an automated test. Just say 'Acknowledged'.")
client.click("btn_gen_send")
# Verify thinking indicator appears (might be brief)
thinking_seen = False
print("\nPolling for thinking indicator...")
for i in range(20):
for i in range(40):
state = client.get_indicator_state("thinking_indicator")
if state.get('shown'):
thinking_seen = True
print(f"Thinking indicator seen at poll {i}")
break
time.sleep(0.5)
# 4. Wait for response in session
success = False
print("Waiting for AI response in session...")
for i in range(60):
for i in range(120):
session = client.get_session()
entries = session.get('session', {}).get('entries', [])
if any(e.get('role') == 'AI' for e in entries):
@@ -74,8 +75,7 @@ def test_full_live_workflow(live_gui):
break
time.sleep(1)
assert success, "AI failed to respond within 60 seconds"
assert success, "AI failed to respond within 120 seconds"
# 5. Switch Discussion
client.set_value("disc_new_name_input", "AutoDisc")
client.click("btn_disc_create")