mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
#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.
This commit is contained in:
committed by
bflatastic
parent
8abb1d1c71
commit
2e142583b3
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user