mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-22 10:23:16 +01:00
Color Wheel: test that a null view keeps the view
ui_color_wheel_sets_gamut now also runs ui.colorWheel with view set to null and gamut set to false, and checks that the view stays as it was while gamut applies.
This commit is contained in:
1 parent
70885f5466
commit
993ad1cd55
1 file changed
+2
-1
@@ -165,7 +165,8 @@ fn ui_color_wheel_sets_gamut() {
|
||||
app.run("ui.colorWheel", json!({"channel": "red"})).unwrap();
|
||||
let got = app.run("ui.colorWheel", json!({"view": "wheel", "channel": null, "gamut": null})).unwrap();
|
||||
assert_eq!(got, json!({"view": "wheel", "channel": "red", "gamut": true}), "null keeps a value while the other keys apply");
|
||||
assert_eq!(app.run("ui.colorWheel", json!({"gamut": false})).unwrap()["gamut"], json!(false));
|
||||
let got = app.run("ui.colorWheel", json!({"view": null, "gamut": false})).unwrap();
|
||||
assert_eq!(got, json!({"view": "wheel", "channel": "red", "gamut": false}), "a null view keeps the view while gamut applies");
|
||||
for code in ["de", "fr", "ja", "zh-hans"] {
|
||||
let lang = crate::i18n::Lang::from_code(code).expect("registered");
|
||||
let shown = crate::i18n::message(lang, &e);
|
||||
|
||||
Reference in new issue
Block a user