test(ui): run the Home recent Reveal test inline so its toast check can't race

home_recent_context_menu_reveals_the_target_without_opening_or_removing_it
never set run_inline, so reveal_path checked the missing file on a
pdfcraft-reveal worker thread while the test waited a fixed three frames
before asserting the "The file no longer exists" toast. On a loaded runner
the worker can report after those frames and the assertion fails. Set
run_inline, as the reveal unit test in tab_context.rs already does.
This commit is contained in:
Richard Buschbeck committed 2026-11-13 11:40:55 +01:00
1 parent 0c15e3de71
commit 7f754fc9fd
1 file changed
+3
+3
View File
@@ -2144,6 +2144,9 @@ fn home_recent_context_menu_reveals_the_target_without_opening_or_removing_it()
let mut h = Harness::builder().with_size(egui::vec2(1400.0, 1600.0)).build_eframe(move |_| {
let mut app = PdfCraftApp::new();
app.set_option("language", "en").unwrap();
// The existence check runs on a worker otherwise, which can lose the race with the
// fixed frame count below on a busy runner.
app.run_inline = true;
for (name, path) in [("first.pdf", ".".to_owned()), ("target.pdf", target)] {
app.recent.push(pdfcraft_ui_egui::RecentFile { name: name.into(), path, pages: 1, size: 0 });
}