diff --git a/crates/ui-egui/src/gradient_preview_swatch_opacity_tests.rs b/crates/ui-egui/src/gradient_preview_swatch_opacity_tests.rs index 3e380c9518..9a83b1b17d 100644 --- a/crates/ui-egui/src/gradient_preview_swatch_opacity_tests.rs +++ b/crates/ui-egui/src/gradient_preview_swatch_opacity_tests.rs @@ -28,9 +28,11 @@ fn classic_gradient_opacity_changes_the_painted_swatch_only_in_classic_mode() { let draw = |app: &mut PhotocraftApp, alpha: f32| { let rect = Rect::from_min_size(Pos2::ZERO, vec2(1400.0, 180.0)); - let output = ctx.run_ui(egui::RawInput { screen_rect: Some(rect), ..Default::default() }, |ui| { + let mut output = ctx.run_ui(egui::RawInput { screen_rect: Some(rect), ..Default::default() }, |ui| { ui.horizontal(|ui| super::bar(app, ui)); }); + // This fixture inspects the paint shapes without a renderer. + output.textures_delta.clear(); let expected = Color32::from(Srgba::new(1.0, 0.0, 1.0, alpha)); assert!(output.shapes.iter().any(|clipped| mesh_has_color(&clipped.shape, expected)), "the swatch paints at alpha {alpha}"); };