From 6408ccf2442c233a67035ab557a83dff7a46f0c5 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Wed, 7 Oct 2026 10:58:29 -0400 Subject: [PATCH] Tests: the keyword-list test lets the list settle before clicking rows keyword_list_filters_renames_and_suggests failed on FreeBSD CI (b35487a) and locally (2 of 13 runs under load): ui.clickWidget clicks last frame's rect, and right after opening the panel / expanding "travel" the rows could still move, so the click hit "sunrise" instead of "travel|italy". Settling first: 30 of 30 runs pass. Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/headless.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/ui-egui/src/headless.rs b/crates/ui-egui/src/headless.rs index 4c7115de3c..4b599d0228 100644 --- a/crates/ui-egui/src/headless.rs +++ b/crates/ui-egui/src/headless.rs @@ -535,12 +535,16 @@ mod tests { ex(&mut h, "photo.setMeta", json!({"ids": [vis[0], vis[1]], "addKeywords": ["travel|italy"]})); ex(&mut h, "photo.setMeta", json!({"ids": [vis[2]], "addKeywords": ["travel|france"]})); h.request("ui.set", json!({"leftPanel": true}), t); + // clicks land on last frame's layout: let the keyword list settle first (on a loaded machine a + // row could still move, and the click then hit its neighbour, e.g. "sunrise") + h.settle(SETTLE); let r = h.request("ui.clickWidget", json!({"id": "source:keyword:travel"}), t); assert_eq!(r["ok"], true, "{r}"); assert_eq!(h.app.session.filter.keyword.as_deref(), Some("travel")); assert_eq!(h.app.session.visible_cloned().len(), 3); // open the level, filter by the child h.request("ui.clickWidget", json!({"id": "keywordToggle:travel"}), t); + h.settle(SETTLE); let r = h.request("ui.clickWidget", json!({"id": "source:keyword:travel|italy"}), t); assert_eq!(r["ok"], true, "{r}"); assert_eq!(h.app.session.visible_cloned().len(), 2);