v2.13.0 (#733)
Co-authored-by: Maxime Dolores <maxime.dolores@ext.mistral.ai> Co-authored-by: Michel Thomazo <51709227+michelTho@users.noreply.github.com> Co-authored-by: Peter Evers <peter.evers@mistral.ai> Co-authored-by: Pierre Rossinès <pierre.rossines@mistral.ai> Co-authored-by: Quentin <quentin.torroba@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: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
198277af3f
commit
ad0d5c9520
61 changed files with 969 additions and 461 deletions
|
|
@ -1,14 +1,23 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
import pytest
|
||||
from textual.app import App
|
||||
from textual.pilot import Pilot
|
||||
|
||||
from tests.snapshots.snap_compare import SnapCompare
|
||||
from vibe.cli.textual_ui.widgets.banner.petit_chat import PetitChat
|
||||
from vibe.core.config import ProviderConfig
|
||||
from vibe.core.types import Backend
|
||||
from vibe.setup.onboarding.screens.api_key import ApiKeyScreen
|
||||
|
||||
|
||||
class StaticPetitChat(PetitChat):
|
||||
def __init__(self, **kwargs: Any) -> None:
|
||||
super().__init__(animate=False, **kwargs)
|
||||
|
||||
|
||||
class ApiKeyScreenSnapshotApp(App[str | None]):
|
||||
CSS_PATH = "../../vibe/setup/onboarding/onboarding.tcss"
|
||||
|
||||
|
|
@ -27,8 +36,12 @@ class ApiKeyScreenSnapshotApp(App[str | None]):
|
|||
|
||||
|
||||
def test_snapshot_onboarding_api_key_with_valid_input(
|
||||
snap_compare: SnapCompare,
|
||||
snap_compare: SnapCompare, monkeypatch: pytest.MonkeyPatch
|
||||
) -> None:
|
||||
monkeypatch.setattr(
|
||||
"vibe.setup.onboarding.screens.api_key.PetitChat", StaticPetitChat
|
||||
)
|
||||
|
||||
async def run_before(pilot: Pilot) -> None:
|
||||
await pilot.pause(0.2)
|
||||
await pilot.press(*"sk-test-api-key")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue