推进 INI 面板运行摘要状态
This commit is contained in:
@@ -411,6 +411,45 @@ TOOL_TABLE = browser-tool.tbl
|
||||
) {
|
||||
throw new Error(`UI fallback G-code run did not use default OPFS program path: ${fallbackRunLog}`);
|
||||
}
|
||||
assertEqual(
|
||||
uiDocument.getElementById("field-run-source").textContent,
|
||||
"default",
|
||||
"UI fallback run source field",
|
||||
);
|
||||
assertEqual(
|
||||
uiDocument.getElementById("field-run-snapshot").textContent,
|
||||
"-",
|
||||
"UI fallback run snapshot field",
|
||||
);
|
||||
assertEqual(
|
||||
uiDocument.getElementById("field-run-workflow").textContent,
|
||||
"-",
|
||||
"UI fallback run workflow field",
|
||||
);
|
||||
assertEqual(
|
||||
uiDocument.getElementById("field-run-opfs-path").textContent,
|
||||
"linuxcnc/gcode/ui-session.ngc",
|
||||
"UI fallback run OPFS field",
|
||||
);
|
||||
assertEqual(
|
||||
uiDocument.getElementById("field-run-wasm-path").textContent,
|
||||
"/work/ui-session.ngc",
|
||||
"UI fallback run WASM field",
|
||||
);
|
||||
const fallbackRunSummary = uiDocument.defaultView.linuxCncIniPanelLastRunSummary;
|
||||
assertEqual(fallbackRunSummary.programSource, "default", "UI fallback run summary source");
|
||||
assertEqual(fallbackRunSummary.snapshotLabel, null, "UI fallback run summary snapshot");
|
||||
assertEqual(fallbackRunSummary.workflow, null, "UI fallback run summary workflow");
|
||||
assertEqual(
|
||||
fallbackRunSummary.programOpfsPath,
|
||||
"linuxcnc/gcode/ui-session.ngc",
|
||||
"UI fallback run summary OPFS path",
|
||||
);
|
||||
assertEqual(
|
||||
fallbackRunSummary.programWasmPath,
|
||||
"/work/ui-session.ngc",
|
||||
"UI fallback run summary WASM path",
|
||||
);
|
||||
uiDocument.getElementById("save-session-snapshot").click();
|
||||
await waitFor(
|
||||
() => uiDocument.getElementById("log")?.textContent.includes("Saved machine session snapshot"),
|
||||
@@ -542,6 +581,53 @@ TOOL_TABLE = browser-tool.tbl
|
||||
) {
|
||||
throw new Error(`UI G-code run missing snapshot session context: ${runLog}`);
|
||||
}
|
||||
assertEqual(
|
||||
uiDocument.getElementById("field-run-source").textContent,
|
||||
"snapshot",
|
||||
"UI snapshot run source field",
|
||||
);
|
||||
assertEqual(
|
||||
uiDocument.getElementById("field-run-snapshot").textContent,
|
||||
"ui-machine-session/ui-machine-session.json",
|
||||
"UI snapshot run snapshot field",
|
||||
);
|
||||
assertEqual(
|
||||
uiDocument.getElementById("field-run-workflow").textContent,
|
||||
"save-session-snapshot",
|
||||
"UI snapshot run workflow field",
|
||||
);
|
||||
assertEqual(
|
||||
uiDocument.getElementById("field-run-opfs-path").textContent,
|
||||
"linuxcnc/gcode/ui-session.ngc",
|
||||
"UI snapshot run OPFS field",
|
||||
);
|
||||
assertEqual(
|
||||
uiDocument.getElementById("field-run-wasm-path").textContent,
|
||||
"/work/ui-session.ngc",
|
||||
"UI snapshot run WASM field",
|
||||
);
|
||||
const snapshotRunSummary = uiDocument.defaultView.linuxCncIniPanelLastRunSummary;
|
||||
assertEqual(snapshotRunSummary.programSource, "snapshot", "UI snapshot run summary source");
|
||||
assertEqual(
|
||||
snapshotRunSummary.snapshotLabel,
|
||||
"ui-machine-session/ui-machine-session.json",
|
||||
"UI snapshot run summary snapshot",
|
||||
);
|
||||
assertEqual(
|
||||
snapshotRunSummary.workflow,
|
||||
"save-session-snapshot",
|
||||
"UI snapshot run summary workflow",
|
||||
);
|
||||
assertEqual(
|
||||
snapshotRunSummary.programOpfsPath,
|
||||
"linuxcnc/gcode/ui-session.ngc",
|
||||
"UI snapshot run summary OPFS path",
|
||||
);
|
||||
assertEqual(
|
||||
snapshotRunSummary.programWasmPath,
|
||||
"/work/ui-session.ngc",
|
||||
"UI snapshot run summary WASM path",
|
||||
);
|
||||
if (
|
||||
!runLog.includes("canon_event=STRAIGHT_TRAVERSE") ||
|
||||
!runLog.includes("canon_event=STRAIGHT_FEED")
|
||||
|
||||
Reference in New Issue
Block a user