diff --git a/crates/ui-egui/src/dialogs/layer_style/tests.rs b/crates/ui-egui/src/dialogs/layer_style/tests.rs index 22c649cd315..a99f9c7976b 100644 --- a/crates/ui-egui/src/dialogs/layer_style/tests.rs +++ b/crates/ui-egui/src/dialogs/layer_style/tests.rs @@ -500,6 +500,20 @@ fn unchanged_global_light_angle_is_not_applied() { assert_eq!(app.session.active().unwrap().doc.global_light.angle, light); } +/// #13413: a Stroke Emboss bevel drafts as a Style the page's menu offers, so the dropdown names it, and an +/// unchanged OK keeps it Stroke Emboss. +#[test] +fn stroke_emboss_bevel_is_a_style_menu_choice() { + let (s, style) = row(&[("layer.layerStyle.bevelEmboss", json!({"style": "stroke"}))]); + let bevel = style.instances(EffectKind::BevelEmboss).next().unwrap(); + assert_eq!(text(&style, bevel, "style").as_deref(), Some("stroke")); + let spec = EffectSpec::photoshop(EffectKind::BevelEmboss); + let Some(FieldKind::Choice(choices)) = spec.field("style").map(|f| &f.kind) else { panic!("Style is a choice") }; + assert!(choices.iter().any(|c| c.value == "stroke"), "the Style menu offers Stroke Emboss"); + let Effect::BevelEmboss(b) = &layer_effects(&s)[0] else { panic!("bevel") }; + assert_eq!(b.style, photocraft_doc::effects::BevelStyle::StrokeEmboss); +} + #[test] fn unedited_bevel_shading_keeps_imported_precision() { for size in [None, Some(12.0)] {