This commit is contained in:
2026-08-19 15:08:39 +03:00
parent 478557f3ad
commit a03c54dbe8
5148 changed files with 31553313 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
JS = (ROOT / "ui_builder" / "static" / "app.js").read_text(encoding="utf-8")
APP = (ROOT / "app.py").read_text(encoding="utf-8")
def test_build_version_bumped():
assert 'BUILD_VERSION = "2026.08.19.21"' in APP
def test_overlay_parser_accepts_legacy_function_strings():
assert 'replace(/\\s+/g, "")' in JS
assert 'normalized.match(/(?:^|[^a-z0-9])OverlayInput([1-4])' in JS
def test_sequence_onair_has_post_ack_reconcile_fallback():
assert 'function reconcileShortcutSequenceOnAir' in JS
assert 'shortcutSequenceOverlayIntent(sequence)' in JS
assert 'reconcileShortcutSequenceOnAir(sequence, { wasOnAir });' in JS
def test_normal_overlay_in_latches_sequence_on_air():
start = JS.index('function reconcileShortcutSequenceOnAir')
snippet = JS[start:start + 2600]
assert 'if (intent.action === "In") active = true;' in snippet
assert 'else if (intent.action === "Out" || intent.action === "Off") active = false;' in snippet
assert 'else if (intent.action === "toggle") active = !active;' in snippet
def test_ack_confirmed_owner_remains_primary_signal():
start = JS.index('function reconcileShortcutSequenceOnAir')
snippet = JS[start:start + 1400]
assert 'if (sequenceStillOwnsRuntimeOverlay(id))' in snippet
assert 'state.quickPanelOnAirSequences.add(id);' in snippet