NA: READY page on 21, archives on 30-31, location pages back on 98/99
- Apply's import message names the READY page by its own number Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -1198,8 +1198,8 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"page": 24,
|
"page": 21,
|
||||||
"page_name": "24\\nReady"
|
"page_name": "21\\nReady"
|
||||||
},
|
},
|
||||||
"restart_page": {
|
"restart_page": {
|
||||||
"back_pos": [
|
"back_pos": [
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
+2
-1
@@ -455,7 +455,8 @@ class Applier:
|
|||||||
if want != have:
|
if want != have:
|
||||||
return False, "page %d: the import did not land as built (%d keys built, %d on the page)" % (page, len(want), len(have))
|
return False, "page %d: the import did not land as built (%d keys built, %d on the page)" % (page, len(want), len(have))
|
||||||
done.append(name)
|
done.append(name)
|
||||||
return True, ", ".join("page %d" % (cfg["page"] if n == "status" else cfg["restart_page"]["page"]) for n in done) or "nothing to import"
|
number = {"status": cfg["page"], "restart": (cfg.get("restart_page") or {}).get("page"), "ready": (cfg.get("ready_page") or {}).get("page")}
|
||||||
|
return True, ", ".join("page %s" % number.get(n) for n in done) or "nothing to import"
|
||||||
|
|
||||||
def colour_nav_keys(self, cfg):
|
def colour_nav_keys(self, cfg):
|
||||||
comp = cfg["companion"]
|
comp = cfg["companion"]
|
||||||
|
|||||||
Binary file not shown.
@@ -467,12 +467,12 @@ class TestPages(unittest.TestCase):
|
|||||||
|
|
||||||
def test_status_page_ready_key_opens_the_page(self):
|
def test_status_page_ready_key_opens_the_page(self):
|
||||||
acts = self.actions(make_page.build(CONFIG), 2, 7)
|
acts = self.actions(make_page.build(CONFIG), 2, 7)
|
||||||
self.assertEqual(acts["up"], [("set_page", {"surfaceId": "self", "page": 24})])
|
self.assertEqual(acts["up"], [("set_page", {"surfaceId": "self", "page": 21})])
|
||||||
self.assertEqual(acts["2000"][0][1]["value"], "$(custom:sp_cmd);restart ready $(internal:time_unix)")
|
self.assertEqual(acts["2000"][0][1]["value"], "$(custom:sp_cmd);restart ready $(internal:time_unix)")
|
||||||
|
|
||||||
def test_ready_page(self):
|
def test_ready_page(self):
|
||||||
export = make_page.build_ready(CONFIG)
|
export = make_page.build_ready(CONFIG)
|
||||||
self.assertEqual(export["page"]["name"], "24\\nReady")
|
self.assertEqual(export["page"]["name"], "21\\nReady")
|
||||||
self.assertEqual(self.actions(export, 0, 3)["up"][0][1]["value"], "$(custom:sp_cmd);done rd_boh")
|
self.assertEqual(self.actions(export, 0, 3)["up"][0][1]["value"], "$(custom:sp_cmd);done rd_boh")
|
||||||
self.assertNotIn("2000", self.actions(export, 0, 3)) # a tap key has no hold
|
self.assertNotIn("2000", self.actions(export, 0, 3)) # a tap key has no hold
|
||||||
self.assertEqual(self.actions(export, 2, 1)["up"][0][1]["value"], "$(custom:sp_cmd);ack rd_lineup")
|
self.assertEqual(self.actions(export, 2, 1)["up"][0][1]["value"], "$(custom:sp_cmd);ack rd_lineup")
|
||||||
|
|||||||
Reference in New Issue
Block a user