From 517c745fad7b0f425fe59d51f1dcff0182404ce7 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Wed, 7 Oct 2026 10:18:53 -0400 Subject: [PATCH] Tests: the folder-tree test waits for the subfolder row, not three frames local_folder_tree_expands_and_browses failed on FreeBSD CI (707138f) and under local load: the expanded folder's listing can land after the fixed three frames. It now steps until the row is laid out (bounded by SETTLE). Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/tests_masking.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/tests_masking.rs b/crates/ui-egui/src/tests_masking.rs index 2abc141f3..9c8ea349e 100644 --- a/crates/ui-egui/src/tests_masking.rs +++ b/crates/ui-egui/src/tests_masking.rs @@ -371,10 +371,10 @@ fn local_folder_tree_expands_and_browses() { let base_s = base.to_string_lossy().to_string(); let r = h.request("ui.clickWidget", json!({"id": format!("folderToggle:{base_s}")}), T); assert_eq!(r["ok"], true, "{r}"); - for _ in 0..3 { - h.step(); - } let trip = base.join("Trip").to_string_lossy().to_string(); + // the folder listing can land a few frames later on a loaded machine (FreeBSD CI): wait for the row + let row = format!("source:local:{trip}"); + h.step_until(SETTLE, |h| h.app.widgets.iter().any(|(w, _)| *w == row)); let r = h.request("ui.clickWidget", json!({"id": format!("source:local:{trip}")}), T); assert_eq!(r["ok"], true, "the subfolder is listed: {r}"); assert_eq!(h.app.session.browse.as_ref().map(|b| b.path.clone()), Some(trip.clone()), "clicking it browses it");