From 7b4746e5c2851fdcbf9476da5059b6db40fa3f6a Mon Sep 17 00:00:00 2001 From: Abdelali Bourassine Date: Thu, 15 Oct 2026 08:53:11 +0200 Subject: [PATCH] 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. --- crates/ui-egui/tests/commands.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/ui-egui/tests/commands.rs b/crates/ui-egui/tests/commands.rs index 2f22fc27d..8a313f44a 100644 --- a/crates/ui-egui/tests/commands.rs +++ b/crates/ui-egui/tests/commands.rs @@ -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); } }