From 2c48d977f965368fdccebdbc2bcadc0fa66494d3 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 2 Dec 2026 15:59:38 -0800 Subject: [PATCH] Recolor Artwork: check the row count before the randomize swatch check The gate's test-lint step failed on the new test: its assert!(...all(...)) over the randomized map would pass on an empty map. The test now asserts that both rows come back first. --- crates/engine/src/tests/recolor.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/tests/recolor.rs b/crates/engine/src/tests/recolor.rs index 3c8da0536a..3d8687edd7 100644 --- a/crates/engine/src/tests/recolor.rs +++ b/crates/engine/src/tests/recolor.rs @@ -928,7 +928,9 @@ fn a_rows_swatch_links_its_art_without_limit_to_library() { assert_eq!(ink["swatch"], json!({"name": "Ink", "library": "document"}), "{r}"); assert!(green.get("swatch").is_none(), "{r}"); let r = run(&mut s, "recolor.randomize", json!({"map": two, "order": false, "saturationBrightness": true, "seed": 3})); - assert!(r["map"].as_array().unwrap().iter().all(|r| r.get("swatch").is_none()), "a changed color drops its swatch: {r}"); + let rows = r["map"].as_array().unwrap(); + assert_eq!(rows.len(), 2, "{r}"); + assert!(rows.iter().all(|r| r.get("swatch").is_none()), "a changed color drops its swatch: {r}"); } }