Help panel should toggle on repeated 'h' presses.
()
| 332 | |
| 333 | @pytest.mark.asyncio |
| 334 | async def test_help_panel_toggle(): |
| 335 | """Help panel should toggle on repeated 'h' presses.""" |
| 336 | wrapper = XtopTUIWrapper(datadir=XCAPTURE_DATADIR) |
| 337 | app = wrapper.create_app() |
| 338 | |
| 339 | async with app.run_test(size=(120, 40)) as pilot: |
| 340 | await pilot.pause(1.0) |
| 341 | assert await wait_for_app_ready(pilot) |
| 342 | |
| 343 | await pilot.press("h") |
| 344 | await pilot.pause(0.2) |
| 345 | |
| 346 | assert len(app.screen.query(HelpPanel)) == 1 |
| 347 | |
| 348 | await pilot.press("h") |
| 349 | await pilot.pause(0.2) |
| 350 | |
| 351 | assert len(app.screen.query(HelpPanel)) == 0 |
| 352 | |
| 353 | |
| 354 | if __name__ == "__main__": |
nothing calls this directly
no test coverage detected