From bacf16deb4e45d80c07ebbaea98d2c75492bc0aa Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Fri, 20 Nov 2026 14:37:43 -0500 Subject: [PATCH] Target the DPI input in image import test --- crates/ui-egui/tests/it/create.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/tests/it/create.rs b/crates/ui-egui/tests/it/create.rs index 08668cf9e3..fc739bf430 100644 --- a/crates/ui-egui/tests/it/create.rs +++ b/crates/ui-egui/tests/it/create.rs @@ -63,11 +63,11 @@ fn image_import_dialog_chooses_dpi_and_cancels() { h.run_steps(2); h.get_by_label("Use custom DPI").click(); h.run_steps(2); - // The field's group shares its label: the field is the other node. - let field = h.get_all_by_label("DPI").find(|n| n.accesskit_node().role() != Role::Group).expect("the DPI field"); + // The label and group also carry this name; type into the spin button. + let field = h.get_by_role_and_label(Role::SpinButton, "DPI"); field.focus(); h.key_press_modifiers(Modifiers::COMMAND, Key::A); - h.get_all_by_label("DPI").find(|n| n.accesskit_node().role() != Role::Group).expect("the DPI field").type_text("144"); + h.get_by_role_and_label(Role::SpinButton, "DPI").type_text("144"); // Enter in the field is the dialog's default action, Create. h.key_press(Key::Enter); h.run_steps(3);