fix(tui): synchronize HelpPanelOverlay keybinding display with actual app BINDINGS #3471
@@ -42,7 +42,16 @@ def step_toggle_help_for_context(context, context_name):
|
||||
|
||||
@then('the standalone help panel text should contain "{text}"')
|
||||
def step_standalone_help_panel_text_contains(context, text):
|
||||
assert text in context.help_panel._text
|
||||
assert text in context.help_panel._text, (
|
||||
f"Expected {text!r} in help panel text, got:\n{context.help_panel._text}"
|
||||
)
|
||||
|
|
||||
|
||||
|
||||
@then('the standalone help panel text should not contain "{text}"')
|
||||
def step_standalone_help_panel_text_not_contains(context, text):
|
||||
assert text not in context.help_panel._text, (
|
||||
f"Expected {text!r} NOT in help panel text, but found it in:\n{context.help_panel._text}"
|
||||
)
|
||||
|
||||
|
||||
@then("the help panel should be visible")
|
||||
|
||||
@@ -25,3 +25,16 @@ Feature: TUI Help Panel Overlay Coverage
|
||||
And the standalone help panel text should contain "Help: Slash Commands"
|
||||
When I toggle help for context "Slash Commands"
|
||||
Then the help panel should be hidden
|
||||
|
||||
|
freemo
commented
Good regression guard. The combination of positive ( Good regression guard. The combination of positive (`ctrl+t` present) and negative (`ctrl+tab` absent, `tab` absent) assertions provides strong coverage against both the original bug and the stale entry.
|
||||
Scenario: help panel Main Screen keybindings match actual app BINDINGS
|
||||
Given a fresh help panel overlay
|
||||
When I show help for context "Main Screen"
|
||||
Then the standalone help panel text should contain "ctrl+t"
|
||||
And the standalone help panel text should not contain "ctrl+tab"
|
||||
And the standalone help panel text should not contain "tab"
|
||||
|
||||
Scenario: help panel global keybindings match actual app BINDINGS
|
||||
Given a fresh help panel overlay
|
||||
When I show help for context "Main Screen"
|
||||
Then the standalone help panel text should contain "ctrl+q"
|
||||
And the standalone help panel text should contain "F1"
|
||||
|
||||
@@ -32,8 +32,7 @@ _GLOBAL_ITEMS = (
|
||||
_CONTEXT_ITEMS: dict[str, tuple[tuple[str, str], ...]] = {
|
||||
"Main Screen": (
|
||||
("enter", "Submit prompt"),
|
||||
("tab", "Cycle to next persona"),
|
||||
("ctrl+tab", "Cycle to next argument preset"),
|
||||
("ctrl+t", "Cycle to next argument preset"),
|
||||
("@", "Open Reference Picker overlay"),
|
||||
("/", "Open Slash Command overlay"),
|
||||
("! / $", "Activate shell mode"),
|
||||
|
freemo
commented
✅ Correctly updated from ✅ Correctly updated from `ctrl+tab` → `ctrl+t` to match `app.py` `BINDINGS`. Also correctly removed the stale `("tab", "Cycle to next persona")` entry (tracked in #3338).
|
||||
|
||||
Reference in New Issue
Block a user
Nice addition of the
should not containstep with a clear failure message. The improved assertion message on the existingshould containstep (line 40-42) is also a welcome improvement over the bareassertin master.