moo.agent.tests.test_tui

Tests for moo/agent/tui.py — _ScrollableOutputControl unit tests.

Tests cover the cursor-position logic that drives prompt_toolkit scrolling. No running TUI or event loop is required.

Does not import from moo.core or trigger Django setup.

Functions

test_autoscroll_cursor_at_last_line()

test_autoscroll_empty_buffer_cursor_at_zero()

test_autoscroll_grows_with_new_entries()

test_enter_scroll_mode_pins_cursor_to_bottom()

test_exit_scroll_mode_resumes_autoscroll()

test_line_count_updated_by_create_content()

test_scroll_down_clamps_at_last_line()

test_scroll_down_moves_cursor_down()

test_scroll_up_clamps_at_zero()

test_scroll_up_moves_cursor_up()

test_show_cursor_is_false()

test_window_height_updated_by_create_content()