v2.17.0 (#822)
Co-authored-by: Clément Sirieix <clement.sirieix@mistral.ai> Co-authored-by: Guillaume LE GOFF <guillaume.lgf@gmail.com> Co-authored-by: Hdandria <henri.dandria@mistral.ai> Co-authored-by: Ivana Dunisijevic <ivana.dunisijevic@mistral.ai> Co-authored-by: Jean Burellier <sheplu@users.noreply.github.com> Co-authored-by: Mathias Gesbert <mathias.gesbert@mistral.ai> Co-authored-by: Mert Unsal <mert.unsal@mistral.ai> Co-authored-by: Michel Thomazo <51709227+michelTho@users.noreply.github.com> Co-authored-by: Paul VEZIA <166131032+le-codeur-rapide@users.noreply.github.com> Co-authored-by: Pierre Rossinès <pierre.rossines@mistral.ai> Co-authored-by: Val <102326092+vdeva@users.noreply.github.com> Co-authored-by: Vincent G <10739306+VinceOPS@users.noreply.github.com> Co-authored-by: renovate-mistral[bot] <253709520+renovate-mistral[bot]@users.noreply.github.com> Co-authored-by: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
564a14365e
commit
6bedf271ce
223 changed files with 10533 additions and 6947 deletions
|
|
@ -8,6 +8,7 @@ import pytest
|
|||
from vibe.setup.update_prompt.update_prompt_dialog import (
|
||||
UpdateChoice,
|
||||
UpdatePromptApp,
|
||||
UpdatePromptMode,
|
||||
UpdatePromptResult,
|
||||
)
|
||||
|
||||
|
|
@ -75,6 +76,33 @@ async def test_dialog_default_selection_is_update() -> None:
|
|||
assert app._dialog.selected is UpdateChoice.UPDATE
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_startup_prompt_uses_continue_label() -> None:
|
||||
app = UpdatePromptApp(current_version="1.0.0", latest_version="2.0.0")
|
||||
|
||||
async with app.run_test() as pilot:
|
||||
await pilot.pause()
|
||||
assert app._dialog is not None
|
||||
assert (
|
||||
app._dialog._choice_labels[UpdateChoice.CONTINUE]
|
||||
== "Continue with current version"
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_check_upgrade_prompt_uses_cancel_label() -> None:
|
||||
app = UpdatePromptApp(
|
||||
current_version="1.0.0",
|
||||
latest_version="2.0.0",
|
||||
prompt_mode=UpdatePromptMode.CHECK_UPGRADE,
|
||||
)
|
||||
|
||||
async with app.run_test() as pilot:
|
||||
await pilot.pause()
|
||||
assert app._dialog is not None
|
||||
assert app._dialog._choice_labels[UpdateChoice.CONTINUE] == "Cancel upgrade"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_dialog_returns_quit_on_ctrl_q() -> None:
|
||||
app = UpdatePromptApp(current_version="1.0.0", latest_version="2.0.0")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue