Expand description
TUI Testing Support (Feature 21 - EDD Compliance) TUI Testing Support (Feature 21 - EDD Compliance)
Test terminal user interfaces with zero external dependencies. Uses custom TextGrid and MockTty for 100% provable UX.
§EXTREME TDD: Tests written FIRST per spec
§Toyota Way Application
- Poka-Yoke: Type-safe frame capture with TextGrid
- Muda: Direct buffer comparison without rendering overhead
- Genchi Genbutsu: MockTty reflects actual terminal behavior
- Jidoka: Fail-fast on frame mismatch
§ComputeBlock Testing (PROBAR-SPEC-009)
With the compute-blocks feature, probar supports testing presentar-terminal
ComputeBlocks with SIMD verification and latency budget assertions.
ⓘ
use jugar_probar::tui::{ComputeBlockAssertion, assert_brick_valid};
use presentar_terminal::SparklineBlock;
let block = SparklineBlock::new(60);
assert_brick_valid(&block).unwrap();
ComputeBlockAssertion::new(&block)
.to_have_simd_support()
.to_have_latency_under(100);Structs§
- Frame
Assertion - Frame assertion builder (Playwright-style API)
- Frame
Diff - Difference between two frames
- Frame
Sequence - Sequence of frames for animation testing
- Line
Diff - A single line difference
- MockTty
- Mock TTY backend that captures output and tracks terminal state.
- Multi
Value Tracker - Multi-value tracker for monitoring multiple named values
- Snapshot
Manager - Snapshot manager for organizing and comparing snapshots
- Text
Grid - Simple text grid for TUI testing (replaces presentar-terminal CellBuffer).
- TuiFrame
- A captured TUI frame for testing
- TuiSnapshot
- TUI Snapshot for golden file testing
- TuiTest
Backend - TUI Test Backend for capturing frames
- Value
Tracker - Value tracker for monitoring changes over time
Enums§
- Ansi
Command - Parsed ANSI command for testing assertions.
- Clear
Mode - Clear mode for ED (erase display) and EL (erase line) commands.
Functions§
- expect_
frame - Create a frame assertion