test(cli): assert the short-terminal branch drops description rows entirely
The parametrized heights 5 and 8 exercise the renderer's zero-budget branch (description too large to fit any row beside the reserved choice rows), but the test never asserted what that branch draws. Pin it: no description content and no omission notice, while the choices and key hint stay visible. Follow-up polish on #103350 by helix4u.
This commit is contained in:
@@ -67,6 +67,10 @@ def test_long_description_keeps_selected_choice_and_hint_visible(run_menu, heigh
|
||||
assert any("/ search" in row for row in rows)
|
||||
choices = [row for row in rows if "model-" in row]
|
||||
assert len(choices) >= min(5, height - 4)
|
||||
if height < 12:
|
||||
# No room for any description row: it is dropped entirely, notice included.
|
||||
assert not any("Unavailable model" in row for row in rows)
|
||||
assert not any("more description lines" in row for row in rows)
|
||||
if 12 <= height < 50:
|
||||
assert any("more description lines" in row for row in rows)
|
||||
if height == 50:
|
||||
|
||||
Reference in New Issue
Block a user