mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-28 03:57:57 -06:00
Merge pull request #151 from storytold/fix/snapshot-test-settle
Tests: snapshot-determinism test asserts both runs settled
This commit is contained in:
@@ -286,7 +286,10 @@ mod tests {
|
||||
let mut h = demo([900.0, 600.0]);
|
||||
let r = h.request("ui.set", json!({"view": "detail"}), Duration::from_secs(10));
|
||||
assert_eq!(r["ok"], true, "{r}");
|
||||
h.snapshot(SETTLE)
|
||||
// Compare only fully settled frames: a timed-out settle would compare half-rendered
|
||||
// pictures and fail as a misleading pixel diff (seen on loaded CI machines).
|
||||
assert!(h.settle(Duration::from_secs(300)), "the demo detail view did not settle within 300 s");
|
||||
h.paint()
|
||||
};
|
||||
let (a, b) = (shot(), shot());
|
||||
assert_eq!(a.size, b.size);
|
||||
|
||||
Reference in New Issue
Block a user