mirror of
https://github.com/storytold/lightcraft.git
synced 2026-11-03 06:59:53 -06:00
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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
35cdbb1ca8
commit
99e58473b2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user