M0: the every-command test never opens a real file dialog (#2281)

every_registered_command_is_implemented skips a hand-kept list of commands
that open file pickers. file.pin_folder and create.multiple_separate are not
on it, so every run of the ui-egui tests showed two real file dialogs on the
developer's desktop (seen through the xdg portal on Linux). The test now
answers any picker as a cancel through pick_override.
This commit is contained in:
Abdelali Bourassine
2026-10-15 02:53:11 -04:00
committed by GitHub
parent cd9e30c3b0
commit 7b4746e5c2
+3
View File
@@ -158,6 +158,9 @@ fn every_registered_command_is_implemented() {
let dir = std::env::temp_dir().join(format!("pdfcraft-cmd-{}", std::process::id()));
std::fs::create_dir_all(&dir).unwrap();
app.save_override = Some(dir.join("out.pdf").to_string_lossy().into_owned());
// A picker the list above misses (file.pin_folder, create.multiple_separate did) must not
// open a real file dialog on the desktop running the tests: answer it as a cancel.
app.pick_override = Some(Vec::new());
assert!(app.execute(spec.id), "{} is registered but not implemented (or wrongly disabled)", spec.id);
}
}