Merge pull request #10801 from dotCooCoo/fix/color-panel-idle-replay-flake

Tests: dock panel tests wait for the font scan before counting idle frames
This commit is contained in:
.CooCoo
2026-12-03 21:35:04 -08:00
committed by GitHub
+3
View File
@@ -218,6 +218,9 @@ mod tests {
fn panel(id: &'static str) -> Panel {
SHOWN.with(|s| *s.borrow_mut() = id);
let mut app = VectorcraftApp::new(Session::new(), Default::default());
// The scan of the installed fonts, which the app starts, changes the fonts' generation when it ends, and the
// bodies' inputs hold that generation: wait for it, or an idle frame that it ends in runs the body.
vectorcraft_text::FontDb::global().family_list();
app.run("file.new", json!({"width": 200, "height": 200})).unwrap();
app.run("shape.rectangle", json!({"x": 10, "y": 10, "width": 50, "height": 50})).unwrap();
let mut panel = Panel::new(app, draw);