From c28abcf13a834585a9954f7e54175d47c0a0460b Mon Sep 17 00:00:00 2001 From: "sorokin.oleg.edu" Date: Sat, 12 Sep 2026 23:03:31 -0700 Subject: [PATCH] Account for the canvas keyboard notification in Escape tests --- .../oa-desktop/src/app/source_symbols/tests.rs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/crates/oa-desktop/src/app/source_symbols/tests.rs b/crates/oa-desktop/src/app/source_symbols/tests.rs index b78df953..92b9ed5f 100644 --- a/crates/oa-desktop/src/app/source_symbols/tests.rs +++ b/crates/oa-desktop/src/app/source_symbols/tests.rs @@ -787,7 +787,8 @@ async fn find_close_releases_removed_input_and_guarded_focus_respects_later_inpu /// Feed the real App subscription recipes the status produced by a mounted /// TextInput. Poll only immediately available output: no timer wait, worker, -/// file dialog or App task is executed by this helper. +/// file dialog or App task is executed by this helper. Require the canvas keyboard +/// notification separately, then return every command routed to an Escape owner. fn captured_input_subscription_messages(app: &App) -> Vec { use iced::advanced::{Layout, Shell, layout, subscription, widget}; use iced::futures::{StreamExt, stream, task::noop_waker_ref}; @@ -847,6 +848,7 @@ fn captured_input_subscription_messages(app: &App) -> Vec { .unwrap(); let _entered = runtime.enter(); let mut messages = Vec::new(); + let mut keyboard_boundaries = 0; for recipe in subscription::into_recipes(app.subscription()) { let mut output = recipe.stream(Box::pin(stream::iter([event.clone()]))); let mut context = Context::from_waker(noop_waker_ref()); @@ -855,9 +857,20 @@ fn captured_input_subscription_messages(app: &App) -> Vec { !matches!(message, Message::CheckpointTick), "timer must remain pending" ); - messages.push(message); + if matches!( + &message, + Message::WorkDrag(crate::app::allocation_drag::Event::KeyboardBoundary) + ) { + keyboard_boundaries += 1; + } else { + messages.push(message); + } } } + assert_eq!( + keyboard_boundaries, 1, + "each key has exactly one passive allocation notification" + ); messages }