Test that a Stroke Emboss bevel is a Style menu choice (#13413)

The Bevel & Emboss style list now lives in craft-libs (EffectSpec::photoshop);
the menu entry itself comes with the craft-libs pin that carries
storytold/craft-libs#4160.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
David MannandClaude Opus 5.5 committed 2026-11-28 23:50:13 +01:00
1 parent 3a33fda870
commit 81b823e59f
1 file changed
+14
@@ -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)] {