v2.18.2 (#857)
Co-authored-by: Cyprien <courtot.c@gmail.com> Co-authored-by: Guillaume LE GOFF <guillaume.lgf@gmail.com> Co-authored-by: Laure Hugo <201583486+laure0303@users.noreply.github.com> Co-authored-by: Paul VEZIA <166131032+le-codeur-rapide@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: Yousria <yousria.debaud@mistral.ai> Co-authored-by: renovate-mistral[bot] <253709520+renovate-mistral[bot]@users.noreply.github.com> Co-authored-by: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
ed5b7192e6
commit
d50704e694
110 changed files with 1663 additions and 764 deletions
29
tests/cli/test_rewind_app_vim.py
Normal file
29
tests/cli/test_rewind_app_vim.py
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
from textual import events
|
||||
|
||||
from vibe.cli.textual_ui.widgets.rewind_app import RewindApp
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def app(monkeypatch: pytest.MonkeyPatch) -> RewindApp:
|
||||
widget = RewindApp("preview", has_file_changes=True)
|
||||
monkeypatch.setattr(widget, "_update_options", lambda: None)
|
||||
return widget
|
||||
|
||||
|
||||
class TestRewindAppVimKeybindings:
|
||||
def test_j_moves_down(self, app: RewindApp):
|
||||
assert app.selected_option == 0
|
||||
|
||||
app.on_key(events.Key("j", "j"))
|
||||
|
||||
assert app.selected_option == 1
|
||||
|
||||
def test_k_wraps_to_last(self, app: RewindApp):
|
||||
assert app.selected_option == 0
|
||||
|
||||
app.on_key(events.Key("k", "k"))
|
||||
|
||||
assert app.selected_option == len(app._options) - 1
|
||||
Loading…
Add table
Add a link
Reference in a new issue