mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-04 04:52:54 -05:00
Tests: the placedItems.add() revert test edits the document first, so File > Revert is available
This commit is contained in:
1 parent
68ac11f96e
commit
94a6d6ccf7
1 file changed
+1
-1
@@ -112,7 +112,7 @@ fn a_placed_items_add_result_is_stale_after_a_revert() {
|
||||
s.execute("document.save", &json!({"path": base.join("main/saved.vectorcraft").to_string_lossy()})).unwrap();
|
||||
let assign = format!("p.file = new File('{}')", js_path(&png));
|
||||
for read in ["p.file", assign.as_str()] {
|
||||
let e = failure(&mut s, &base, &format!("var p = app.activeDocument.placedItems.add(); vc.run('file.revert'); {read};"));
|
||||
let e = failure(&mut s, &base, &format!("var d = app.activeDocument; d.pathItems.rectangle(0, 0, 10, 10); var p = d.placedItems.add(); vc.run('file.revert'); {read};"));
|
||||
assert!(e.contains("Stale page item"), "{read}: {e}");
|
||||
}
|
||||
assert!(images(&s).is_empty());
|
||||
|
||||
Reference in new issue
Block a user