mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-29 04:28:20 -06:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user