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:
Mathias Gesbert 2026-06-30 15:03:21 +02:00 committed by GitHub
parent d50704e694
commit 4e495f658d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
130 changed files with 1042 additions and 552 deletions

View file

@ -5,10 +5,12 @@ from typing import Any
from unittest.mock import AsyncMock, MagicMock
import pytest
from textual.content import Content
from textual.widgets.option_list import Option
from tests.stubs.fake_connector_registry import FakeConnectorRegistry
from tests.stubs.fake_mcp_registry import FakeMCPRegistry
from vibe.cli.textual_ui.shortcut_hints import SHORTCUT_STYLE
from vibe.cli.textual_ui.widgets.mcp_app import (
_LIST_VIEW_HELP_AUTH,
_LIST_VIEW_HELP_TOOLS,
@ -431,9 +433,10 @@ class TestConnectorAuthRequested:
app.post_message.assert_not_called()
option_list.add_option.assert_called_once()
assert "press R to refresh" in str(
option_list.add_option.call_args.args[0].prompt
)
prompt = option_list.add_option.call_args.args[0].prompt
assert isinstance(prompt, Content)
assert "press r to refresh" in prompt.plain
assert any(span.style == SHORTCUT_STYLE for span in prompt.spans)
def test_connected_connector_with_no_indexed_tools_shows_message(self) -> None:
registry = MagicMock()