From 0e53cfc2408de9ae64ae84d01a6dd61eb5241e3e Mon Sep 17 00:00:00 2001 From: Alfons Hoogervorst <92640+snofla@users.noreply.github.com> Date: Sun, 11 Oct 2026 17:42:25 +0200 Subject: [PATCH] Issue #989: the Export dialog height test expects the macOS row (Add to Apple Photos, 876 pt) export_dialog_is_unchanged_in_a_tall_window expected 846 pt on every platform. a6431c15 (add exported files to Apple Photos, #236) put a macOS-only checkbox at the end of the dialog, so on macOS it is 876 pt tall at 1600x1000 (measured: [[492 62] - [1107.2 938]]). The test failed on macOS on upstream main (76b53778) with no other change; it is unchanged on other platforms. Run on macOS (rustc 1.99.0): the five tests in tests_dialog_fit pass, cargo fmt is clean, clippy over lightcraft-ui-egui with --all-targets is clean. Not run on Linux or FreeBSD, where the expectation stays 846. Co-Authored-By: Claude Sonnet 5.5 --- crates/ui-egui/src/tests_dialog_fit.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/tests_dialog_fit.rs b/crates/ui-egui/src/tests_dialog_fit.rs index 895a1d864..0014c6bdb 100644 --- a/crates/ui-egui/src/tests_dialog_fit.rs +++ b/crates/ui-egui/src/tests_dialog_fit.rs @@ -94,8 +94,10 @@ fn export_dialog_is_unchanged_in_a_tall_window() { assert_fits(&h, "Export at 1600×1000"); let dialog = rect(&h, "dialog:window"); // (846 tall as before #781: the whole dialog, nothing scrolled away; 615 wide since the - // format row gained JPEG XL, #780) - assert!((dialog.height() - 846.0).abs() <= 1.0, "{dialog:?}"); + // format row gained JPEG XL, #780. On macOS the dialog has one more row, "Add to Apple Photos" + // (#236), so it is 876 tall there) + let height = if cfg!(target_os = "macos") { 876.0 } else { 846.0 }; + assert!((dialog.height() - height).abs() <= 1.0, "{dialog:?}"); assert!((dialog.width() - 615.2).abs() <= 1.0, "{dialog:?}"); }