From 4b474d77a9c77a14bdd5a3bd8ef63ea0b012cb82 Mon Sep 17 00:00:00 2001 From: Hamza Date: Tue, 20 Oct 2026 00:10:10 +0500 Subject: [PATCH] Replace Fonts test: a window wide enough to hold Home's ribbon Home's ribbon has grown since the test was written. At the harness's 1400x900 the Editing group starts at x=1398, so the Replace Fonts button is two pixels wide on screen and a click at its centre lands outside the window: the button is found and enabled, but never clicked, and the dialog assertion fails. The ribbon does not scroll sideways, so the window has to hold it; 1800x1100 is what the other full-ribbon tests here use. cargo xtask ci fails at `test` on main without this. --- crates/ui-egui/src/replacefonts_tests.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/replacefonts_tests.rs b/crates/ui-egui/src/replacefonts_tests.rs index 205c65aa..e60110ca 100644 --- a/crates/ui-egui/src/replacefonts_tests.rs +++ b/crates/ui-egui/src/replacefonts_tests.rs @@ -15,7 +15,11 @@ fn harness() -> Harness<'static, SlideApp> { s.execute("format.font", &json!({"family": "Comic Neue"})).unwrap(); s.execute("format.size", &json!({"size": 40})).unwrap(); let app = SlideApp::new(s, Services::default()); - let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 60.0).build_ui_state( + // Home's ribbon is wider than it was when this test was written: at 1400 the Editing group + // begins at x=1398, so the Replace Fonts button is two pixels wide on screen and a click at + // its centre lands outside the window. The ribbon does not scroll sideways, so the window has + // to be wide enough to hold it -- 1800 is what the other full-ribbon tests here use. + let mut h = Harness::builder().with_size(egui::vec2(1800.0, 1100.0)).with_step_dt(1.0 / 60.0).build_ui_state( |ui, app: &mut SlideApp| { app.logic(ui.ctx()); app.ui(ui);