From 993ad1cd55d1df398465efa7a373bdce76baa499 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 18 Nov 2026 01:26:22 -0800 Subject: [PATCH] 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. --- crates/ui-egui/src/panels/tests_color_wheel_gamut.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/panels/tests_color_wheel_gamut.rs b/crates/ui-egui/src/panels/tests_color_wheel_gamut.rs index b124ab492b..47a68fad76 100644 --- a/crates/ui-egui/src/panels/tests_color_wheel_gamut.rs +++ b/crates/ui-egui/src/panels/tests_color_wheel_gamut.rs @@ -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);