v2.7.2 (#556)
Co-authored-by: Clément Sirieix <clement.sirieix@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:
parent
54b9a17457
commit
9c1c32e058
28 changed files with 587 additions and 179 deletions
|
|
@ -9,6 +9,7 @@ from vibe.cli.history_manager import HistoryManager
|
|||
from vibe.cli.textual_ui.app import VibeApp
|
||||
from vibe.cli.textual_ui.widgets.chat_input.body import ChatInputBody
|
||||
from vibe.cli.textual_ui.widgets.chat_input.container import ChatInputContainer
|
||||
from vibe.cli.textual_ui.widgets.messages import UserMessage
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
|
@ -112,6 +113,29 @@ async def test_ui_does_not_prevent_arrow_down_to_move_cursor_to_bottom_lines(
|
|||
assert final_row == 1, f"cursor is still on line {final_row}."
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_ui_alt_left_and_alt_right_move_by_word(vibe_app: VibeApp) -> None:
|
||||
async with vibe_app.run_test() as pilot:
|
||||
chat_input = vibe_app.query_one(ChatInputContainer)
|
||||
textarea = chat_input.input_widget
|
||||
assert textarea is not None
|
||||
|
||||
await pilot.press(*"hello brave world")
|
||||
assert textarea.cursor_location == (0, len("hello brave world"))
|
||||
|
||||
await pilot.press("alt+left")
|
||||
assert textarea.cursor_location == (0, len("hello brave "))
|
||||
|
||||
await pilot.press("alt+left")
|
||||
assert textarea.cursor_location == (0, len("hello "))
|
||||
|
||||
await pilot.press("alt+right")
|
||||
assert textarea.cursor_location == (0, len("hello brave"))
|
||||
|
||||
assert chat_input.value == "hello brave world"
|
||||
assert len(vibe_app.query(UserMessage)) == 0
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_ui_resumes_arrow_down_after_manual_move(
|
||||
vibe_app: VibeApp, tmp_path: Path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue