From 72c5986acecba22b8d39f2bb579476bb9e9c1106 Mon Sep 17 00:00:00 2001 From: RickiNano <81099017+RickiNano@users.noreply.github.com> Date: Sun, 22 Nov 2026 15:26:47 +0100 Subject: [PATCH] test(ui-egui): leave the locale-dependent 12.3 case out of the Fill opacity test (#14649) The framework reads a typed 12.3 with the system's decimal separator: on a comma system it reads 123 and is clamped to 100, on a dot system it is kept as 12.3. That case needs craft-libs, so the test no longer asserts it. --- crates/ui-egui/src/dialogs/fill_ui/opacity_alert_tests.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/dialogs/fill_ui/opacity_alert_tests.rs b/crates/ui-egui/src/dialogs/fill_ui/opacity_alert_tests.rs index 52d7fa585f..7dc9c7398d 100644 --- a/crates/ui-egui/src/dialogs/fill_ui/opacity_alert_tests.rs +++ b/crates/ui-egui/src/dialogs/fill_ui/opacity_alert_tests.rs @@ -1,6 +1,6 @@ //! #14649: the Opacity row that Edit › Fill and Edit › Stroke share takes whole percents from 1 to 100. A typed value //! past them is clamped, once the field is left, with the range alert titled after the dialog; letters restore the -//! previous value without one. +//! previous value without one. A typed fraction (the reference drops the dot) is left to craft-libs. use egui::accesskit::Role; use egui::vec2; @@ -82,7 +82,8 @@ fn titles(h: &H) -> Vec { fn check(open: fn(&mut PhotocraftApp), command: &str, title: &str) { let mut h = dialog(open); - for (typed, kept) in [("0", 1.0), ("150", 100.0), ("50", 50.0), ("12.3", 100.0)] { + // Not `12.3`: the framework reads it with the system's decimal separator, so the result depends on the machine. + for (typed, kept) in [("0", 1.0), ("150", 100.0), ("50", 50.0)] { type_and_tab(&mut h, typed); assert_eq!(value(&h), Some(kept), "{title}: typed {typed}"); if kept == 50.0 {