mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-12-05 05:23:36 -05:00
Check that the All tools heading aligns with its list on Home
This commit is contained in:
1 parent
ffad2d8454
commit
42ab49f7f1
1 file changed
+10
@@ -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]));
|
||||
|
||||
Reference in new issue
Block a user