Co-authored-by: Antoine <33425718+anth2o@users.noreply.github.com>
Co-authored-by: Bastien <bastien.baret@gmail.com>
Co-authored-by: Clément Sirieix <clement.sirieix@mistral.ai>
Co-authored-by: Kim-Adeline Miguel <51720070+kimadeline@users.noreply.github.com>
Co-authored-by: Mathias Gesbert <mathias.gesbert@mistral.ai>
Co-authored-by: Maxime Dolores <maxime.dolores@ext.mistral.ai>
Co-authored-by: Michel Thomazo <51709227+michelTho@users.noreply.github.com>
Co-authored-by: Nelson PROIA <144663685+Nelson-PROIA@users.noreply.github.com>
Co-authored-by: Pierre Rossinès <pierre.rossines@mistral.ai>
Co-authored-by: Quentin <quentin.torroba@mistral.ai>
Co-authored-by: Robin Gullo <robin.gullo@mistral.ai>
Co-authored-by: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Clément Drouin 2026-04-28 17:44:07 +02:00 committed by GitHub
parent a83c81ecf5
commit 632ea8c032
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
253 changed files with 13965 additions and 2525 deletions

View file

@ -4,13 +4,13 @@ from unittest.mock import patch
import pytest
from tests.snapshots.base_snapshot_test_app import BaseSnapshotTestApp
from tests.conftest import build_test_vibe_app, build_test_vibe_config
@pytest.mark.asyncio
async def test_ctrl_y_triggers_copy_selection() -> None:
"""Test that ctrl+y keybinding triggers copy_selection_to_clipboard."""
app = BaseSnapshotTestApp()
app = build_test_vibe_app()
with patch("vibe.cli.textual_ui.app.copy_selection_to_clipboard") as mock_copy:
async with app.run_test() as pilot:
@ -21,7 +21,7 @@ async def test_ctrl_y_triggers_copy_selection() -> None:
@pytest.mark.asyncio
async def test_ctrl_shift_c_triggers_copy_selection() -> None:
"""Test that ctrl+shift+c keybinding triggers copy_selection_to_clipboard."""
app = BaseSnapshotTestApp()
app = build_test_vibe_app()
with patch("vibe.cli.textual_ui.app.copy_selection_to_clipboard") as mock_copy:
async with app.run_test() as pilot:
@ -32,11 +32,7 @@ async def test_ctrl_shift_c_triggers_copy_selection() -> None:
@pytest.mark.asyncio
async def test_mouse_up_respects_autocopy_config_enabled() -> None:
"""Test that mouse up copies when autocopy_to_clipboard is True."""
from tests.snapshots.base_snapshot_test_app import default_config
config = default_config()
config.autocopy_to_clipboard = True
app = BaseSnapshotTestApp(config=config)
app = build_test_vibe_app(config=build_test_vibe_config(autocopy_to_clipboard=True))
with patch("vibe.cli.textual_ui.app.copy_selection_to_clipboard") as mock_copy:
async with app.run_test() as pilot:
@ -47,11 +43,9 @@ async def test_mouse_up_respects_autocopy_config_enabled() -> None:
@pytest.mark.asyncio
async def test_mouse_up_respects_autocopy_config_disabled() -> None:
"""Test that mouse up does not copy when autocopy_to_clipboard is False."""
from tests.snapshots.base_snapshot_test_app import default_config
config = default_config()
config.autocopy_to_clipboard = False
app = BaseSnapshotTestApp(config=config)
app = build_test_vibe_app(
config=build_test_vibe_config(autocopy_to_clipboard=False)
)
with patch("vibe.cli.textual_ui.app.copy_selection_to_clipboard") as mock_copy:
async with app.run_test() as pilot: