| | |
| | | raise SystemExit("legacy dark preference migration is missing") |
| | | if "var usesVisualEffectBackdrop: Bool" not in theme_source: |
| | | raise SystemExit("theme visual-effect backdrop policy is missing") |
| | | if "static let settingsDisplayOrder: [AppGridTheme]" not in theme_source: |
| | | raise SystemExit("settings theme display order is missing") |
| | | if "var supportsColorTuning: Bool" not in theme_source: |
| | | raise SystemExit("colorful theme tuning policy is missing") |
| | | if "func backgroundBaseColors(tuning: Double?)" not in theme_source or "func backgroundAccentColors(tuning: Double?)" not in theme_source: |
| | | raise SystemExit("tunable AppGrid background color functions are missing") |
| | | if "AppGridTheme.settingsDisplayOrder" not in preferences_source: |
| | | raise SystemExit("Preferences theme grid does not use the curated theme order") |
| | | if "themeColorTuningSection" not in preferences_source or "Slider(value: themeTuningBinding" not in preferences_source: |
| | | raise SystemExit("Preferences theme tuning slider is missing") |
| | | if 'Text(tr("settings.theme"))\n .font(.headline)' in preferences_source: |
| | | raise SystemExit("Theme content area must not repeat the Theme heading") |
| | | if 'Text(tr("settings.themeScopeDesc"))' in preferences_source: |
| | | raise SystemExit("Theme scope copy must be merged into the tuning description, not rendered as a standalone bottom line") |
| | | if not re.search(r"case\s+\.colorful:\s*return\s+0\b", theme_source): |
| | | raise SystemExit("Light Colorful default tuning must start at the far left of the slider") |
| | | if "AppGridTheme.deepBlueTuningStorageKey" not in defaults_source or "AppGridTheme.colorfulTuningStorageKey" not in defaults_source: |
| | | raise SystemExit("theme tuning defaults are missing") |
| | | if "static let iconSize: Double = 56" not in defaults_source: |
| | | raise SystemExit("new-install default icon size must be 56") |
| | | if 'static let displayMode = "gridContainer"' not in defaults_source: |
| | | raise SystemExit("new-install default display mode must remain a free mode") |
| | | if "var isPureBlackBackground: Bool" not in theme_source or "self == .black" not in theme_source: |
| | | raise SystemExit("pure black background policy is missing") |
| | | if "case .deepBlue, .black:" not in theme_source or "return true" not in theme_source: |
| | |
| | | raise SystemExit("edit mode must temporarily render with the default light AppGrid theme") |
| | | if "let theme = renderedAppGridTheme" not in content_source: |
| | | raise SystemExit("AppGrid background does not use the runtime rendered theme") |
| | | if "let tuning = renderedAppGridThemeTuning" not in content_source: |
| | | raise SystemExit("AppGrid background does not use runtime theme tuning") |
| | | if "AppGridCollectionView(" in content_source and "appGridTheme: renderedAppGridTheme" not in content_source: |
| | | raise SystemExit("AppGridCollectionView is not passed the runtime rendered theme") |
| | | if "EditAppsHeaderView(" in content_source and "theme: renderedAppGridTheme" not in content_source: |
| | |
| | | "settings.theme", |
| | | "settings.themeDesc", |
| | | "settings.themeScopeDesc", |
| | | "theme.tuning.dark", |
| | | "theme.tuning.light", |
| | | "theme.tuning.desc", |
| | | "theme.default", |
| | | "theme.deepBlue", |
| | | "theme.black", |
| | |
| | | ] |
| | | if raw_values: |
| | | raise SystemExit(f"{path.name} has raw key values: {raw_values}") |
| | | if data["settings.themeScopeDesc"].strip() not in data["theme.tuning.desc"]: |
| | | raise SystemExit(f"{path.name} theme tuning description must include the theme scope copy") |
| | | |
| | | print("PASS theme settings QA: 8 themes, Theme tab, migration, AppGrid-only rendering, glass policy, edit-mode default-theme override, and 29-language keys are present") |
| | | PY |