Check that the All tools heading aligns with its list on Home

This commit is contained in:
Codex committed 2026-11-30 15:33:16 +01:00
1 parent ffad2d8454
commit 42ab49f7f1
1 file changed
+10
+10
View File
@@ -19,6 +19,16 @@ fn harness(size: egui::Vec2) -> Harness<'static, PdfCraftApp> {
h
}
#[test]
fn the_all_tools_heading_aligns_with_its_list_on_home() {
let h = harness(egui::vec2(1400.0, 900.0));
let panel = h.get_by_role_and_label(Role::TabPanel, "All tools").rect();
let title = h.get_by_role_and_label(Role::Label, "All tools").rect();
let list = h.get_by_role_and_label(Role::List, "All tools").rect();
assert!(title.left() > panel.left(), "the heading touches the panel edge: {title:?}, {panel:?}");
assert!((title.left() - list.left()).abs() <= 1.0, "the heading and list have different insets: {title:?}, {list:?}");
}
#[test]
fn at_the_minimum_width_the_menus_the_modes_and_search_stay_reachable() {
let h = harness(egui::vec2(MIN_WINDOW_SIZE[0], MIN_WINDOW_SIZE[1]));