MCPcopy Index your code
hub / github.com/tanelpoder/0xtools / test_help_panel_toggle

Function test_help_panel_toggle

xtop/tests/test_tui_simple.py:334–351  ·  view source on GitHub ↗

Help panel should toggle on repeated 'h' presses.

()

Source from the content-addressed store, hash-verified

332
333@pytest.mark.asyncio
334async 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
354if __name__ == "__main__":

Callers

nothing calls this directly

Calls 4

create_appMethod · 0.95
wait_for_app_readyFunction · 0.85
queryMethod · 0.80
XtopTUIWrapperClass · 0.70

Tested by

no test coverage detected