diff --git a/crates/ui-egui/tests/it/min_window.rs b/crates/ui-egui/tests/it/min_window.rs index f384eef0eb..263937df32 100644 --- a/crates/ui-egui/tests/it/min_window.rs +++ b/crates/ui-egui/tests/it/min_window.rs @@ -26,7 +26,12 @@ fn at_the_minimum_width_the_modes_fold_into_a_menu_and_search_stays() { h.get_by_role_and_label(Role::Button, "E-Sign").click(); h.run_steps(4); assert!(h.query_by_role_and_label(Role::Button, "E-Sign").is_some(), "the menu button is named after the mode"); - assert!(h.query_by_role_and_label(Role::MenuItem, "File").is_some(), "main menu reachable"); + // The menu bar folds the titles that don't fit into "⋯", or all of them into one "Menu" when not + // even the first fits (craft-menu's `MenuBarUi`). macOS's system font is wider, and at this width + // the bar is the "Menu" button there; a real macOS window has the native menu bar instead. + let menus = |label| h.query_by_role_and_label(Role::MenuItem, label).is_some(); + let folded = cfg!(target_os = "macos") && menus("Menu"); + assert!(menus("File") || folded, "main menu reachable"); } #[test]