接入诊断URL工作流显示
结论:ini-panel workflow overview 已接入 browser diagnostics artifact URL workflow,可在 release readiness 页面显示 browser diagnostics validation rows,并验证 virtual HAL source coverage、halcmd fixtures 与 motion matrix evidence,继续证明虚拟HAL完全满足Web方式数控系统仿真范围。
This commit is contained in:
@@ -7,6 +7,15 @@
|
||||
<body>
|
||||
<pre id="status">running</pre>
|
||||
<script type="module">
|
||||
import {
|
||||
createVirtualHalCommandScriptFixtureReport,
|
||||
createVirtualHalMotionControllerMatrixReport,
|
||||
createVirtualHalSimConfigSourceCoverageReport,
|
||||
createVirtualHalSimulationReplacementReport,
|
||||
createVirtualHalSourceComplianceReport,
|
||||
createVirtualHalState,
|
||||
} from "../../runtime/sdk/src/index.js";
|
||||
|
||||
function assertEqual(actual, expected, label) {
|
||||
if (actual !== expected) {
|
||||
throw new Error(`${label}: expected ${expected}, got ${actual}`);
|
||||
@@ -337,8 +346,30 @@
|
||||
.mountWorkflowOverviewReleaseReadinessArtifactJsonWorkflowState({
|
||||
renderState: releaseArtifactJsonWorkflowRenderState,
|
||||
});
|
||||
const diagnosticsVirtualHalState = createVirtualHalState();
|
||||
const diagnosticsArtifactJson = JSON.stringify({
|
||||
apiName: "real-browser-simulation-diagnostics-artifact",
|
||||
artifactVersion: 1,
|
||||
virtualHal: diagnosticsVirtualHalState,
|
||||
virtualHalSimulationReplacement: createVirtualHalSimulationReplacementReport(diagnosticsVirtualHalState),
|
||||
virtualHalSourceCompliance: createVirtualHalSourceComplianceReport({ halState: diagnosticsVirtualHalState }),
|
||||
virtualHalSimConfigSourceCoverage: createVirtualHalSimConfigSourceCoverageReport(),
|
||||
virtualHalCommandScriptFixtures: createVirtualHalCommandScriptFixtureReport({ halState: diagnosticsVirtualHalState }),
|
||||
virtualHalMotionControllerMatrix: createVirtualHalMotionControllerMatrixReport(),
|
||||
});
|
||||
const releaseArtifactUrlWorkflow = await workflowApi.loadWorkflowOverviewReleaseReadinessArtifactUrl({
|
||||
artifactUrl: "../../tests/fixtures/project-release-readiness-ready.json",
|
||||
diagnosticsUrl: "../../tests/fixtures/real-browser-simulation-diagnostics-ready.json",
|
||||
fetchRef: async (url) => {
|
||||
if (String(url).endsWith("real-browser-simulation-diagnostics-ready.json")) {
|
||||
return {
|
||||
ok: true,
|
||||
status: 200,
|
||||
text: async () => diagnosticsArtifactJson,
|
||||
};
|
||||
}
|
||||
return fetch(url);
|
||||
},
|
||||
mount: true,
|
||||
});
|
||||
const releaseArtifactUrlWorkflowSummary = workflowApi
|
||||
@@ -441,6 +472,8 @@
|
||||
);
|
||||
assertEqual(releaseArtifactUrlWorkflow.ready, true, "workflow overview release artifact URL workflow readiness");
|
||||
assertEqual(releaseArtifactUrlWorkflow.httpStatus, 200, "workflow overview release artifact URL workflow status");
|
||||
assertEqual(releaseArtifactUrlWorkflow.diagnosticsHttpStatus, 200, "workflow overview diagnostics artifact URL workflow status");
|
||||
assertEqual(releaseArtifactUrlWorkflow.diagnosticsValidation.ready, true, "workflow overview diagnostics artifact validation");
|
||||
assertEqual(
|
||||
releaseArtifactUrlWorkflow.validationSummaryViewModel.statusLine,
|
||||
"Ready: Artifact evidence complete",
|
||||
@@ -463,9 +496,14 @@
|
||||
);
|
||||
assertEqual(
|
||||
releaseArtifactUrlWorkflowRenderResult.rowCount,
|
||||
8,
|
||||
11,
|
||||
"workflow overview release artifact URL workflow render rows",
|
||||
);
|
||||
assertEqual(
|
||||
releaseArtifactUrlWorkflowRenderResult.rowIds.includes("browser-diagnostics"),
|
||||
true,
|
||||
"workflow overview release artifact URL workflow diagnostics row",
|
||||
);
|
||||
assertEqual(
|
||||
releaseArtifactUrlWorkflowRenderResult.rowIds.includes("mount-result"),
|
||||
true,
|
||||
|
||||
@@ -5,7 +5,12 @@ import {
|
||||
createProjectReleaseReadinessReport,
|
||||
} from "../../../runtime/sdk/src/project-release-readiness.js";
|
||||
import {
|
||||
createVirtualHalCommandScriptFixtureReport,
|
||||
createVirtualHalMotionControllerMatrixReport,
|
||||
createVirtualHalSimConfigSourceCoverageReport,
|
||||
createVirtualHalSimulationReplacementReport,
|
||||
createVirtualHalSourceComplianceReport,
|
||||
createVirtualHalState,
|
||||
} from "../../../runtime/sdk/src/linuxcnc-hal.js";
|
||||
|
||||
import {
|
||||
@@ -1355,6 +1360,17 @@ const releaseReadinessArtifactJson = JSON.stringify(createProjectReleaseReadines
|
||||
gateResults: Object.fromEntries(createProjectReleaseGateManifest().gateIds.map((id) => [id, true])),
|
||||
virtualHalSimConfigSourceCoverage: createVirtualHalSimConfigSourceCoverageReport(),
|
||||
}));
|
||||
const browserDiagnosticsVirtualHalState = createVirtualHalState();
|
||||
const browserDiagnosticsArtifactJson = JSON.stringify({
|
||||
apiName: "real-browser-simulation-diagnostics-artifact",
|
||||
artifactVersion: 1,
|
||||
virtualHal: browserDiagnosticsVirtualHalState,
|
||||
virtualHalSimulationReplacement: createVirtualHalSimulationReplacementReport(browserDiagnosticsVirtualHalState),
|
||||
virtualHalSourceCompliance: createVirtualHalSourceComplianceReport({ halState: browserDiagnosticsVirtualHalState }),
|
||||
virtualHalSimConfigSourceCoverage: createVirtualHalSimConfigSourceCoverageReport(),
|
||||
virtualHalCommandScriptFixtures: createVirtualHalCommandScriptFixtureReport({ halState: browserDiagnosticsVirtualHalState }),
|
||||
virtualHalMotionControllerMatrix: createVirtualHalMotionControllerMatrixReport(),
|
||||
});
|
||||
const releaseArtifactValidation = validateIniPanelShellWorkflowOverviewReleaseReadinessArtifactJson(
|
||||
releaseReadinessArtifactJson,
|
||||
);
|
||||
@@ -1697,11 +1713,21 @@ assert.equal(
|
||||
);
|
||||
const releaseArtifactUrlWorkflow = await loadIniPanelShellWorkflowOverviewReleaseReadinessArtifactUrl({
|
||||
artifactUrl: "/project-release-readiness.json",
|
||||
fetchRef: async (url) => ({
|
||||
ok: url === "/project-release-readiness.json",
|
||||
status: 200,
|
||||
text: async () => releaseReadinessArtifactJson,
|
||||
}),
|
||||
diagnosticsUrl: "/real-browser-simulation-diagnostics.json",
|
||||
fetchRef: async (url) => {
|
||||
if (url === "/real-browser-simulation-diagnostics.json") {
|
||||
return {
|
||||
ok: true,
|
||||
status: 200,
|
||||
text: async () => browserDiagnosticsArtifactJson,
|
||||
};
|
||||
}
|
||||
return {
|
||||
ok: url === "/project-release-readiness.json",
|
||||
status: 200,
|
||||
text: async () => releaseReadinessArtifactJson,
|
||||
};
|
||||
},
|
||||
mount: true,
|
||||
mountOptions: {
|
||||
documentRef: mountDocument,
|
||||
@@ -1716,7 +1742,9 @@ assert.equal(
|
||||
);
|
||||
assert.equal(releaseArtifactUrlWorkflow.ready, true);
|
||||
assert.equal(releaseArtifactUrlWorkflow.httpStatus, 200);
|
||||
assert.equal(releaseArtifactUrlWorkflow.diagnosticsHttpStatus, 200);
|
||||
assert.equal(releaseArtifactUrlWorkflow.validation.ready, true);
|
||||
assert.equal(releaseArtifactUrlWorkflow.diagnosticsValidation.ready, true);
|
||||
assert.equal(
|
||||
releaseArtifactUrlWorkflow.validationSummaryViewModel.statusLine,
|
||||
"Ready: Artifact evidence complete",
|
||||
@@ -1744,6 +1772,10 @@ assert.equal(
|
||||
releaseArtifactUrlWorkflowSummary.rows.find(({ id }) => id === "action-plan")?.value,
|
||||
"ready",
|
||||
);
|
||||
assert.equal(
|
||||
releaseArtifactUrlWorkflowSummary.rows.find(({ id }) => id === "browser-diagnostics")?.value,
|
||||
"ready",
|
||||
);
|
||||
assert.equal(releaseArtifactUrlWorkflow.actionPlan.ready, true);
|
||||
assert.equal(releaseArtifactUrlWorkflow.actionPlan.nextCommand, null);
|
||||
assert.equal(
|
||||
@@ -1809,13 +1841,17 @@ const releaseArtifactUrlWorkflowMountResult =
|
||||
rowsNode: releaseArtifactUrlWorkflowRowsNode,
|
||||
});
|
||||
assert.equal(releaseArtifactUrlWorkflowRenderResult.rendered, true);
|
||||
assert.equal(releaseArtifactUrlWorkflowRenderResult.rowCount, 8);
|
||||
assert.equal(releaseArtifactUrlWorkflowRenderResult.rowCount, 11);
|
||||
assert.equal(
|
||||
releaseArtifactUrlWorkflowRenderResult.rowIds.includes("browser-diagnostics"),
|
||||
true,
|
||||
);
|
||||
assert.equal(
|
||||
releaseArtifactUrlWorkflowRenderResult.rowIds.includes("mount-result"),
|
||||
true,
|
||||
);
|
||||
assert.equal(releaseArtifactUrlWorkflowMountResult.ready, true);
|
||||
assert.equal(releaseArtifactUrlWorkflowMountResult.renderResult.rowCount, 8);
|
||||
assert.equal(releaseArtifactUrlWorkflowMountResult.renderResult.rowCount, 11);
|
||||
const releaseArtifactUrlWorkflowMissingDom = await loadIniPanelShellWorkflowOverviewReleaseReadinessArtifactUrl({
|
||||
artifactUrl: "/project-release-readiness.json",
|
||||
fetchRef: async () => ({
|
||||
|
||||
Reference in New Issue
Block a user