From 93d6058372847e7c4e1e615a79386884fc51801c Mon Sep 17 00:00:00 2001 From: Nathaniel Ledford Date: Fri, 23 Oct 2026 21:21:03 -0400 Subject: [PATCH] LRC-LIB-LIBFOLDERS: the count test waits for each folder toggle to be drawn before clicking it --- crates/ui-egui/src/tests/panels.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/tests/panels.rs b/crates/ui-egui/src/tests/panels.rs index 44a318646..3b35d37c0 100644 --- a/crates/ui-egui/src/tests/panels.rs +++ b/crates/ui-egui/src/tests/panels.rs @@ -1624,7 +1624,9 @@ fn folders_app_with_deep_labeled_chain() -> (Headless, String) { for name in &names[..names.len() - 1] { path.push('/'); path.push_str(name); - let r = h.request("ui.clickWidget", json!({"id": format!("libraryFolderToggle:{path}")}), T); + let toggle = format!("libraryFolderToggle:{path}"); + assert!(h.step_until(T, |h| has(h, &toggle)), "{toggle} is drawn"); + let r = h.request("ui.clickWidget", json!({"id": toggle}), T); assert_eq!(r["ok"], true, "{r}"); // the frame a new row is first drawn in, before the content has grown to what it asked for h.step();