From 42e9467bf9d746140a7ecd7a8b7b6382b1b5769b Mon Sep 17 00:00:00 2001 From: David Mann Date: Sun, 15 Nov 2026 16:41:17 +0100 Subject: [PATCH] Artboards to Files order test: expect the file names (#15170) #13641 renamed the exported files to with spaces as hyphens; the order test from #13670 still expected the old p_0000_Empty Board.png names and failed on main. Assert all three names in top-first order. --- crates/engine/src/cmd/artboard_cmds/pdf_page_order_tests.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/cmd/artboard_cmds/pdf_page_order_tests.rs b/crates/engine/src/cmd/artboard_cmds/pdf_page_order_tests.rs index 49356105a6..0541f8e456 100644 --- a/crates/engine/src/cmd/artboard_cmds/pdf_page_order_tests.rs +++ b/crates/engine/src/cmd/artboard_cmds/pdf_page_order_tests.rs @@ -54,5 +54,7 @@ fn artboards_to_files_keeps_its_top_first_order() { let r = s.execute("file.export.artboardsToFiles", json!({"dir": dir.to_string_lossy(), "prefix": "p"})).unwrap(); let _ = std::fs::remove_dir_all(&dir); let files: Vec<&str> = r["files"].as_array().unwrap().iter().filter_map(Value::as_str).collect(); - assert!(files[0].ends_with("p_0000_Empty Board.png") && files[2].ends_with("p_0002_Red Board.png"), "{files:?}"); + // Files are named , spaces as hyphens (#13633); top artboard first. + let names: Vec<&str> = files.iter().map(|f| f.rsplit(['/', '\\']).next().unwrap_or(f)).collect(); + assert_eq!(names, ["pEmpty-Board.png", "pBlue-Board.png", "pRed-Board.png"], "{files:?}"); }