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 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-07 10:18:53 -04:00
co-authored by Claude Opus 5.5
parent 30225fb6a0
commit 517c745fad
+3 -3
View File
@@ -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");