From 924c4409bb0faf3a5b9a11d0a8381e4a0b9e87f9 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 25 Nov 2026 18:43:42 -0800 Subject: [PATCH] Preferences test: run the reset frame through testing::app_frame The test of a prefs.reset run outside VectorcraftApp::run now draws its frame with crate::testing::app_frame on the window's context. --- crates/ui-egui/src/prefs_dialog/tests.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/prefs_dialog/tests.rs b/crates/ui-egui/src/prefs_dialog/tests.rs index 5930e2def0..daad8a6bef 100644 --- a/crates/ui-egui/src/prefs_dialog/tests.rs +++ b/crates/ui-egui/src/prefs_dialog/tests.rs @@ -569,9 +569,8 @@ fn prefs_reset_outside_run_resets_the_ui_only_rows_in_the_next_frame() { let default = ui_rows(&a); set_ui_rows(&mut a, (!default.0, !default.1, !default.2)); a.session.execute("prefs.reset", &json!({})).unwrap(); - let ctx = crate::testing::ui_context(); - let mut out = ctx.run_ui(egui::RawInput::default(), |ui| a.tick(ui.ctx())); - out.textures_delta.clear(); + let ctx = a.ui_ctx.clone().expect("a window context"); + crate::testing::app_frame(&mut a, &ctx, egui::RawInput::default()); assert_eq!(ui_rows(&a), default); // Before the next command switches workspaces: the workspace left keeps the reset value.