Co-authored-by: Clément Drouin <clement.drouin@mistral.ai>
Co-authored-by: Clément Sirieix <clement.sirieix@mistral.ai>
Co-authored-by: Guillaume LE GOFF <guillaume.lgf@gmail.com>
Co-authored-by: Mathias Gesbert <mathias.gesbert@mistral.ai>
Co-authored-by: Michel Thomazo <51709227+michelTho@users.noreply.github.com>
Co-authored-by: Pierre Rossinès <pierre.rossines@mistral.ai>
Co-authored-by: Vincent G <10739306+VinceOPS@users.noreply.github.com>
Co-authored-by: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Quentin 2026-05-25 16:05:26 +02:00 committed by GitHub
parent f71bfd3b8c
commit adb1ca74ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
202 changed files with 5828 additions and 1968 deletions

View file

@ -0,0 +1,41 @@
from __future__ import annotations
from textual.app import App
from textual.pilot import Pilot
from tests.snapshots.snap_compare import SnapCompare
from vibe.core.config import ProviderConfig
from vibe.core.types import Backend
from vibe.setup.onboarding.screens.api_key import ApiKeyScreen
class ApiKeyScreenSnapshotApp(App[str | None]):
CSS_PATH = "../../vibe/setup/onboarding/onboarding.tcss"
def on_mount(self) -> None:
self.theme = "ansi-dark"
self.push_screen(
ApiKeyScreen(
ProviderConfig(
name="mistral",
api_base="https://api.mistral.ai/v1",
api_key_env_var="MISTRAL_API_KEY",
backend=Backend.MISTRAL,
)
)
)
def test_snapshot_onboarding_api_key_with_valid_input(
snap_compare: SnapCompare,
) -> None:
async def run_before(pilot: Pilot) -> None:
await pilot.pause(0.2)
await pilot.press(*"sk-test-api-key")
await pilot.pause(0.1)
assert snap_compare(
"test_ui_snapshot_onboarding_api_key.py:ApiKeyScreenSnapshotApp",
terminal_size=(80, 24),
run_before=run_before,
)