Wait for the data table to load with data
(pilot, timeout=5)
| 77 | |
| 78 | # Helper functions for navigation |
| 79 | async 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 | |
| 93 | async def navigate_to_menu_item(pilot, item_text: str, max_attempts: int = 50): |
no outgoing calls
no test coverage detected