From bd685fff553af0f976e98ad710acf173aae1e637 Mon Sep 17 00:00:00 2001 From: BFlat Date: Tue, 24 Nov 2026 22:05:18 +0700 Subject: [PATCH] Preferences test: check the title bar note's wording, not the variable name (#9226) The row's help joins its notes with the setting's own sentence, which names VECTORCRAFT_TITLEBAR too, so on Linux the check held with the variable unset. --- crates/ui-egui/src/prefs_dialog/tests.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/prefs_dialog/tests.rs b/crates/ui-egui/src/prefs_dialog/tests.rs index 8d2e22729f..393561679d 100644 --- a/crates/ui-egui/src/prefs_dialog/tests.rs +++ b/crates/ui-egui/src/prefs_dialog/tests.rs @@ -320,7 +320,9 @@ fn dimmed_rows_follow_the_settings_they_depend_on() { if let Some((enabled, help)) = row_state(&mut a, "appTitleBar") { let label = format!("variable {from_env}, system {system}"); assert_eq!(enabled, !from_env && !system, "app title bar: {label}"); - assert_eq!(help.is_some_and(|h| h.contains("VECTORCRAFT_TITLEBAR")), from_env, "app title bar note: {label}"); + // The note, not the setting's sentence, which names the variable too. + let note = help.is_some_and(|h| h.contains("VECTORCRAFT_TITLEBAR environment variable")); + assert_eq!(note, from_env, "app title bar note: {label}"); } if let Some((enabled, _)) = row_state(&mut a, "systemTitleBar") { assert_eq!(enabled, !from_env, "system title bar: variable {from_env}");