From 2e142583b3d83f5ba9a4ecad0de34af16edc6d2b Mon Sep 17 00:00:00 2001 From: skylar taylor-barrick Date: Thu, 22 Oct 2026 13:11:34 -0600 Subject: [PATCH] #2278: test that the Properties flip buttons keep the reference app's names The Properties panel's flip buttons had been renamed Flip Horizontal and Flip Vertical, which are the Transform panel menu's names. The test lays out the Transform section for a selected rectangle and reads the screen-reader names of its buttons: Flip Along Horizontal Axis and Flip Along Vertical Axis must be there and the old names must not. With the old labels the first is missing. --- crates/ui-egui/src/panels/properties.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/crates/ui-egui/src/panels/properties.rs b/crates/ui-egui/src/panels/properties.rs index 42403f222..33cc41439 100644 --- a/crates/ui-egui/src/panels/properties.rs +++ b/crates/ui-egui/src/panels/properties.rs @@ -802,6 +802,25 @@ mod tests { assert_eq!(selected(&app), std::slice::from_ref(&mask), "Edit Clipping Path selects the clipping path"); } + // Regression test for #1910: the Properties panel's flip buttons are named as the reference + // app's Properties panel names them, not Flip Horizontal and Flip Vertical (the Transform + // panel menu's names). + #[test] + fn the_flip_buttons_keep_the_reference_properties_names() { + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.run("file.new", json!({"width": 300, "height": 300})).unwrap(); + let id = app.run("shape.rectangle", json!({"x": 50, "y": 50, "width": 120, "height": 80})).unwrap()["id"].clone(); + app.run("select.set", json!({"ids": [id]})).unwrap(); + let tree = crate::widgets::accessibility_tests::tree(|ui| transform_section(&mut app, ui)); + let names: Vec<&str> = tree.iter().filter_map(|n| n.label()).collect(); + for want in ["Flip Along Horizontal Axis", "Flip Along Vertical Axis"] { + assert!(names.contains(&want), "{want} in {names:?}"); + } + for old in ["Flip Horizontal", "Flip Vertical"] { + assert!(!names.contains(&old), "{old} in {names:?}"); + } + } + /// #3451: the Properties panel Transform section shows ellipse pie angles and Invert Pie. #[test] fn transform_section_shows_ellipse_pie_properties() {