mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-04 13:02:50 -05:00
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:
1 file changed
+3
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user