test(sim): Setup framework for robust live sim verification
This commit is contained in:
@@ -162,6 +162,26 @@ class ApiHookClient:
|
||||
pass
|
||||
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):
|
||||
"""Simulates a click on a GUI button or item."""
|
||||
user_data = kwargs.pop('user_data', None)
|
||||
|
||||
Reference in New Issue
Block a user