v2.3.0 (#429)
Co-authored-by: Carlo <carloantonio.patti@mistral.ai> Co-authored-by: Mathias Gesbert <mathias.gesbert@mistral.ai> Co-authored-by: Clement Sirieix <clem.sirieix@gmail.com> Co-authored-by: Michel Thomazo <michel.thomazo@mistral.ai> Co-authored-by: Clément Drouin <clement.drouin@mistral.ai> Co-authored-by: Vincent Guilloux <vincent.guilloux@mistral.ai> Co-authored-by: Thomas Kenbeek <thomas.kenbeek@mistral.ai> Co-authored-by: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
a560a47ce8
commit
5d2e01a6d7
139 changed files with 7152 additions and 1457 deletions
31
tests/e2e/test_cli_tui_onboarding.py
Normal file
31
tests/e2e/test_cli_tui_onboarding.py
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
import pexpect
|
||||
import pytest
|
||||
|
||||
from tests.e2e.common import SpawnedVibeProcessFixture, ansi_tolerant_pattern
|
||||
|
||||
|
||||
@pytest.mark.timeout(15)
|
||||
def test_spawn_cli_shows_onboarding_when_api_key_missing(
|
||||
tmp_path: Path,
|
||||
e2e_workdir: Path,
|
||||
spawned_vibe_process: SpawnedVibeProcessFixture,
|
||||
monkeypatch: pytest.MonkeyPatch,
|
||||
) -> None:
|
||||
vibe_home = tmp_path / "vibe-home-onboarding"
|
||||
vibe_home.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
monkeypatch.setenv("VIBE_HOME", str(vibe_home))
|
||||
monkeypatch.setenv("TERM", "xterm-256color")
|
||||
monkeypatch.delenv("MISTRAL_API_KEY", raising=False)
|
||||
|
||||
with spawned_vibe_process(e2e_workdir) as (child, captured):
|
||||
child.expect(ansi_tolerant_pattern("Welcome to Mistral Vibe"), timeout=15)
|
||||
child.sendcontrol("c")
|
||||
child.expect(pexpect.EOF, timeout=10)
|
||||
|
||||
output = captured.getvalue()
|
||||
assert "Setup cancelled" in output
|
||||
Loading…
Add table
Add a link
Reference in a new issue