From cc43e842a13dcb29162d02a99655637f3333f1f1 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Sat, 21 Nov 2026 18:37:04 -0500 Subject: [PATCH] Keep thumbnail drag test targets visible --- crates/ui-egui/tests/it/editing.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/tests/it/editing.rs b/crates/ui-egui/tests/it/editing.rs index ac3d959e81..c9fd1b3874 100644 --- a/crates/ui-egui/tests/it/editing.rs +++ b/crates/ui-egui/tests/it/editing.rs @@ -6281,13 +6281,13 @@ fn print_shortcut_offers_the_pages_picked_in_the_pages_panel() { #[test] fn dragging_pages_panel_thumbnails_reorders_pages() { - let mut h = harness(4, |app| app.set_option(&egui::Context::default(), "panel", "pages").unwrap()); + let mut h = pages_panel(4); let before = page_texts(h.state()); // The Pages panel is on the right; the document view may label its pages too. let thumb = |h: &Harness<'static, PdfCraftApp>, label: &str| { h.get_all_by_label(label).map(|n| n.rect()).max_by(|a, b| a.left().total_cmp(&b.left())).expect("the thumbnail") }; - // Grab page 3 (page 4 is below the window) and drop it before page 1. + // Grab page 3 and drop it before page 1. let (from, to) = (thumb(&h, "Page 3").center(), thumb(&h, "Page 1").left_top() + egui::vec2(4.0, 4.0)); drag(&mut h, from, to); h.run_steps(4); @@ -6322,7 +6322,7 @@ fn resized_pages_panel_thumbnails_reorder_multiple_pages_and_undo() { #[test] fn a_thumbnail_drag_that_ends_off_the_panel_or_outlives_the_pages_is_dropped() { - let mut h = harness(4, |app| app.set_option(&egui::Context::default(), "panel", "pages").unwrap()); + let mut h = pages_panel(4); h.run_steps(2); let before = page_texts(h.state()); // Presses a thumbnail and drags it halfway towards the first one, leaving the button down.