checkpoint: massive refactor
This commit is contained in:
@@ -10,35 +10,30 @@ from api_hook_client import ApiHookClient
|
||||
|
||||
@pytest.mark.integration
|
||||
def test_mma_epic_simulation(live_gui):
|
||||
"""
|
||||
"""
|
||||
Integration test for MMA epic simulation.
|
||||
Red Phase: asserts False.
|
||||
"""
|
||||
client = ApiHookClient()
|
||||
assert client.wait_for_server(timeout=10)
|
||||
|
||||
# Try selecting MMA Dashboard tab if applicable (using typical naming convention)
|
||||
try:
|
||||
client.select_tab('main_tab_bar', 'tab_mma')
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# Set model to mock to avoid real API calls and timeouts
|
||||
try:
|
||||
client.set_value('current_model', 'mock')
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
client.set_value('mma_epic_input', 'Build a simple calculator')
|
||||
client.click('btn_mma_plan_epic')
|
||||
|
||||
# Poll client.get_mma_status() every 1 second (up to 30 seconds)
|
||||
success = False
|
||||
for i in range(30):
|
||||
status = client.get_mma_status()
|
||||
if status and status.get('tracks') and len(status['tracks']) > 0:
|
||||
success = True
|
||||
break
|
||||
time.sleep(1)
|
||||
|
||||
assert success, "Failed to generate at least one track."
|
||||
client = ApiHookClient()
|
||||
assert client.wait_for_server(timeout=10)
|
||||
# Try selecting MMA Dashboard tab if applicable (using typical naming convention)
|
||||
try:
|
||||
client.select_tab('main_tab_bar', 'tab_mma')
|
||||
except Exception:
|
||||
pass
|
||||
# Set model to mock to avoid real API calls and timeouts
|
||||
try:
|
||||
client.set_value('current_model', 'mock')
|
||||
except Exception:
|
||||
pass
|
||||
client.set_value('mma_epic_input', 'Build a simple calculator')
|
||||
client.click('btn_mma_plan_epic')
|
||||
# Poll client.get_mma_status() every 1 second (up to 30 seconds)
|
||||
success = False
|
||||
for i in range(30):
|
||||
status = client.get_mma_status()
|
||||
if status and status.get('tracks') and len(status['tracks']) > 0:
|
||||
success = True
|
||||
break
|
||||
time.sleep(1)
|
||||
assert success, "Failed to generate at least one track."
|
||||
|
||||
Reference in New Issue
Block a user