Motion analysis review round 3: ui.start reads a study as motion.study does, keys off the timeline refused, pairs counted once, sub-assembly copies documented
This commit is contained in:
1 parent
3128762014
commit
c34e607f5b
4 files changed
+26
-23
No files matched your search
@@ -461,9 +461,12 @@ mod tests {
|
||||
.run("motion.study", json!({"name": "Push", "steps": 15, "keys": [{"joint": "Rail", "points": [[0, 10], [15, -5]]}]}))
|
||||
.unwrap()["study"]
|
||||
.to_string();
|
||||
// A study keyed between whole steps is not opened (the dialog would round its keys).
|
||||
// A study keyed between whole steps or off its timeline is not opened (the dialog would move its keys).
|
||||
h.app.run("motion.study", json!({"name": "Fine", "steps": 15, "keys": [{"joint": "Rail", "points": [[0, 10], [7.5, -5]]}]})).unwrap();
|
||||
for bad in [json!({"study": "Nope"}), json!({"study": "Push", "step": 3}), json!({"study": [1]}), json!({"study": "Fine"})] {
|
||||
h.app.run("motion.study", json!({"name": "Off", "steps": 15, "keys": [{"joint": "Rail", "points": [[-1, 10], [15, -5]]}]})).unwrap();
|
||||
for bad in
|
||||
[json!({"study": "Nope"}), json!({"study": "Push", "step": 3}), json!({"study": [1]}), json!({"study": "Fine"}), json!({"study": "Off"})]
|
||||
{
|
||||
let r = h.call("ui.start", json!({"command": "motion.study", "params": bad}));
|
||||
assert!(r["ok"] == false && h.app.dialog.is_none(), "{bad}: {r}");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user