推进 INI 面板 shell handoff mount workflow helper
This commit is contained in:
@@ -29,6 +29,7 @@ import {
|
||||
createIniPanelShellSessionHandoffPackageMountState,
|
||||
createIniPanelShellSessionHandoffMountDomContract,
|
||||
createIniPanelShellSessionHandoffMountDomReadiness,
|
||||
mountIniPanelShellSessionHandoff,
|
||||
renderIniPanelShellSessionHandoffMountState,
|
||||
createIniPanelShellSessionHandoffPackageReport,
|
||||
createIniPanelShellSessionHandoffPackageRenderState,
|
||||
@@ -97,6 +98,7 @@ const requiredShellExports = [
|
||||
"createIniPanelShellSessionHandoffPackageMountState",
|
||||
"createIniPanelShellSessionHandoffMountDomContract",
|
||||
"createIniPanelShellSessionHandoffMountDomReadiness",
|
||||
"mountIniPanelShellSessionHandoff",
|
||||
"renderIniPanelShellSessionHandoffMountState",
|
||||
"createIniPanelShellSessionHandoffPackageReport",
|
||||
"createIniPanelShellSessionHandoffPackageRenderState",
|
||||
@@ -291,6 +293,10 @@ assert.equal(
|
||||
createIniPanelShellSessionHandoffMountDomReadiness({ documentRef: null }).ready,
|
||||
false,
|
||||
);
|
||||
assert.equal(
|
||||
mountIniPanelShellSessionHandoff({ documentRef: null }).phase,
|
||||
"blocked",
|
||||
);
|
||||
assert.equal(isSupportedIniPanelShellSessionHandoffPackage(createIniPanelShellViewModel().shellSessionHandoffPackage), true);
|
||||
assert.equal(isSupportedIniPanelShellIntegrationManifest(createIniPanelShellViewModel().shellIntegrationManifest), true);
|
||||
assert.deepEqual(createIniPanelShellViewModel().launchApiSchema, createIniPanelLaunchApiSchema());
|
||||
@@ -450,6 +456,7 @@ assert.match(docText, /\brenderIniPanelShellSessionHandoffMountState\b/);
|
||||
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.renderShellSessionHandoffMountState\b/);
|
||||
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getShellSessionHandoffMountDomContract\b/);
|
||||
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getShellSessionHandoffMountDomReadiness\b/);
|
||||
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.mountShellSessionHandoff\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/);
|
||||
@@ -468,6 +475,7 @@ assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellSessionHandoffPackage
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellSessionHandoffPackageMountRenderState\b/);
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellSessionHandoffMountDomContract\b/);
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellSessionHandoffMountDomReadiness\b/);
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\bmountShellSessionHandoff\b/);
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\brenderShellSessionHandoffMountState\b/);
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\bdata-external-shell-mount\b/);
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\bdata-external-mount-value\b/);
|
||||
|
||||
@@ -66,6 +66,7 @@ assert.deepEqual(manifest, {
|
||||
"getShellSessionHandoffMountDomContract",
|
||||
"getShellSessionHandoffMountDomReadiness",
|
||||
"renderShellSessionHandoffMountState",
|
||||
"mountShellSessionHandoff",
|
||||
"isSupportedShellSessionHandoffPackage",
|
||||
"getLauncherLinks",
|
||||
"getControlPageApiMethods",
|
||||
@@ -187,6 +188,7 @@ assert.match(launchText, /\bgetShellSessionHandoffPackageMountRenderState\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffMountDomContract\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffMountDomReadiness\b/);
|
||||
assert.match(launchText, /\brenderShellSessionHandoffMountState\b/);
|
||||
assert.match(launchText, /\bmountShellSessionHandoff\b/);
|
||||
assert.match(launchText, /\bisSupportedShellSessionHandoffPackage\b/);
|
||||
assert.match(launchText, /\bdata-handoff-mount\b/);
|
||||
assert.match(launchText, /\bdata-handoff-mount-status\b/);
|
||||
|
||||
@@ -25,6 +25,7 @@ import {
|
||||
createIniPanelShellSessionHandoffPackageMountState,
|
||||
createIniPanelShellSessionHandoffMountDomContract,
|
||||
createIniPanelShellSessionHandoffMountDomReadiness,
|
||||
mountIniPanelShellSessionHandoff,
|
||||
createIniPanelShellSessionHandoffPackageReport,
|
||||
createIniPanelShellSessionHandoffPackageRenderState,
|
||||
createIniPanelShellSessionHandoffPackageSchema,
|
||||
@@ -151,7 +152,7 @@ assert.deepEqual(readiness, {
|
||||
counts: {
|
||||
pages: 2,
|
||||
launcherLinks: 2,
|
||||
launchMethods: 29,
|
||||
launchMethods: 30,
|
||||
controlPageMethods: 11,
|
||||
persistenceCapabilities: 3,
|
||||
},
|
||||
@@ -213,7 +214,7 @@ assert.deepEqual(handoffSummary, {
|
||||
counts: {
|
||||
pages: 2,
|
||||
launcherLinks: 2,
|
||||
launchMethods: 29,
|
||||
launchMethods: 30,
|
||||
controlPageMethods: 11,
|
||||
persistenceCapabilities: 3,
|
||||
},
|
||||
@@ -701,6 +702,10 @@ assert.deepEqual(createIniPanelShellSessionHandoffMountDomReadiness({ documentRe
|
||||
},
|
||||
contract: handoffMountDomContract,
|
||||
});
|
||||
assert.equal(
|
||||
mountIniPanelShellSessionHandoff({ documentRef: null }).statusLine,
|
||||
"Blocked: document, mount, status, rows",
|
||||
);
|
||||
assert.deepEqual(
|
||||
createIniPanelShellSessionHandoffPackageMountState({
|
||||
handoffPackage,
|
||||
@@ -1112,7 +1117,7 @@ assert.deepEqual(createIniPanelShellIntegrationReadiness(blockedManifest), {
|
||||
counts: {
|
||||
pages: 2,
|
||||
launcherLinks: 2,
|
||||
launchMethods: 29,
|
||||
launchMethods: 30,
|
||||
controlPageMethods: 11,
|
||||
persistenceCapabilities: 3,
|
||||
},
|
||||
@@ -1283,6 +1288,7 @@ assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPack
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackageMountState\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffMountDomContract\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffMountDomReadiness\b/);
|
||||
assert.match(shellText, /\bexport function mountIniPanelShellSessionHandoff\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackageReport\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackageRenderState\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackageSchema\b/);
|
||||
@@ -1310,6 +1316,7 @@ assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackageMountRenderStat
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackageMountState\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffMountDomContract\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffMountDomReadiness\b/);
|
||||
assert.match(docText, /\bmountIniPanelShellSessionHandoff\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackageReport\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackageRenderState\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackageSchema\b/);
|
||||
|
||||
@@ -25,6 +25,7 @@ import {
|
||||
createIniPanelShellSessionHandoffPackageMountState,
|
||||
createIniPanelShellSessionHandoffMountDomContract,
|
||||
createIniPanelShellSessionHandoffMountDomReadiness,
|
||||
mountIniPanelShellSessionHandoff,
|
||||
renderIniPanelShellSessionHandoffMountState,
|
||||
createIniPanelShellSessionHandoffPackageReport,
|
||||
createIniPanelShellSessionHandoffPackageRenderState,
|
||||
@@ -98,6 +99,7 @@ assert.equal(typeof createIniPanelShellSessionHandoffPackageMountRenderState, "f
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffPackageMountState, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffMountDomContract, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffMountDomReadiness, "function");
|
||||
assert.equal(typeof mountIniPanelShellSessionHandoff, "function");
|
||||
assert.equal(typeof renderIniPanelShellSessionHandoffMountState, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffPackageReport, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffPackageRenderState, "function");
|
||||
@@ -699,6 +701,7 @@ assert.equal(
|
||||
shellViewModel.renderShellSessionHandoffMountState,
|
||||
renderIniPanelShellSessionHandoffMountState,
|
||||
);
|
||||
assert.equal(shellViewModel.mountShellSessionHandoff, mountIniPanelShellSessionHandoff);
|
||||
assert.equal(shellViewModel.createShellSessionHandoffPackageReport, createIniPanelShellSessionHandoffPackageReport);
|
||||
assert.equal(shellViewModel.createShellSessionHandoffPackageSchema, createIniPanelShellSessionHandoffPackageSchema);
|
||||
assert.equal(shellViewModel.isSupportedShellSessionHandoffPackage, isSupportedIniPanelShellSessionHandoffPackage);
|
||||
@@ -822,6 +825,29 @@ assert.deepEqual(
|
||||
);
|
||||
assert.equal(mountRowsNode.children[7].dataset.handoffMountValue, "session-load-state");
|
||||
assert.equal(mountRowsNode.children[7].dataset.handoffMountStatus, "blocked");
|
||||
const mountWorkflowResult = mountIniPanelShellSessionHandoff({
|
||||
renderState: shellViewModel.shellSessionHandoffPackageMountRenderState,
|
||||
documentRef: mountDocument,
|
||||
mountNode,
|
||||
statusNode: mountStatusNode,
|
||||
rowsNode: mountRowsNode,
|
||||
});
|
||||
assert.equal(mountWorkflowResult.apiName, "ini-panel-shell-session-handoff-mount-workflow");
|
||||
assert.equal(mountWorkflowResult.workflowVersion, 1);
|
||||
assert.equal(mountWorkflowResult.phase, "blocked");
|
||||
assert.equal(mountWorkflowResult.ready, false);
|
||||
assert.equal(mountWorkflowResult.domReadiness.ready, true);
|
||||
assert.equal(mountWorkflowResult.renderResult.rendered, true);
|
||||
assert.equal(mountWorkflowResult.renderResult.rowCount, 5);
|
||||
assert.equal(mountWorkflowResult.error, null);
|
||||
assert.deepEqual(
|
||||
mountIniPanelShellSessionHandoff({ documentRef: mountDocument }).renderResult,
|
||||
null,
|
||||
);
|
||||
assert.deepEqual(
|
||||
mountIniPanelShellSessionHandoff({ documentRef: mountDocument }).domReadiness.missing,
|
||||
["mount", "status", "rows"],
|
||||
);
|
||||
const externalContract = createIniPanelShellSessionHandoffMountDomContract({
|
||||
rowDatasetPrefix: "externalMount",
|
||||
selectors: {
|
||||
|
||||
Reference in New Issue
Block a user