v2.18.3 (#861)
Co-authored-by: Clément Drouin <clement.drouin@mistral.ai> Co-authored-by: Laure Hugo <201583486+laure0303@users.noreply.github.com> Co-authored-by: Paul VEZIA <166131032+le-codeur-rapide@users.noreply.github.com> Co-authored-by: Peter Evers <peter.evers@mistral.ai> Co-authored-by: Jules YZERD <newtonlormont@gmail.com> Co-authored-by: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
d50704e694
commit
4e495f658d
130 changed files with 1042 additions and 552 deletions
|
|
@ -72,6 +72,31 @@ class TestQuestionAppState:
|
|||
assert len(app.answers) == 0
|
||||
assert len(app.other_texts) == 0
|
||||
|
||||
def test_more_than_four_options_accepted_and_rendered(self):
|
||||
from vibe.cli.textual_ui.widgets.question_app import QuestionApp
|
||||
|
||||
args = AskUserQuestionArgs(
|
||||
questions=[
|
||||
Question(
|
||||
question="Pick an analysis type",
|
||||
header="Analysis",
|
||||
options=[
|
||||
Choice(label="Financial"),
|
||||
Choice(label="Operational"),
|
||||
Choice(label="Strategic"),
|
||||
Choice(label="Competitive"),
|
||||
Choice(label="Multi-source"),
|
||||
],
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
app = QuestionApp(args)
|
||||
|
||||
assert app.max_options == 5
|
||||
# 5 options + Other = 6 (no Submit for single-select)
|
||||
assert app._total_options == 6
|
||||
|
||||
def test_total_options_single_select(self, single_question_args):
|
||||
from vibe.cli.textual_ui.widgets.question_app import QuestionApp
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue