LRC-LIB-LIBFOLDERS: the count test waits for each folder toggle to be drawn before clicking it

This commit is contained in:
Nathaniel Ledford
2026-10-28 11:44:38 -04:00
parent 232ce705c2
commit 93d6058372
+3 -1
View File
@@ -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();