mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-30 21:58:36 +00:00
Tests: let the Move dialog close before the units test opens Rectangle
dialog_lengths_show_in_the_general_unit confirmed the Move dialog and opened the Rectangle dialog in the same frame. Move holds its OK, so it stays on the stack until the next frame, and Rectangle is laid out once over it and once more, unseen, after Move leaves. The test drew two frames and passed only because the frame after the selection change ran a second pass for the Properties panel. With that panel drawn in one pass, the second frame showed nothing and the assertion failed. The test now draws a frame after OK, so Move has closed before the selection change and the Rectangle dialog. Its assertions are unchanged.
This commit is contained in:
@@ -101,6 +101,8 @@ fn dialog_lengths_show_in_the_general_unit() {
|
||||
window.type_text("10 mm");
|
||||
window.key(egui::Key::Tab, egui::Modifiers::NONE);
|
||||
confirm_dialog(&mut window.app());
|
||||
// The Move dialog holds its OK, so it leaves the stack in the next frame.
|
||||
window.frame();
|
||||
let square = {
|
||||
let app = window.app();
|
||||
let st = app.session.active().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user