#11871: the Straighten tests run on a pixel layer, since main turns Straighten Layer off for the Background (#12033)

Co-Authored-By: DuBearte <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
committed 2026-11-11 15:22:48 +01:00
1 parent 612afbff21
commit 40a8891077
1 file changed
+4
@@ -71,6 +71,8 @@ fn ruler_straighten_with_crop_moves_count_points_with_the_image() {
s.execute("file.new", json!({"width": 600, "height": 400})).unwrap();
s.execute("count.add", json!({"x": 250, "y": 150})).unwrap();
s.execute("notes.add", json!({"x": 250, "y": 150})).unwrap();
// Straighten Layer is off for the Background (#12033).
s.execute("layer.new.layer", json!({})).unwrap();
s.execute("image.analysis.rulerTool", json!({"start": [0, 0], "end": [100, 10]})).unwrap();
s.execute("image.analysis.straightenLayer", json!({"crop": true})).unwrap();
let (c, n) = (count_point(&s), note(&s));
@@ -81,6 +83,8 @@ fn ruler_straighten_with_crop_moves_count_points_with_the_image() {
fn ruler_straighten_with_crop_asks_the_gate_for_its_rotation() {
let mut s = Session::new();
s.execute("file.new", json!({"width": 600, "height": 400})).unwrap();
// Straighten Layer is off for the Background (#12033).
s.execute("layer.new.layer", json!({})).unwrap();
s.execute("image.analysis.rulerTool", json!({"start": [0, 0], "end": [100, 10]})).unwrap();
let size = s.active().unwrap().doc.size;
s.authorize = Some(|id, _| if id == "image.rotation.arbitrary" { Err(crate::EngineError::Other("denied".into())) } else { Ok(()) });