mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-03 06:31:42 +01:00
test(ui-egui): the dialog's refused-name guard covers the centred key too
#12090's centred route captures a "centred" key next to the anchor point in the Paragraph Text Size dialog's state, so the guard that refuses names the dialog does not show as fields now covers it too: a control set_json_field for "centred" is refused like the anchor, the document and the settings snapshot. This widens the guard's coverage, it does not flip a failing test. One guard comment in the #12090 test module is reworded into plain English.
This commit is contained in:
1 parent
5fd06cbe1e
commit
7741e781d7
2 files changed
+2
-2
No files matched your search
@@ -321,7 +321,7 @@ fn a_name_the_dialog_does_not_show_as_a_field_is_refused() {
|
||||
drag(&mut app, [10.0, 10.0], [109.5, 60.0], Modifiers::ALT, Modifiers::ALT);
|
||||
let (id, _) = only_dialog(&app);
|
||||
let ctx = app.ctx().clone();
|
||||
for field in ["at", "document", "settings", "box", "text"] {
|
||||
for field in ["at", "document", "settings", "centred", "box", "text"] {
|
||||
assert!(app.framework.dialogs.set_json_field(&ctx, id, field, json!(1.0)).is_err(), "`{field}` is not a field of this dialog");
|
||||
}
|
||||
assert_eq!(only_dialog(&app).1["width"].as_f64(), Some(99.5), "and the two real fields keep the dragged size");
|
||||
|
||||
@@ -216,7 +216,7 @@ fn an_alt_click_without_a_drag_still_starts_a_point_mask() {
|
||||
assert_eq!([t.transform.m[4], t.transform.m[5]], [50.0, 100.0]);
|
||||
}
|
||||
|
||||
/// Guard (pattern 4, scope): the ticket measured the Vertical Type Mask tool, so the Horizontal
|
||||
/// Guard: pins that the ticket measured the Vertical Type Mask tool only, so the Horizontal
|
||||
/// Type Mask tool keeps today's gesture — an Alt+drag there commits the plain box at once.
|
||||
#[test]
|
||||
fn an_alt_drag_with_the_horizontal_type_mask_tool_still_makes_the_box_directly() {
|
||||
|
||||
Reference in new issue
Block a user