From 827fc6e07ac2bb8b62cc0d42094bc60a699efa0d Mon Sep 17 00:00:00 2001 From: vangel76 Date: Mon, 26 Oct 2026 00:04:01 +0100 Subject: [PATCH] Fix tests after merge: egui MouseWheel source field, keep upstream's pinned fixtures Co-Authored-By: Claude Sonnet 5.5 --- crates/layout/src/tests.rs | 3 +-- crates/layout/src/tests_textbox.rs | 3 +-- crates/ui-egui/src/lib.rs | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/layout/src/tests.rs b/crates/layout/src/tests.rs index 9bbbeeff85..c14fdf9c55 100644 --- a/crates/layout/src/tests.rs +++ b/crates/layout/src/tests.rs @@ -6947,14 +6947,13 @@ fn an_at_least_row_taller_than_a_page_splits_from_the_top_of_the_next_page() { /// on, keeps all 80 cell paragraphs, and pagination terminates. #[test] fn an_at_least_row_at_the_top_of_a_page_splits_instead_of_moving_on() { - crate::test_fonts(); use wordcraft_doc::props::HeightRule; // At the top of a page (or under the header rows repeated there) moving on gains nothing: a // row taller than the room splits, and pagination ends. let (l, pages) = at_least_rows(648.0, 1, |t| { t.rows[0].props.height = Some(700.0); t.rows[0].props.height_rule = HeightRule::AtLeast; - t.rows[0].cells[0].blocks = lines_in_cell(60, "Line"); + t.rows[0].cells[0].blocks = lines_in_cell(80, "Line"); }); assert!( pages.len() >= 2 && pages.iter().all(|p| p == &vec![0]), diff --git a/crates/layout/src/tests_textbox.rs b/crates/layout/src/tests_textbox.rs index 1746d4bb66..6b55472e6a 100644 --- a/crates/layout/src/tests_textbox.rs +++ b/crates/layout/src/tests_textbox.rs @@ -188,7 +188,6 @@ fn own_margins_and_resize_to_fit_keep_the_text_in_view() { /// later pages. #[test] fn inline_box_that_resizes_to_fit_takes_its_texts_height() { - crate::test_fonts(); // #2791: an inline box with Resize shape to fit text, saved 10 cm tall around three short // lines, shrinks to them as in Word; the page break after it stays on the first page. let brk = wordcraft_doc::para::PAGE_BREAK; @@ -298,4 +297,4 @@ fn inline_box_that_resizes_to_fit_takes_its_texts_height() { /// Filler paragraphs before the box in [`inline_box_that_resizes_to_fit_takes_its_texts_height`]: /// enough that a 10 cm box no longer leaves room for the page break on the first page. -const FILLER: usize = 16; +const FILLER: usize = 22; diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rs index acf25bcd48..634e5d37f2 100644 --- a/crates/ui-egui/src/lib.rs +++ b/crates/ui-egui/src/lib.rs @@ -4599,6 +4599,7 @@ mod tests { frame(&mut a, vec![egui::Event::PointerMoved(over_page)]); let wheel = egui::Event::MouseWheel { unit: egui::MouseWheelUnit::Line, + source: egui::MouseWheelSource::Unknown, delta: egui::vec2(0.0, 1.0), phase: egui::TouchPhase::Move, modifiers: egui::Modifiers::COMMAND,