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.
This commit is contained in:
BFlat authored and GitHub committed 2026-11-24 22:05:18 +07:00
1 parent 19ebdcab54
commit bd685fff55
1 file changed
+3 -1
+3 -1
View File
@@ -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}");