From 6de0ed119c82c90853bca6b59575e7bfd4c7ad3c Mon Sep 17 00:00:00 2001 From: Guillem Hermida <66697068+guillehr2@users.noreply.github.com> Date: Mon, 9 Nov 2026 03:07:27 +0100 Subject: [PATCH] tests: the Search panel snapshot searches again once both pages are read (#5560) --- crates/ui-egui/tests/it/panel_snapshots.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/ui-egui/tests/it/panel_snapshots.rs b/crates/ui-egui/tests/it/panel_snapshots.rs index 97fba87777..df295a86c2 100644 --- a/crates/ui-egui/tests/it/panel_snapshots.rs +++ b/crates/ui-egui/tests/it/panel_snapshots.rs @@ -204,6 +204,10 @@ fn open(p: RightPanel) -> (Harness<'static, PdfCraftApp>, &'static str) { h.run_steps(2); h.state_mut().views[0].find.as_mut().expect("Advanced Search opens a search").query = "sample".into(); support::wait_until(&mut h, "both pages searched", |app| app.views[0].find.as_ref().is_some_and(|f| f.matches.len() == 2)); + // Each page is searched as its text arrives, and the match made current is the first + // one found: page 2's when its text comes first. Searched again with both pages read, + // as a new query is, the current match is the first from the page in view. + h.state_mut().views[0].rerun_find(); h.run_steps(2); return (h, "search"); }