aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_scenarios.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_scenarios.py b/tests/test_scenarios.py
index b4d5990..e138946 100644
--- a/tests/test_scenarios.py
+++ b/tests/test_scenarios.py
@@ -554,6 +554,16 @@ async def s_help(c: Ctx):
await c.press("escape")
await c.wait(lambda: not isinstance(app.screen, HelpScreen), 10)
c.check("Esc closes it", not isinstance(app.screen, HelpScreen))
+ # F-keys get eaten by terminals/multiplexers upstream of us, so the
+ # cheatsheet must not be reachable ONLY through F1.
+ await c.press("H")
+ opened_h = await c.wait(lambda: isinstance(app.screen, HelpScreen), 10)
+ c.check("H opens the cheatsheet too", opened_h,
+ f"screen={type(app.screen).__name__}")
+ if opened_h:
+ await c.press("H")
+ await c.wait(lambda: not isinstance(app.screen, HelpScreen), 10)
+ c.check("H closes it again", not isinstance(app.screen, HelpScreen))
@scenario("strings")