fix(scenes): restore cinema seat controls and ordered romantic lighting

This commit is contained in:
Miayui
2026-09-22 13:01:46 +08:00
parent 4d99702acd
commit 6b9ee0f349
24 changed files with 908 additions and 83 deletions
+39
View File
@@ -103,6 +103,45 @@ def node_runtime() -> str:
raise AssertionError("Node.js is required to execute the mode gallery grouping contract")
def test_saved_mode_status_distinguishes_partial_submission_and_completion() -> None:
app = (WEB / "app.js").read_text(encoding="utf-8")
start = app.index("function savedModeExecutionView(")
end = app.index("\nasync function executeSavedModeProfile", start)
cases = [
{"status": "partially_succeeded", "execution_mode": "hardware"},
{"status": "partially_succeeded", "execution_mode": "hardware",
"execution_outcome": "submitted_unverified"},
{"status": "succeeded", "execution_mode": "hardware",
"execution_outcome": "submitted_unverified"},
{"status": "succeeded", "execution_mode": "hardware"},
{"status": "succeeded", "execution_mode": "dry_run",
"execution_outcome": "submitted_unverified"},
{"status": "partially_succeeded", "execution_mode": "dry_run"},
{"status": "failed", "execution_mode": "hardware"},
]
script = (
"function modeScheduleExecutionView() { return null; }\n"
"function executionVerificationStatus(result) { return result.execution_outcome; }\n"
+ app[start:end]
+ "\nconsole.log(JSON.stringify("
+ json.dumps(cases)
+ '.map(result => savedModeExecutionView({name: "影院模式"}, result))));'
)
completed = subprocess.run(
[node_runtime(), "-e", script], check=True, capture_output=True,
text=True, encoding="utf-8",
)
result = json.loads(completed.stdout)
assert [item["state"] for item in result] == [
"partial", "partial", "submitted", "succeeded", "succeeded", "partial", "failed",
]
assert [item["title"] for item in result] == [
"影院模式部分完成", "影院模式部分指令已提交,待车端确认",
"影院模式指令已提交,待车端确认", "影院模式执行完成",
"影院模式模拟校验完成", "影院模式模拟校验部分通过", "影院模式执行未完成",
]
def test_mode_gallery_classifies_profiles_into_exclusive_custom_static_dynamic_groups() -> None:
app = (WEB / "app.js").read_text(encoding="utf-8")
start = app.index("const MODE_GALLERY_GROUPS")