Tests follow NA's AUTO-FIX key and moved ARENA; stored NA pages refreshed from NA

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-21 13:49:06 -04:00
co-authored by Claude Opus 5.5
parent 5007d3d85e
commit cc9d752287
4 changed files with 7 additions and 2 deletions
+6 -2
View File
@@ -27,6 +27,9 @@ CONFIG = sp.load_config(os.path.join(ROOT, "config.json"))
# The tests pin their own schedule so they do not depend on the site's choice.
CONFIG["service_windows"] = [{"days": ["sun"], "start": "07:00", "end": "12:30"}]
CONFIG["tiles"] = [dict(t, label="SERVICE") if t["id"] == "service" else t for t in CONFIG["tiles"]]
# NA has an AUTO-FIX key since 2026-10-21; most tests here cover ALARMS doing both (a page without one),
# TestSwitches puts it back.
CONFIG["tiles"] = [t for t in CONFIG["tiles"] if t.get("kind") != "autofix"]
# A Sunday 08:00 (inside the service window) and a Wednesday 15:00 (outside it).
SUNDAY = datetime(2026, 10, 11, 8, 0).timestamp()
CONFIG["auto_fix"]["log_dir"] = tempfile.mkdtemp(prefix="sp-autolog-") # never the real Desktop
@@ -2460,8 +2463,9 @@ class TestSwitches(unittest.TestCase):
def setUp(self):
self.snap = healthy_snapshot(SUNDAY)
self.cfg = json.loads(json.dumps(CONFIG))
arena = next(t for t in self.cfg["tiles"] if t.get("pos") == [3, 7])
arena.pop("pos") # NA's page is full: make room
for t in self.cfg["tiles"]:
if t.get("pos") == [3, 7]:
t.pop("pos") # NA's spot for it (ARENA moved off)
self.cfg["tiles"].append({"id": "autofix", "label": "AUTO-FIX", "kind": "autofix", "pos": [3, 7]})
self.midi = next(c for t in self.cfg["tiles"] for c in t.get("checks", []) if c["type"] == "midi_peer")
self.cfg["tiles"].append({"id": "lights", "label": "LIGHTS", "kind": "bypass",