Compare commits
4 Commits
858c4c27a4
...
7a1fe1723b
| Author | SHA1 | Date | |
|---|---|---|---|
| 7a1fe1723b | |||
| e93e2eaa40 | |||
| 2a30e62621 | |||
| 173ffc31de |
@@ -162,6 +162,26 @@ class ApiHookClient:
|
|||||||
pass
|
pass
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def get_text_value(self, item_tag):
|
||||||
|
"""Wraps get_value and returns its string representation, or None."""
|
||||||
|
val = self.get_value(item_tag)
|
||||||
|
return str(val) if val is not None else None
|
||||||
|
|
||||||
|
def get_node_status(self, node_tag):
|
||||||
|
"""Wraps get_value for a DAG node or queries the diagnostic endpoint for its status."""
|
||||||
|
val = self.get_value(node_tag)
|
||||||
|
if val is not None:
|
||||||
|
return val
|
||||||
|
try:
|
||||||
|
diag = self._make_request('GET', '/api/gui/diagnostics')
|
||||||
|
if 'nodes' in diag and node_tag in diag['nodes']:
|
||||||
|
return diag['nodes'][node_tag]
|
||||||
|
if node_tag in diag:
|
||||||
|
return diag[node_tag]
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
return None
|
||||||
|
|
||||||
def click(self, item, *args, **kwargs):
|
def click(self, item, *args, **kwargs):
|
||||||
"""Simulates a click on a GUI button or item."""
|
"""Simulates a click on a GUI button or item."""
|
||||||
user_data = kwargs.pop('user_data', None)
|
user_data = kwargs.pop('user_data', None)
|
||||||
|
|||||||
@@ -4,33 +4,7 @@ This file tracks all major tracks for the project. Each track has its own detail
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- [x] **Track: Implement context visualization and memory management improvements**
|
- [ ] **Track: Robust Live Simulation Verification**
|
||||||
*Link: [./tracks/context_management_20260223/](./tracks/context_management_20260223/)*
|
*Link: [./tracks/robust_live_simulation_verification/](./tracks/robust_live_simulation_verification/)*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- [~] **Track: get gui_2 working with latest changes to the project.**
|
|
||||||
*Link: [./tracks/gui2_feature_parity_20260223/](./tracks/gui2_feature_parity_20260223/)*
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
- [~] **Track: MMA Dashboard Visualization Overhaul**
|
|
||||||
*Link: [./tracks/mma_dashboard_visualization_overhaul/](./tracks/mma_dashboard_visualization_overhaul/)*
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
- [x] **Track: 4-Tier Architecture Implementation & Conductor Self-Improvement**
|
|
||||||
*Link: [./tracks/mma_implementation_20260224/](./tracks/mma_implementation_20260224/)*
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
- [~] **Track: MMA Core Engine Implementation**
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
# Implementation Plan: Robust Live Simulation Verification
|
# Implementation Plan: Robust Live Simulation Verification
|
||||||
|
|
||||||
## Phase 1: Framework Foundation
|
## Phase 1: Framework Foundation [checkpoint: e93e2ea]
|
||||||
- [ ] Task: Create `tests/visual_sim_mma_v2.py` based on existing simulation patterns.
|
- [x] Task: Create `tests/visual_sim_mma_v2.py` based on existing simulation patterns. 2a30e62
|
||||||
- [ ] Task: Implement helper methods in `ApiHookClient` for querying specific DearPyGui item states (e.g., `get_text_value`, `get_node_status`).
|
- [x] Task: Implement helper methods in `ApiHookClient` for querying specific DearPyGui item states (e.g., `get_text_value`, `get_node_status`). 2a30e62
|
||||||
|
|
||||||
## Phase 2: Epic & Track Verification
|
## Phase 2: Epic & Track Verification
|
||||||
- [ ] Task: Write the simulation routine to trigger a new Epic and verify the Track Browser updates correctly.
|
- [ ] Task: Write the simulation routine to trigger a new Epic and verify the Track Browser updates correctly.
|
||||||
|
|||||||
@@ -63,3 +63,38 @@ def test_unsupported_method_error():
|
|||||||
client = ApiHookClient()
|
client = ApiHookClient()
|
||||||
with pytest.raises(ValueError, match="Unsupported HTTP method"):
|
with pytest.raises(ValueError, match="Unsupported HTTP method"):
|
||||||
client._make_request('PUT', '/some_endpoint', data={'key': 'value'})
|
client._make_request('PUT', '/some_endpoint', data={'key': 'value'})
|
||||||
|
|
||||||
|
def test_get_text_value():
|
||||||
|
"""
|
||||||
|
Test retrieval of string representation using get_text_value.
|
||||||
|
"""
|
||||||
|
client = ApiHookClient()
|
||||||
|
with patch.object(client, 'get_value', return_value=123):
|
||||||
|
assert client.get_text_value("dummy_tag") == "123"
|
||||||
|
|
||||||
|
with patch.object(client, 'get_value', return_value=None):
|
||||||
|
assert client.get_text_value("dummy_tag") is None
|
||||||
|
|
||||||
|
def test_get_node_status():
|
||||||
|
"""
|
||||||
|
Test retrieval of DAG node status using get_node_status.
|
||||||
|
"""
|
||||||
|
client = ApiHookClient()
|
||||||
|
# When get_value returns a status directly
|
||||||
|
with patch.object(client, 'get_value', return_value="running"):
|
||||||
|
assert client.get_node_status("my_node") == "running"
|
||||||
|
|
||||||
|
# When get_value returns None and diagnostics provides a nodes dict
|
||||||
|
with patch.object(client, 'get_value', return_value=None):
|
||||||
|
with patch.object(client, '_make_request', return_value={'nodes': {'my_node': 'completed'}}):
|
||||||
|
assert client.get_node_status("my_node") == "completed"
|
||||||
|
|
||||||
|
# When get_value returns None and diagnostics provides a direct key
|
||||||
|
with patch.object(client, 'get_value', return_value=None):
|
||||||
|
with patch.object(client, '_make_request', return_value={'my_node': 'failed'}):
|
||||||
|
assert client.get_node_status("my_node") == "failed"
|
||||||
|
|
||||||
|
# When neither works
|
||||||
|
with patch.object(client, 'get_value', return_value=None):
|
||||||
|
with patch.object(client, '_make_request', return_value={}):
|
||||||
|
assert client.get_node_status("my_node") is None
|
||||||
|
|||||||
20
tests/visual_sim_mma_v2.py
Normal file
20
tests/visual_sim_mma_v2.py
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import pytest
|
||||||
|
import time
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
|
# Ensure project root is in path
|
||||||
|
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
assert False, "Red Phase: Not yet implemented"
|
||||||
Reference in New Issue
Block a user