推进 INI 面板 shell handoff mount DOM renderer
This commit is contained in:
@@ -27,6 +27,7 @@ import {
|
||||
createIniPanelShellSessionHandoffPackageMountDisplayViewModel,
|
||||
createIniPanelShellSessionHandoffPackageMountRenderState,
|
||||
createIniPanelShellSessionHandoffPackageMountState,
|
||||
renderIniPanelShellSessionHandoffMountState,
|
||||
createIniPanelShellSessionHandoffPackageReport,
|
||||
createIniPanelShellSessionHandoffPackageRenderState,
|
||||
createIniPanelShellSessionHandoffPackageSchema,
|
||||
@@ -92,6 +93,7 @@ const requiredShellExports = [
|
||||
"createIniPanelShellSessionHandoffPackageMountDisplayViewModel",
|
||||
"createIniPanelShellSessionHandoffPackageMountRenderState",
|
||||
"createIniPanelShellSessionHandoffPackageMountState",
|
||||
"renderIniPanelShellSessionHandoffMountState",
|
||||
"createIniPanelShellSessionHandoffPackageReport",
|
||||
"createIniPanelShellSessionHandoffPackageRenderState",
|
||||
"createIniPanelShellSessionHandoffPackageSchema",
|
||||
@@ -432,6 +434,8 @@ assert.match(docText, /\bdata-handoff-shell\b/);
|
||||
assert.match(docText, /\bdata-handoff-status\b/);
|
||||
assert.match(docText, /\bdata-handoff-rows\b/);
|
||||
assert.match(docText, /\bdata-external-shell-mount\b/);
|
||||
assert.match(docText, /\brenderIniPanelShellSessionHandoffMountState\b/);
|
||||
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.renderShellSessionHandoffMountState\b/);
|
||||
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getControlPageApiMethods\b/);
|
||||
assert.match(docText, /\bini_panel_shell_integration_workflow_smoke\.html\b/);
|
||||
assert.match(browserIniPanelText, /\bini_panel_shell_integration_workflow_smoke\.html\b/);
|
||||
@@ -448,6 +452,7 @@ assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellSessionHandoffPackage
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellSessionHandoffPackage\b/);
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellSessionHandoffPackageReport\b/);
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellSessionHandoffPackageMountRenderState\b/);
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\brenderShellSessionHandoffMountState\b/);
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\bdata-external-shell-mount\b/);
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\bdata-external-mount-value\b/);
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\bisSupportedShellSessionHandoffPackage\b/);
|
||||
|
||||
@@ -63,6 +63,7 @@ assert.deepEqual(manifest, {
|
||||
"getShellSessionHandoffPackageMountState",
|
||||
"getShellSessionHandoffPackageMountDisplayViewModel",
|
||||
"getShellSessionHandoffPackageMountRenderState",
|
||||
"renderShellSessionHandoffMountState",
|
||||
"isSupportedShellSessionHandoffPackage",
|
||||
"getLauncherLinks",
|
||||
"getControlPageApiMethods",
|
||||
@@ -181,6 +182,7 @@ assert.match(launchText, /\bgetShellSessionHandoffPackageRenderState\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffPackageMountState\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffPackageMountDisplayViewModel\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffPackageMountRenderState\b/);
|
||||
assert.match(launchText, /\brenderShellSessionHandoffMountState\b/);
|
||||
assert.match(launchText, /\bisSupportedShellSessionHandoffPackage\b/);
|
||||
assert.match(launchText, /\bdata-handoff-mount\b/);
|
||||
assert.match(launchText, /\bdata-handoff-mount-status\b/);
|
||||
|
||||
@@ -148,7 +148,7 @@ assert.deepEqual(readiness, {
|
||||
counts: {
|
||||
pages: 2,
|
||||
launcherLinks: 2,
|
||||
launchMethods: 26,
|
||||
launchMethods: 27,
|
||||
controlPageMethods: 11,
|
||||
persistenceCapabilities: 3,
|
||||
},
|
||||
@@ -210,7 +210,7 @@ assert.deepEqual(handoffSummary, {
|
||||
counts: {
|
||||
pages: 2,
|
||||
launcherLinks: 2,
|
||||
launchMethods: 26,
|
||||
launchMethods: 27,
|
||||
controlPageMethods: 11,
|
||||
persistenceCapabilities: 3,
|
||||
},
|
||||
@@ -1077,7 +1077,7 @@ assert.deepEqual(createIniPanelShellIntegrationReadiness(blockedManifest), {
|
||||
counts: {
|
||||
pages: 2,
|
||||
launcherLinks: 2,
|
||||
launchMethods: 26,
|
||||
launchMethods: 27,
|
||||
controlPageMethods: 11,
|
||||
persistenceCapabilities: 3,
|
||||
},
|
||||
|
||||
@@ -23,6 +23,7 @@ import {
|
||||
createIniPanelShellSessionHandoffPackageMountDisplayViewModel,
|
||||
createIniPanelShellSessionHandoffPackageMountRenderState,
|
||||
createIniPanelShellSessionHandoffPackageMountState,
|
||||
renderIniPanelShellSessionHandoffMountState,
|
||||
createIniPanelShellSessionHandoffPackageReport,
|
||||
createIniPanelShellSessionHandoffPackageRenderState,
|
||||
createIniPanelShellSessionHandoffPackageSchema,
|
||||
@@ -93,6 +94,7 @@ assert.equal(typeof createIniPanelShellSessionHandoffPackageDisplayViewModel, "f
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffPackageMountDisplayViewModel, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffPackageMountRenderState, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffPackageMountState, "function");
|
||||
assert.equal(typeof renderIniPanelShellSessionHandoffMountState, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffPackageReport, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffPackageRenderState, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffPackageSchema, "function");
|
||||
@@ -660,6 +662,10 @@ assert.equal(
|
||||
shellViewModel.createShellSessionHandoffPackageMountRenderState,
|
||||
createIniPanelShellSessionHandoffPackageMountRenderState,
|
||||
);
|
||||
assert.equal(
|
||||
shellViewModel.renderShellSessionHandoffMountState,
|
||||
renderIniPanelShellSessionHandoffMountState,
|
||||
);
|
||||
assert.equal(shellViewModel.createShellSessionHandoffPackageReport, createIniPanelShellSessionHandoffPackageReport);
|
||||
assert.equal(shellViewModel.createShellSessionHandoffPackageSchema, createIniPanelShellSessionHandoffPackageSchema);
|
||||
assert.equal(shellViewModel.isSupportedShellSessionHandoffPackage, isSupportedIniPanelShellSessionHandoffPackage);
|
||||
@@ -715,6 +721,48 @@ const controller = createMachineSessionControlPageController({
|
||||
},
|
||||
});
|
||||
|
||||
const mountRowsNode = {
|
||||
children: [],
|
||||
replaceChildren() {
|
||||
this.children = [];
|
||||
},
|
||||
append(...nodes) {
|
||||
this.children.push(...nodes);
|
||||
},
|
||||
};
|
||||
const mountNode = { dataset: {} };
|
||||
const mountStatusNode = { textContent: "" };
|
||||
const mountDocument = {
|
||||
createElement: (tagName) => ({ tagName, dataset: {}, textContent: "" }),
|
||||
};
|
||||
assert.deepEqual(
|
||||
renderIniPanelShellSessionHandoffMountState(shellViewModel.shellSessionHandoffPackageMountRenderState, {
|
||||
documentRef: mountDocument,
|
||||
mountNode,
|
||||
statusNode: mountStatusNode,
|
||||
rowsNode: mountRowsNode,
|
||||
}),
|
||||
{
|
||||
rendered: true,
|
||||
statusLine: "Blocked: session-load-state",
|
||||
rowCount: 5,
|
||||
rowIds: [
|
||||
"package-render-state",
|
||||
"target-page",
|
||||
"required-methods",
|
||||
"session-load-state",
|
||||
"blocking-reasons",
|
||||
],
|
||||
dataset: {
|
||||
handoffPhase: "blocked",
|
||||
handoffReady: "false",
|
||||
handoffScope: "mount",
|
||||
},
|
||||
},
|
||||
);
|
||||
assert.equal(mountRowsNode.children[7].dataset.handoffMountValue, "session-load-state");
|
||||
assert.equal(mountRowsNode.children[7].dataset.handoffMountStatus, "blocked");
|
||||
|
||||
assert.deepEqual(controller.render(), { rendered: true });
|
||||
assert.equal(statusNode.textContent, "run-gcode | ok | -");
|
||||
assert.equal(renderedView.status.runStatus, "ok");
|
||||
|
||||
Reference in New Issue
Block a user