#!/bin/bash source "$(dirname "$0")/base-test.sh" run_node_test <<'JS' const fs = require('fs') const backgroundQml = fs.readFileSync(path.join(root, 'shell/plugins/background/Background.qml'), 'utf8') assert( /function openThemeSwitcher\(\) \{[\s\S]*if \(!root\.shell \|\| !root\.shell\.summon\("omarchy\.image-picker", payload\)\)\s*Util\.execArgv\(\["omarchy-shell", "shell", "summon", "omarchy\.image-picker", payload\]\)/.test(backgroundQml) && !backgroundQml.includes('omarchy-theme-switcher'), 'background opens the in-shell theme picker instead of spawning the switcher script' ) assert( backgroundQml.includes('pendingThemeFallbackTimer.restart()') && backgroundQml.includes('pendingThemeFallbackTimer.stop()') && backgroundQml.includes('id: pendingThemeFallbackTimer') && !backgroundQml.includes('pendingThemeVersion !== backgroundVersion'), 'background theme transition applies pending colors even if image reveal stalls' ) JS