Tests: give the covering window its sizing pass

This commit is contained in:
bflatastic
2026-10-29 19:54:33 +07:00
parent 8f5d14c7f7
commit 536a98d17f
+7 -4
View File
@@ -7338,11 +7338,14 @@ fn a_panel_or_dialog_over_the_canvas_hides_the_pointer_from_it() {
run(&mut app, vec![], None);
assert!(app.hover_doc.is_some(), "over the canvas");
for cover in [Cover::Panel(egui::Rect::from_center_size(over, vec2(120.0, 120.0))), Cover::Dialog] {
run(&mut app, vec![], Some(cover));
run(&mut app, vec![], Some(cover));
// A new window takes a sizing pass before it covers anything, as in the test above.
for _ in 0..3 {
run(&mut app, vec![], Some(cover));
}
assert_eq!(app.hover_doc, None, "under it");
run(&mut app, vec![], None);
run(&mut app, vec![], None);
for _ in 0..3 {
run(&mut app, vec![], None);
}
assert!(app.hover_doc.is_some(), "back once it closes");
}
}