推进 UI run summary 文档一致性 guard
This commit is contained in:
@@ -37,6 +37,9 @@ vendored LinuxCNC runtime.
|
||||
|
||||
`snapshot` is the optional machine session snapshot loaded by the UI. The helper
|
||||
reads only snapshot metadata such as `workflow` and `snapshotLabel`.
|
||||
When `runtime.snapshotLabel` is present, it is used as the returned
|
||||
`snapshotLabel`; otherwise the helper falls back to `snapshot.metadata.snapshotLabel`
|
||||
and then `null`.
|
||||
|
||||
The returned summary has this shape:
|
||||
|
||||
|
||||
@@ -57,11 +57,21 @@ assert.deepEqual(
|
||||
},
|
||||
);
|
||||
|
||||
assert.equal(
|
||||
assert.deepEqual(
|
||||
createRunSummary(program, {
|
||||
snapshotLabel: "override-session/override.json",
|
||||
}, snapshot).snapshotLabel,
|
||||
"override-session/override.json",
|
||||
}, snapshot),
|
||||
{
|
||||
runStatus: "ok",
|
||||
programSource: "snapshot",
|
||||
snapshotLabel: "override-session/override.json",
|
||||
workflow: "save-session-snapshot",
|
||||
programOpfsPath: "linuxcnc/gcode/ui-session.ngc",
|
||||
programWasmPath: "/work/ui-session.ngc",
|
||||
iniWasmPath: null,
|
||||
canonicalEventCount: 0,
|
||||
motionSnapshotCount: 0,
|
||||
},
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
|
||||
Reference in New Issue
Block a user