推进 INI 面板 shell handoff package
This commit is contained in:
@@ -22,6 +22,7 @@ import {
|
||||
createIniPanelShellSessionHandoffChecklist,
|
||||
createIniPanelShellSessionHandoffCompatibilityReport,
|
||||
createIniPanelShellSessionHandoffDisplayViewModel,
|
||||
createIniPanelShellSessionHandoffPackage,
|
||||
createIniPanelShellSessionHandoffRenderState,
|
||||
createIniPanelShellSessionHandoffSnapshot,
|
||||
createIniPanelShellSessionHandoffSummary,
|
||||
@@ -78,6 +79,7 @@ const requiredShellExports = [
|
||||
"createIniPanelShellSessionHandoffChecklist",
|
||||
"createIniPanelShellSessionHandoffCompatibilityReport",
|
||||
"createIniPanelShellSessionHandoffDisplayViewModel",
|
||||
"createIniPanelShellSessionHandoffPackage",
|
||||
"createIniPanelShellSessionHandoffRenderState",
|
||||
"createIniPanelShellSessionHandoffSnapshot",
|
||||
"createIniPanelShellSessionHandoffSummary",
|
||||
@@ -208,6 +210,18 @@ assert.deepEqual(
|
||||
renderState: createIniPanelShellViewModel().shellSessionHandoffRenderState,
|
||||
}),
|
||||
);
|
||||
assert.deepEqual(
|
||||
createIniPanelShellViewModel().shellSessionHandoffPackage,
|
||||
createIniPanelShellSessionHandoffPackage({
|
||||
shellIntegrationManifest: createIniPanelShellViewModel().shellIntegrationManifest,
|
||||
launchApiManifest: createIniPanelShellViewModel().shellIntegrationManifest.launchApiManifest,
|
||||
controlPageApiManifest: createIniPanelShellViewModel().shellIntegrationManifest.controlPageApiManifest,
|
||||
snapshot: createIniPanelShellViewModel().shellSessionHandoffSnapshot,
|
||||
renderState: createIniPanelShellViewModel().shellSessionHandoffRenderState,
|
||||
actionPlan: createIniPanelShellViewModel().shellSessionHandoffActionPlan,
|
||||
checklist: createIniPanelShellViewModel().shellSessionHandoffChecklist,
|
||||
}),
|
||||
);
|
||||
assert.equal(isSupportedIniPanelShellIntegrationManifest(createIniPanelShellViewModel().shellIntegrationManifest), true);
|
||||
assert.deepEqual(createIniPanelShellViewModel().launchApiSchema, createIniPanelLaunchApiSchema());
|
||||
assert.deepEqual(createIniPanelShellViewModel().launchApiManifest, createIniPanelLaunchApiManifest());
|
||||
@@ -266,6 +280,7 @@ assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffActi
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffChecklist\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffCompatibilityReport\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffDisplayViewModel\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackage\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffRenderState\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffSnapshot\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffSummary\b/);
|
||||
@@ -294,6 +309,7 @@ assert.match(launchText, /\bgetShellSessionHandoffSnapshot\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffRenderState\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffActionPlan\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffChecklist\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffPackage\b/);
|
||||
assert.match(launchText, /\bdata-handoff-shell\b/);
|
||||
assert.match(launchText, /\bdata-handoff-status\b/);
|
||||
assert.match(launchText, /\bdata-handoff-rows\b/);
|
||||
@@ -319,6 +335,7 @@ assert.match(docText, /\bcreateIniPanelShellSessionHandoffActionPlan\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffChecklist\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffCompatibilityReport\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffDisplayViewModel\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackage\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffRenderState\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffSnapshot\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffSummary\b/);
|
||||
@@ -342,6 +359,7 @@ assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getShellSessionHandoffSnapsh
|
||||
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getShellSessionHandoffRenderState\b/);
|
||||
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getShellSessionHandoffActionPlan\b/);
|
||||
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getShellSessionHandoffChecklist\b/);
|
||||
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getShellSessionHandoffPackage\b/);
|
||||
assert.match(docText, /\bdata-handoff-shell\b/);
|
||||
assert.match(docText, /\bdata-handoff-status\b/);
|
||||
assert.match(docText, /\bdata-handoff-rows\b/);
|
||||
@@ -357,6 +375,7 @@ assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellSessionHandoffSnapsho
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellSessionHandoffRenderState\b/);
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellSessionHandoffActionPlan\b/);
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellSessionHandoffChecklist\b/);
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellSessionHandoffPackage\b/);
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\bhandoffSummary\.handoffMethods\.readStatus\b/);
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\breadControlPageStatus\b/);
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\bbrowser_ini_shell_integration_workflow_smoke=ok\b/);
|
||||
|
||||
@@ -55,6 +55,7 @@ assert.deepEqual(manifest, {
|
||||
"getShellSessionHandoffRenderState",
|
||||
"getShellSessionHandoffActionPlan",
|
||||
"getShellSessionHandoffChecklist",
|
||||
"getShellSessionHandoffPackage",
|
||||
"getLauncherLinks",
|
||||
"getControlPageApiMethods",
|
||||
],
|
||||
@@ -164,6 +165,7 @@ assert.match(launchText, /\bgetShellSessionHandoffSnapshot\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffRenderState\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffActionPlan\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffChecklist\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffPackage\b/);
|
||||
assert.match(launchText, /\blinuxCncIniPanelLaunchApi\b/);
|
||||
|
||||
console.log("ini_panel_launch_api_manifest_node_smoke=ok");
|
||||
|
||||
@@ -18,6 +18,7 @@ import {
|
||||
createIniPanelShellSessionHandoffChecklist,
|
||||
createIniPanelShellSessionHandoffCompatibilityReport,
|
||||
createIniPanelShellSessionHandoffDisplayViewModel,
|
||||
createIniPanelShellSessionHandoffPackage,
|
||||
createIniPanelShellSessionHandoffRenderState,
|
||||
createIniPanelShellSessionHandoffSnapshot,
|
||||
createIniPanelShellSessionHandoffSummary,
|
||||
@@ -56,6 +57,15 @@ const handoffChecklist = createIniPanelShellSessionHandoffChecklist({
|
||||
actionPlan: handoffActionPlan,
|
||||
renderState: handoffRenderState,
|
||||
});
|
||||
const handoffPackage = createIniPanelShellSessionHandoffPackage({
|
||||
shellIntegrationManifest: manifest,
|
||||
launchApiManifest: manifest.launchApiManifest,
|
||||
controlPageApiManifest: manifest.controlPageApiManifest,
|
||||
snapshot: handoffSnapshot,
|
||||
renderState: handoffRenderState,
|
||||
actionPlan: handoffActionPlan,
|
||||
checklist: handoffChecklist,
|
||||
});
|
||||
|
||||
assert.deepEqual(schema, {
|
||||
apiName: "ini-panel-shell-integration",
|
||||
@@ -111,7 +121,7 @@ assert.deepEqual(readiness, {
|
||||
counts: {
|
||||
pages: 2,
|
||||
launcherLinks: 2,
|
||||
launchMethods: 17,
|
||||
launchMethods: 18,
|
||||
controlPageMethods: 11,
|
||||
persistenceCapabilities: 3,
|
||||
},
|
||||
@@ -173,7 +183,7 @@ assert.deepEqual(handoffSummary, {
|
||||
counts: {
|
||||
pages: 2,
|
||||
launcherLinks: 2,
|
||||
launchMethods: 17,
|
||||
launchMethods: 18,
|
||||
controlPageMethods: 11,
|
||||
persistenceCapabilities: 3,
|
||||
},
|
||||
@@ -414,10 +424,29 @@ assert.deepEqual(handoffChecklist, {
|
||||
nextStepIds: ["open-control-page", "read-readonly-status"],
|
||||
blockingReasons: [],
|
||||
});
|
||||
assert.deepEqual(handoffPackage, {
|
||||
apiName: "ini-panel-shell-session-handoff-package",
|
||||
packageVersion: 1,
|
||||
phase: "ready",
|
||||
ready: true,
|
||||
statusLine: "Ready: No blocking reasons",
|
||||
manifests: {
|
||||
shellIntegration: manifest,
|
||||
launchApi: manifest.launchApiManifest,
|
||||
controlPageApi: manifest.controlPageApiManifest,
|
||||
launchMethods: manifest.launchApiManifest.methods,
|
||||
controlPageMethods: manifest.controlPageApiManifest.methods,
|
||||
},
|
||||
snapshot: handoffSnapshot,
|
||||
renderState: handoffRenderState,
|
||||
actionPlan: handoffActionPlan,
|
||||
checklist: handoffChecklist,
|
||||
});
|
||||
assert.equal(createIniPanelShellSessionHandoffSnapshot().displayViewModel.rows.length, 5);
|
||||
assert.equal(createIniPanelShellSessionHandoffRenderState().statusLine, "Ready: No blocking reasons");
|
||||
assert.equal(createIniPanelShellSessionHandoffActionPlan().nextSteps.length, 2);
|
||||
assert.equal(createIniPanelShellSessionHandoffChecklist().checks.length, 5);
|
||||
assert.equal(createIniPanelShellSessionHandoffPackage().manifests.launchMethods.includes("getShellSessionHandoffPackage"), true);
|
||||
assert.deepEqual(
|
||||
createIniPanelShellSessionHandoffDisplayViewModel(
|
||||
createIniPanelShellSessionHandoffCompatibilityReport({ ...handoffSummary, summaryVersion: 2 }),
|
||||
@@ -634,7 +663,7 @@ assert.deepEqual(createIniPanelShellIntegrationReadiness(blockedManifest), {
|
||||
counts: {
|
||||
pages: 2,
|
||||
launcherLinks: 2,
|
||||
launchMethods: 17,
|
||||
launchMethods: 18,
|
||||
controlPageMethods: 11,
|
||||
persistenceCapabilities: 3,
|
||||
},
|
||||
@@ -798,6 +827,7 @@ assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffActi
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffChecklist\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffCompatibilityReport\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffDisplayViewModel\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackage\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffRenderState\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffSnapshot\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffSummary\b/);
|
||||
@@ -814,6 +844,7 @@ assert.match(docText, /\bcreateIniPanelShellSessionHandoffActionPlan\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffChecklist\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffCompatibilityReport\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffDisplayViewModel\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackage\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffRenderState\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffSnapshot\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffSummary\b/);
|
||||
|
||||
@@ -18,6 +18,7 @@ import {
|
||||
createIniPanelShellSessionHandoffChecklist,
|
||||
createIniPanelShellSessionHandoffCompatibilityReport,
|
||||
createIniPanelShellSessionHandoffDisplayViewModel,
|
||||
createIniPanelShellSessionHandoffPackage,
|
||||
createIniPanelShellSessionHandoffRenderState,
|
||||
createIniPanelShellSessionHandoffSnapshot,
|
||||
createIniPanelShellSessionHandoffSummary,
|
||||
@@ -79,6 +80,7 @@ assert.equal(typeof createIniPanelShellSessionHandoffActionPlan, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffChecklist, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffCompatibilityReport, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffDisplayViewModel, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffPackage, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffRenderState, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffSnapshot, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffSummary, "function");
|
||||
@@ -185,6 +187,18 @@ assert.deepEqual(
|
||||
renderState: shellViewModel.shellSessionHandoffRenderState,
|
||||
}),
|
||||
);
|
||||
assert.deepEqual(
|
||||
shellViewModel.shellSessionHandoffPackage,
|
||||
createIniPanelShellSessionHandoffPackage({
|
||||
shellIntegrationManifest: shellViewModel.shellIntegrationManifest,
|
||||
launchApiManifest: shellViewModel.shellIntegrationManifest.launchApiManifest,
|
||||
controlPageApiManifest: shellViewModel.shellIntegrationManifest.controlPageApiManifest,
|
||||
snapshot: shellViewModel.shellSessionHandoffSnapshot,
|
||||
renderState: shellViewModel.shellSessionHandoffRenderState,
|
||||
actionPlan: shellViewModel.shellSessionHandoffActionPlan,
|
||||
checklist: shellViewModel.shellSessionHandoffChecklist,
|
||||
}),
|
||||
);
|
||||
assert.deepEqual(shellViewModel.shellSessionHandoffDisplayViewModel, {
|
||||
phase: "ready",
|
||||
title: "Shell handoff compatibility",
|
||||
@@ -310,6 +324,24 @@ assert.deepEqual(shellViewModel.shellSessionHandoffChecklist, {
|
||||
nextStepIds: ["open-control-page", "read-readonly-status"],
|
||||
blockingReasons: [],
|
||||
});
|
||||
assert.deepEqual(shellViewModel.shellSessionHandoffPackage, {
|
||||
apiName: "ini-panel-shell-session-handoff-package",
|
||||
packageVersion: 1,
|
||||
phase: "ready",
|
||||
ready: true,
|
||||
statusLine: "Ready: No blocking reasons",
|
||||
manifests: {
|
||||
shellIntegration: shellViewModel.shellIntegrationManifest,
|
||||
launchApi: shellViewModel.shellIntegrationManifest.launchApiManifest,
|
||||
controlPageApi: shellViewModel.shellIntegrationManifest.controlPageApiManifest,
|
||||
launchMethods: shellViewModel.shellIntegrationManifest.launchApiManifest.methods,
|
||||
controlPageMethods: shellViewModel.shellIntegrationManifest.controlPageApiManifest.methods,
|
||||
},
|
||||
snapshot: shellViewModel.shellSessionHandoffSnapshot,
|
||||
renderState: shellViewModel.shellSessionHandoffRenderState,
|
||||
actionPlan: shellViewModel.shellSessionHandoffActionPlan,
|
||||
checklist: shellViewModel.shellSessionHandoffChecklist,
|
||||
});
|
||||
assert.equal(
|
||||
isSupportedIniPanelShellIntegrationManifest(shellViewModel.shellIntegrationManifest),
|
||||
true,
|
||||
@@ -357,6 +389,7 @@ assert.equal(shellViewModel.createShellSessionHandoffSnapshot, createIniPanelShe
|
||||
assert.equal(shellViewModel.createShellSessionHandoffRenderState, createIniPanelShellSessionHandoffRenderState);
|
||||
assert.equal(shellViewModel.createShellSessionHandoffActionPlan, createIniPanelShellSessionHandoffActionPlan);
|
||||
assert.equal(shellViewModel.createShellSessionHandoffChecklist, createIniPanelShellSessionHandoffChecklist);
|
||||
assert.equal(shellViewModel.createShellSessionHandoffPackage, createIniPanelShellSessionHandoffPackage);
|
||||
assert.deepEqual(shellViewModel.controlPage.contract, createIniPanelShellControlPageContract());
|
||||
assert.equal(shellViewModel.controlPage.isSupportedBrowserApiManifest, isSupportedIniPanelControlPageApiManifest);
|
||||
assert.equal(shellViewModel.controlPage.loadSessionState, loadMachineSessionForControlPageWorkflow);
|
||||
|
||||
Reference in New Issue
Block a user