Files
OneCAD/crates/ui-egui/tests/scenarios/s43_quit_asks_to_save.json
T
lucas-aguilar89 d1a773a684 Save changes prompt: arrow keys pick the button, Enter gives it (#683)
In the save-changes prompt, Left and Right pick a button and Enter gives it.
2026-10-13 09:27:46 -04:00

27 lines
1.2 KiB
JSON

[
{"note": "Issue #33: quitting with unsaved changes asks \"Save changes to <name>?\"; Cancel stays open."},
{"call": "engine.execute", "params": {"command": "solid.box", "params": {"length": 20, "width": 10, "height": 5}}},
{"call": "ui.window", "params": {"action": "close"}},
{"expect": {"shown": "Don't Save", "quitting": true, "quit_requested": false}},
{"widget": "Cancel"},
{"expect": {"not_shown": "Don't Save", "quitting": false, "quit_requested": false, "bodies": 1}},
{"note": "The File menu's Quit asks the same; Esc answers Cancel."},
{"call": "app.quit"},
{"expect": {"shown": "Don't Save", "quit_requested": false}},
{"key": "Escape"},
{"expect": {"not_shown": "Don't Save", "quitting": false, "quit_requested": false}},
{"note": "Left and Right pick a button (Save first, stopping at the ends) and Enter gives it."},
{"call": "app.quit"},
{"key": "ArrowRight"},
{"key": "ArrowRight"},
{"key": "ArrowRight"},
{"key": "Enter"},
{"expect": {"not_shown": "Don't Save", "quitting": false, "quit_requested": false, "bodies": 1}},
{"call": "app.quit"},
{"key": "ArrowRight"},
{"key": "ArrowRight"},
{"key": "ArrowLeft"},
{"key": "Enter"},
{"expect": {"quit_requested": true}}
]