mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-26 07:23:05 +00:00
Target visible controls in dialog tests
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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:?}");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user