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.
This commit is contained in:
Hamza
2026-10-20 00:28:19 +05:00
parent f34f4121c8
commit 4b474d77a9
+5 -1
View File
@@ -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);