接入诊断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,
|
||||
|
||||
Reference in New Issue
Block a user