v2.14.0 (#743)
Co-authored-by: Alexis Tacnet <alexis@mistral.ai> Co-authored-by: Clément Drouin <clement.drouin@mistral.ai> Co-authored-by: Guillaume LE GOFF <guillaume.lgf@gmail.com> Co-authored-by: Lucas Marandat <31749711+lucasmrdt@users.noreply.github.com> Co-authored-by: Maxime Dolores <maxime.dolores@ext.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: p.vezia <166131032+le-codeur-rapide@users.noreply.github.com> Co-authored-by: Hiba Chaabnia <Hiba-Chaabnia@users.noreply.github.com> Co-authored-by: Nikhil Bhima <nikhilbhima@users.noreply.github.com> Co-authored-by: Nkipohcs <Nkipohcs@users.noreply.github.com> Co-authored-by: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
ad0d5c9520
commit
3f8487f761
197 changed files with 10819 additions and 2830 deletions
56
tests/snapshots/test_ui_snapshot_config_issues.py
Normal file
56
tests/snapshots/test_ui_snapshot_config_issues.py
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from textual.pilot import Pilot
|
||||
|
||||
from tests.snapshots.base_snapshot_test_app import BaseSnapshotTestApp
|
||||
from tests.snapshots.snap_compare import SnapCompare
|
||||
from vibe.core.hooks.models import HookConfigIssue
|
||||
from vibe.core.skills.models import SkillConfigIssue
|
||||
|
||||
|
||||
class SnapshotTestAppWithConfigIssues(BaseSnapshotTestApp):
|
||||
def __init__(self) -> None:
|
||||
super().__init__()
|
||||
self.agent_loop.skill_manager._config_issues = [
|
||||
SkillConfigIssue(
|
||||
file=Path("/test/skills/broken-skill/SKILL.md"),
|
||||
message="Failed to load: missing required field 'description'",
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
class SnapshotTestAppWithHookConfigIssue(BaseSnapshotTestApp):
|
||||
def __init__(self) -> None:
|
||||
super().__init__()
|
||||
self.agent_loop.hook_config_issues = [
|
||||
HookConfigIssue(
|
||||
file=Path("/test/hooks/broken-hook.toml"),
|
||||
message="Failed to parse: invalid TOML syntax",
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
def test_snapshot_shows_config_issue_notification(snap_compare: SnapCompare) -> None:
|
||||
async def run_before(pilot: Pilot) -> None:
|
||||
await pilot.pause(0.3)
|
||||
|
||||
assert snap_compare(
|
||||
"test_ui_snapshot_config_issues.py:SnapshotTestAppWithConfigIssues",
|
||||
terminal_size=(120, 36),
|
||||
run_before=run_before,
|
||||
)
|
||||
|
||||
|
||||
def test_snapshot_shows_hook_config_issue_notification(
|
||||
snap_compare: SnapCompare,
|
||||
) -> None:
|
||||
async def run_before(pilot: Pilot) -> None:
|
||||
await pilot.pause(0.3)
|
||||
|
||||
assert snap_compare(
|
||||
"test_ui_snapshot_config_issues.py:SnapshotTestAppWithHookConfigIssue",
|
||||
terminal_size=(120, 36),
|
||||
run_before=run_before,
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue