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:
Binary file not shown.
Binary file not shown.
@@ -19,6 +19,7 @@ sp.log.addHandler(logging.NullHandler())
|
|||||||
sp.log.propagate = False
|
sp.log.propagate = False
|
||||||
|
|
||||||
CONFIG = sp.load_config(os.path.join(ROOT, "config.json"))
|
CONFIG = sp.load_config(os.path.join(ROOT, "config.json"))
|
||||||
|
CONFIG["tiles"] = [t for t in CONFIG["tiles"] if t.get("kind") != "autofix"] # ALARMS doing both, as these tests expect
|
||||||
# The tests pin their own READY hours (the location sets its own on the settings page).
|
# The tests pin their own READY hours (the location sets its own on the settings page).
|
||||||
CONFIG["ready"]["due"] = [{"days": ["sat"], "start": "12:00", "end": "23:59"}, {"days": ["sun"], "start": "00:00", "end": "13:30"}]
|
CONFIG["ready"]["due"] = [{"days": ["sat"], "start": "12:00", "end": "23:59"}, {"days": ["sun"], "start": "00:00", "end": "13:30"}]
|
||||||
RC = CONFIG["ready"]
|
RC = CONFIG["ready"]
|
||||||
|
|||||||
@@ -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.
|
# 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["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"]]
|
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).
|
# A Sunday 08:00 (inside the service window) and a Wednesday 15:00 (outside it).
|
||||||
SUNDAY = datetime(2026, 10, 11, 8, 0).timestamp()
|
SUNDAY = datetime(2026, 10, 11, 8, 0).timestamp()
|
||||||
CONFIG["auto_fix"]["log_dir"] = tempfile.mkdtemp(prefix="sp-autolog-") # never the real Desktop
|
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):
|
def setUp(self):
|
||||||
self.snap = healthy_snapshot(SUNDAY)
|
self.snap = healthy_snapshot(SUNDAY)
|
||||||
self.cfg = json.loads(json.dumps(CONFIG))
|
self.cfg = json.loads(json.dumps(CONFIG))
|
||||||
arena = next(t for t in self.cfg["tiles"] if t.get("pos") == [3, 7])
|
for t in self.cfg["tiles"]:
|
||||||
arena.pop("pos") # NA's page is full: make room
|
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.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.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",
|
self.cfg["tiles"].append({"id": "lights", "label": "LIGHTS", "kind": "bypass",
|
||||||
|
|||||||
Reference in New Issue
Block a user