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.
This commit is contained in:
dotCooCoo
2026-11-25 18:43:42 -08:00
parent b6b702f080
commit 924c4409bb
+2 -3
View File
@@ -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.