mirror of
https://github.com/storytold/lightcraft.git
synced 2026-11-12 00:42:44 -06:00
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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
517c745fad
commit
6408ccf244
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user