Skip to content

PhotoCraft: An open-source, photo editor written by scratch in pure Rust

Integration: enable Generator in the Image Assets artboard tests (#8254)

David Mann07bb7c2522b0
diff --git a/crates/engine/src/web_cmds/tests.rs b/crates/engine/src/web_cmds/tests.rs
index e8c82ba44..8978234d7 100644
--- a/crates/engine/src/web_cmds/tests.rs
+++ b/crates/engine/src/web_cmds/tests.rs
@@ -690,6 +690,7 @@ fn image_assets_keep_full_artboards() {
})
.unwrap();
+ s.execute("prefs.set", json!({"path": "plugIns.generatorEnabled", "value": true})).unwrap();
let r = s.execute("file.generate.imageAssets", json!({"on": true, "dir": dir})).unwrap();
assert!(r["errors"].as_array().unwrap().is_empty(), "{r}");
let board = decode(&format!("{dir}/board.png"));
@@ -727,6 +728,7 @@ fn image_assets_refuse_empty_artboards() {
Ok(())
})
.unwrap();
+ s.execute("prefs.set", json!({"path": "plugIns.generatorEnabled", "value": true})).unwrap();
let r = s.execute("file.generate.imageAssets", json!({"on": true, "dir": dir})).unwrap();
assert_eq!(r["files"], json!([]), "{r}");
let errors = r["errors"].as_array().unwrap();