Test 1: TUI starts with only 'state' column in grouping
()
| 232 | |
| 233 | @pytest.mark.asyncio |
| 234 | async def test_tui_startup(): |
| 235 | """Test 1: TUI starts with only 'state' column in grouping""" |
| 236 | wrapper = XtopTUIWrapper( |
| 237 | datadir=XCAPTURE_DATADIR, |
| 238 | initial_group_cols=['state'] |
| 239 | ) |
| 240 | app = wrapper.create_app() |
| 241 | |
| 242 | async with app.run_test(size=(120, 40)) as pilot: |
| 243 | await pilot.pause() |
| 244 | await wait_for_table_load(pilot) |
| 245 | |
| 246 | # Verify table has data |
| 247 | table = app.query_one(DataTable) |
| 248 | row_count = len(list(table.rows)) |
| 249 | assert row_count > 0, f"No data rows found" |
| 250 | |
| 251 | # Check that 'state' column is present |
| 252 | columns, _ = get_table_data(app) |
| 253 | assert 'state' in [col.lower() for col in columns], "State column not found" |
| 254 | |
| 255 | print(f"✓ Test 1 passed: TUI started with {row_count} rows, grouped by 'state'") |
| 256 | |
| 257 | |
| 258 | @pytest.mark.asyncio |
nothing calls this directly
no test coverage detected