thing-tui: the pipeline events test says what it observes
Per the steward's decision on thing2:finding:cut-tui-host.s1.report-overclaims-and-misses-estimate; the estimate is explained in the report. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
fb2716f1e5
commit
6f884075d7
1 changed files with 4 additions and 5 deletions
|
|
@ -95,18 +95,17 @@ fn a_resize_is_the_next_frames_viewport() {
|
|||
assert_eq!(host.text().as_bytes(), golden.as_slice());
|
||||
}
|
||||
|
||||
/// Events drained from the terminal reach `frame` in the order they came, translated by the same
|
||||
/// function the host calls; a resize in the burst is not an event, and a frame holding them
|
||||
/// draws the same screen it would have drawn without.
|
||||
/// What it can observe today: a frame handed translated events draws the screen it draws without
|
||||
/// them, because `Core::frame` routes no input yet. The order translate gives is pinned in
|
||||
/// tests/input.rs, and what core does with it will be observable when it routes.
|
||||
#[test]
|
||||
fn drained_events_feed_the_frame_in_order() {
|
||||
fn a_frame_carrying_events_draws_the_same_screen_while_core_routes_none() {
|
||||
let burst = [
|
||||
Event::Key(KeyEvent::new(KeyCode::Down, KeyModifiers::NONE)),
|
||||
Event::Resize(100, 37),
|
||||
Event::Key(KeyEvent::new(KeyCode::Char('x'), KeyModifiers::NONE)),
|
||||
];
|
||||
let events: Vec<InputEvent> = burst.iter().flat_map(translate).collect();
|
||||
assert_eq!(events.len(), 3);
|
||||
let mut host = Host::new(Fixture::F01SwarmDashboard);
|
||||
host.frame(1_000, (100, 37), events);
|
||||
let golden = golden::read(&goldens(), "screen-f01-swarm-dashboard-cells.txt");
|
||||
|
|
|
|||
Loading…
Reference in a new issue