mirror of
https://github.com/storytold/designcraft.git
synced 2026-10-25 18:56:50 -06:00
Integration: #643's test (an empty Effects field path sets nothing)
This commit is contained in:
@@ -657,6 +657,16 @@ mod tests {
|
||||
texts
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn set_makes_the_path_and_ignores_an_empty_one() {
|
||||
let mut d = Dialog::new(ID, json!({"fx": {}}));
|
||||
set(&mut d, &["featherOptions", "choke"], json!(20));
|
||||
assert_eq!(d.fields["fx"]["featherOptions"]["choke"], json!(20));
|
||||
let before = d.fields.clone();
|
||||
set(&mut d, &[], json!(1));
|
||||
assert_eq!(d.fields, before, "an empty path changes nothing (and doesn't panic)");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_effects_dialog_opens_on_the_chosen_effect_previews_and_applies_once() {
|
||||
let (mut app, id) = app_with_frame();
|
||||
|
||||
Reference in New Issue
Block a user