From e438b270aa693c3a575416400e2a02ed4a0787c7 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 2 Dec 2026 18:42:46 -0800 Subject: [PATCH] Tests: require ui.inspect to list the dialog key as null The print params-text check indexed `entry["key"]`, which also returns null when `ui.inspect` leaves `key` out. It now requires the member to be present with a null value. --- crates/ui-egui/src/dialogs/tests_print.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ui-egui/src/dialogs/tests_print.rs b/crates/ui-egui/src/dialogs/tests_print.rs index db3e8cb0bb..f5fa7ba7bd 100644 --- a/crates/ui-egui/src/dialogs/tests_print.rs +++ b/crates/ui-egui/src/dialogs/tests_print.rs @@ -1583,7 +1583,7 @@ fn assert_params_text_matches_ui_inspect(command: &str, fields: &[&str]) { pump(&mut app); let ui = crate::control::inspect(&app, &ctx(&app)); let entry = ui["dialogs"].as_array().and_then(|d| d.last()).cloned().expect("a dialog"); - assert!(entry["key"].is_null(), "{command}: {entry}"); + assert_eq!(entry.get("key"), Some(&Value::Null), "{command}: {entry}"); assert!(doc.contains("with key null"), "{command} opens a dialog with key null, which its params text does not say"); for field in fields { assert!(entry["fields"].get(field).is_some(), "{command}: ui.inspect does not list `{field}`");