PdfCraft: An open-source PDF reader and editor written by scratch in pure Rust
Merge branch 'main' into main
Combiler9380f0dda9ce
diff --cc crates/ui-egui/tests/it/control.rsindex 19e852af8,ec29ecc97..d921b31d6--- a/crates/ui-egui/tests/it/control.rs+++ b/crates/ui-egui/tests/it/control.rs@@@ -1673,18 -1675,13 +1675,14 @@@ fn control_open_replies_pending_while_t// The worker completes the open on later frames; the tab shows, and only then does a// repeated open focus it instead of reporting another pending open.+ // Background preparation can take fractions of a second on loaded CI runners (e.g. FreeBSD VM).let mut documents = 0;- for _ in 0..300 {- h.run_steps(1);- let state = ok(&mut h, &c, "ui.state", json!({}));+ let opened = crate::support::step_until(&mut h, |h| {+ let state = ok(h, &c, "ui.state", json!({}));documents = state["documents"].as_array().map(|d| d.len()).unwrap_or_default();- if documents == 1 {- break;- }- std::thread::sleep(std::time::Duration::from_millis(5));- }- assert_eq!(documents, 1, "the pending open completed into a tab");+ documents == 1+ });+ assert!(opened, "the pending open completed into a tab: {documents} tabs");let again = ok(&mut h, &c, "ui.open", json!({ "path": a }));assert_eq!(again["focused"], true, "{again}");