MCPcopy
hub / github.com/tanelpoder/0xtools / wait_for_table_load

Function wait_for_table_load

xtop/tests/test_tui_basic.py:79–90  ·  view source on GitHub ↗

Wait for the data table to load with data

(pilot, timeout=5)

Source from the content-addressed store, hash-verified

77
78# Helper functions for navigation
79async def wait_for_table_load(pilot, timeout=5):
80 """Wait for the data table to load with data"""
81 for _ in range(timeout * 10): # Check every 100ms
82 try:
83 table = pilot.app.query_one(DataTable)
84 if table and len(list(table.rows)) > 0:
85 return True
86 except Exception:
87 # It's ok if table doesn't exist yet during startup
88 pass
89 await asyncio.sleep(0.1)
90 return False
91
92
93async def navigate_to_menu_item(pilot, item_text: str, max_attempts: int = 50):

Callers 8

test_cli_mappingFunction · 0.90
test_tui_startupFunction · 0.85
test_grouping_menuFunction · 0.85
test_add_single_columnFunction · 0.85
test_latency_columnsFunction · 0.85
test_peek_functionalityFunction · 0.85
test_navigation_keysFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected