Cover Navigation Boundaries
TEST-COVER-NAVIGATION-BOUNDARIES
Summary
Exercise first, last, empty, oversized, and repeated-navigation states in tests. Boundary cases catch cursor and scrolling bugs that polished manual demos often miss.
Rule
Cover navigation and scroll boundaries in tests.
Why
Navigation and scrolling bugs usually happen at the edges: empty lists, first item, last item, small viewport, oversized content, saturating offsets, and repeated key presses. Tests should cover those boundaries because manual demos often miss them.
Helps
- Prevents off-by-one and underflow behavior in terminal UI, list, cursor, and paging code.
Limits
Do not snapshot every visual state when a smaller state assertion proves the boundary. Use snapshots when layout or rendering is the contract.
Agent Instruction
Cover navigation and scroll boundaries in tests because navigation and scrolling bugs usually happen
at the edges: empty lists, first item, last item, small viewport, oversized content, saturating
offsets, and repeated key presses.Mechanisms
Supported by boundary table tests, snapshot tests, small viewport fixtures, saturating arithmetic checks, and event-sequence tests.