From 11b271b9ae465bbd72d0c9bbaa9e38b077f7880f Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Fri, 30 Oct 2026 15:54:46 -0400 Subject: [PATCH] Tests: the Picture Styles resize test asks that the row grow at 1920 px, not for an exact count (#1560) The count depends on how wide the rest of the Picture Format ribbon is. Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/ribbon/picture_styles_tests.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/ribbon/picture_styles_tests.rs b/crates/ui-egui/src/ribbon/picture_styles_tests.rs index 82772c5c..e80d14ab 100644 --- a/crates/ui-egui/src/ribbon/picture_styles_tests.rs +++ b/crates/ui-egui/src/ribbon/picture_styles_tests.rs @@ -99,7 +99,8 @@ fn a_resize_alone_settles_the_styles_row() { assert_eq!(inline_styles(&h), 2); h.set_size(egui::vec2(1920.0, 900.0)); assert!(h.run_ok().is_some(), "the ribbon keeps asking for frames after a resize"); - assert_eq!(inline_styles(&h), 8, "the row still has the 1440 px count after growing to 1920 px"); + // The exact count depends on how wide the rest of the ribbon is; it only has to grow. + assert!(inline_styles(&h) > 2, "the row still has the 1440 px count after growing to 1920 px"); assert!(h.query_by_label("Scroll ribbon right").is_none()); h.set_size(egui::vec2(1440.0, 900.0)); h.run_ok();