diff --git a/crates/ui-egui/tests/it/actions.rs b/crates/ui-egui/tests/it/actions.rs index 1567cb72cf..ab78ea6df3 100644 --- a/crates/ui-egui/tests/it/actions.rs +++ b/crates/ui-egui/tests/it/actions.rs @@ -72,7 +72,8 @@ fn run_and_create_actions() { arg.focus(); arg.type_text("DRAFT"); h.run_steps(2); - h.get_by_label("Save").click(); + // Exiting overlays remain in the accessibility tree while hidden during their fade. + h.get_by(|node| node.role() == Role::Button && !node.is_hidden() && node.label().as_deref() == Some("Save")).click(); h.run_steps(3); assert_eq!(h.state().custom_actions.len(), 1); h.get_by_label("1. Add watermark: DRAFT"); diff --git a/crates/ui-egui/tests/it/dialog_chrome.rs b/crates/ui-egui/tests/it/dialog_chrome.rs index 9c0f87d897..8ba36cecde 100644 --- a/crates/ui-egui/tests/it/dialog_chrome.rs +++ b/crates/ui-egui/tests/it/dialog_chrome.rs @@ -58,7 +58,7 @@ fn space_audit_tab_measures_the_file() { crate::support::wait_until(&mut h, "the space audit", |app| !audit(app).is_empty()); h.run_steps(2); let card = dialog_rect(&h); - let total = h.get_by_label("Total").rect(); + let total = h.get_by_role_and_label(egui::accesskit::Role::ListItem, "Total").rect(); assert!(card.contains_rect(total), "the Total row {total:?} lies in the dialog {card:?}"); }