diff --git a/crates/ui-egui/tests/it/ui_unsaved_prompt.rs b/crates/ui-egui/tests/it/ui_unsaved_prompt.rs index 0088db0d7..47228dbad 100644 --- a/crates/ui-egui/tests/it/ui_unsaved_prompt.rs +++ b/crates/ui-egui/tests/it/ui_unsaved_prompt.rs @@ -24,7 +24,8 @@ fn closing_a_modified_project_asks_with_the_shared_buttons_in_the_platform_order let button = |h: &Harness<'_, EffectcraftApp>, name: &str| h.query_all_by_role_and_label(Role::Button, name).last().map(|n| n.rect().min.x); let x = |h: &Harness<'_, EffectcraftApp>, name: &str| button(h, name).unwrap_or_else(|| panic!("{name:?} is a button")); let (save, dont_save, cancel) = (x(&h, "Save"), x(&h, "Don't Save"), x(&h, "Cancel")); - if cfg!(windows) { + // The footer orders by the OS the craft shell runs on, which need not be the machine running the test. + if craft_ui::runtime::windows::os_of(&h.ctx) == craft_host::target::Os::Windows { assert!(save < dont_save && dont_save < cancel, "Save, Don't Save, Cancel"); } else { assert!(dont_save < cancel && cancel < save, "Don't Save, Cancel, Save");