推进 INI 面板快照 metadata 日志
This commit is contained in:
@@ -428,6 +428,13 @@ TOOL_TABLE = browser-tool.tbl
|
||||
"linuxcnc/gcode/ui-session.ngc",
|
||||
"UI snapshot G-code OPFS path",
|
||||
);
|
||||
const savedSnapshotLog = uiDocument.getElementById("log").textContent;
|
||||
if (
|
||||
!savedSnapshotLog.includes("Workflow: save-session-snapshot") ||
|
||||
!savedSnapshotLog.includes("Default G-code: linuxcnc/gcode/ui-session.ngc")
|
||||
) {
|
||||
throw new Error(`UI saved snapshot log missing metadata summary: ${savedSnapshotLog}`);
|
||||
}
|
||||
const savedUiSnapshot = await loadMachineSessionSnapshot(
|
||||
"ui-machine-session",
|
||||
"xyzab-tdr",
|
||||
@@ -460,6 +467,13 @@ TOOL_TABLE = browser-tool.tbl
|
||||
"ui-machine-session/ui-machine-session.json",
|
||||
"UI restored session snapshot path",
|
||||
);
|
||||
const restoredSnapshotLog = uiDocument.getElementById("log").textContent;
|
||||
if (
|
||||
!restoredSnapshotLog.includes("Workflow: save-session-snapshot") ||
|
||||
!restoredSnapshotLog.includes("Default G-code: linuxcnc/gcode/ui-session.ngc")
|
||||
) {
|
||||
throw new Error(`UI restored snapshot log missing metadata summary: ${restoredSnapshotLog}`);
|
||||
}
|
||||
if (!uiDocument.getElementById("ini-editor").value.includes("MACHINE = browser-smoke")) {
|
||||
throw new Error("UI restored session snapshot did not reload INI text");
|
||||
}
|
||||
@@ -489,6 +503,8 @@ TOOL_TABLE = browser-tool.tbl
|
||||
}
|
||||
if (
|
||||
!uiLog.includes("Snapshot: ui-machine-session/ui-machine-session.json") ||
|
||||
!uiLog.includes("Workflow: save-session-snapshot") ||
|
||||
!uiLog.includes("Default G-code: linuxcnc/gcode/ui-session.ngc") ||
|
||||
!uiLog.includes(
|
||||
"Parameter file: linuxcnc/machines/xyzab-tdr/linuxcnc.var -> /work/session-linuxcnc.var",
|
||||
) ||
|
||||
|
||||
Reference in New Issue
Block a user