From 04c4e627b4d4a2e89ba3de6c9360af793044916d Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 24 Nov 2026 15:34:17 +0000 Subject: [PATCH] Tests: update prompt tests wait for the threaded offer; panel close helper reads the dock's Close {name}; header-painting tests of the old dock renderer go --- crates/ui-egui/src/updates_ui.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/ui-egui/src/updates_ui.rs b/crates/ui-egui/src/updates_ui.rs index db37adf8..47740973 100644 --- a/crates/ui-egui/src/updates_ui.rs +++ b/crates/ui-egui/src/updates_ui.rs @@ -162,6 +162,13 @@ mod tests { ..Default::default() }; h.state_mut().updates_rt.updater.offer(release); + // The offer reads on a thread whether this copy can install the release itself; a later frame's tick opens + // the prompt. + let deadline = std::time::Instant::now() + std::time::Duration::from_secs(5); + while !h.state().updates_rt.updater.prompt_open() && std::time::Instant::now() < deadline { + h.run_steps(1); + std::thread::sleep(std::time::Duration::from_millis(2)); + } h.run_steps(2); }