From 99e58473b20f9fe51a031633bcbe43eba25bb711 Mon Sep 17 00:00:00 2001 From: Nathaniel Ledford Date: Mon, 12 Oct 2026 12:16:15 -0400 Subject: [PATCH] LR-PREF-GENERAL: the long-path test scrolls to the watched folder before reading it The row is at the foot of Import. With more sections above it (another pull request adds one) it is below the fold of the 640 pt page, and a row that is not drawn has no text to read: the test failed for the page's length, not for the path. Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/tests_dialog_settings.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/ui-egui/src/tests_dialog_settings.rs b/crates/ui-egui/src/tests_dialog_settings.rs index b30770c1b1..ed1ee4e93f 100644 --- a/crates/ui-egui/src/tests_dialog_settings.rs +++ b/crates/ui-egui/src/tests_dialog_settings.rs @@ -190,7 +190,16 @@ fn a_long_library_folder_is_cut_short_and_its_tooltip_has_all_of_it() { let watched = h.app.run("library.autoImport", json!({"folder": path})); assert!(watched.is_ok(), "{watched:?}"); show(&mut h, "import"); + // (the row is at the foot of the page: scrolled to, so that it is drawn however long the page is) + let window = rect(&h, "dialog:window"); + h.request("ui.move", json!({"x": window.center().x, "y": window.center().y}), T); + for _ in 0..6 { + h.request("ui.scroll", json!({"dy": -400.0}), T); + h.step(); + } + h.settle(T); let (folder, room) = (rect(&h, "text:settingsAutoFolder"), rect(&h, "settings:pageRoom")); + assert!(room.intersects(folder), "the watched folder {folder:?} is in view in {room:?}"); assert!(folder.height() < 24.0 && folder.right() <= room.right(), "the watched folder {folder:?} is one line inside {room:?}"); assert!(h.painted_text().iter().any(|text| text.starts_with('…') && text.ends_with(name)), "and keeps its end"); drop(h);