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.
This commit is contained in:
dotCooCoo committed 2026-12-02 18:42:46 -08:00
1 parent 3ada75ba6b
commit e438b270aa
1 file changed
+1 -1
+1 -1
View File
@@ -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}`");