From 42ab49f7f197d34f508bb43bc877ca38b246effe Mon Sep 17 00:00:00 2001 From: Codex Date: Mon, 30 Nov 2026 15:31:40 +0100 Subject: [PATCH] Check that the All tools heading aligns with its list on Home --- crates/ui-egui/tests/it/min_window.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/ui-egui/tests/it/min_window.rs b/crates/ui-egui/tests/it/min_window.rs index 29c4c7ab6a..25ba8776c7 100644 --- a/crates/ui-egui/tests/it/min_window.rs +++ b/crates/ui-egui/tests/it/min_window.rs @@ -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]));