fix(tui): use non-empty query in real-specs overlay step
The step "I initialise the overlay with real slash command specs"
was calling set_commands("", ...) which triggers the hide-on-empty-query
early return, leaving _text empty and failing all four assertions in
the "Overlay uses real slash_command_specs from catalog" scenario.
Use query "se" instead: all session:* entries (9) plus settings (1)
start with "se", giving 10 matches within the 12-entry display cap,
so both " /session:create" / "Create a new session tab" and
" /settings" / "Open settings" appear in the rendered overlay.
ISSUES CLOSED: #6450
This commit is contained in:
@@ -14,7 +14,7 @@ from cleveragents.tui.slash_catalog import SLASH_COMMAND_SPECS
|
||||
@when("I initialise the overlay with real slash command specs")
|
||||
def step_init_with_real_specs(context):
|
||||
"""Call set_commands with the real SLASH_COMMAND_SPECS from the catalog."""
|
||||
context.overlay.set_commands("", list(SLASH_COMMAND_SPECS))
|
||||
context.overlay.set_commands("se", list(SLASH_COMMAND_SPECS))
|
||||
|
||||
|
||||
@then("the overlay text should contain description for {command!r}")
|
||||
|
||||
Reference in New Issue
Block a user