推进 INI 面板 shell handoff render-state
This commit is contained in:
@@ -20,6 +20,7 @@ import {
|
||||
createIniPanelShellIntegrationWorkflowPlan,
|
||||
createIniPanelShellSessionHandoffCompatibilityReport,
|
||||
createIniPanelShellSessionHandoffDisplayViewModel,
|
||||
createIniPanelShellSessionHandoffRenderState,
|
||||
createIniPanelShellSessionHandoffSnapshot,
|
||||
createIniPanelShellSessionHandoffSummary,
|
||||
createIniPanelShellSessionHandoffSummarySchema,
|
||||
@@ -73,6 +74,7 @@ const requiredShellExports = [
|
||||
"createIniPanelShellIntegrationWorkflowPlan",
|
||||
"createIniPanelShellSessionHandoffCompatibilityReport",
|
||||
"createIniPanelShellSessionHandoffDisplayViewModel",
|
||||
"createIniPanelShellSessionHandoffRenderState",
|
||||
"createIniPanelShellSessionHandoffSnapshot",
|
||||
"createIniPanelShellSessionHandoffSummary",
|
||||
"createIniPanelShellSessionHandoffSummarySchema",
|
||||
@@ -184,6 +186,10 @@ assert.deepEqual(
|
||||
displayViewModel: createIniPanelShellViewModel().shellSessionHandoffDisplayViewModel,
|
||||
}),
|
||||
);
|
||||
assert.deepEqual(
|
||||
createIniPanelShellViewModel().shellSessionHandoffRenderState,
|
||||
createIniPanelShellSessionHandoffRenderState(createIniPanelShellViewModel().shellSessionHandoffSnapshot),
|
||||
);
|
||||
assert.equal(isSupportedIniPanelShellIntegrationManifest(createIniPanelShellViewModel().shellIntegrationManifest), true);
|
||||
assert.deepEqual(createIniPanelShellViewModel().launchApiSchema, createIniPanelLaunchApiSchema());
|
||||
assert.deepEqual(createIniPanelShellViewModel().launchApiManifest, createIniPanelLaunchApiManifest());
|
||||
@@ -240,6 +246,7 @@ assert.match(shellText, /\bexport function createIniPanelShellIntegrationReadine
|
||||
assert.match(shellText, /\bexport function createIniPanelShellIntegrationWorkflowPlan\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffCompatibilityReport\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffDisplayViewModel\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffRenderState\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffSnapshot\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffSummary\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffSummarySchema\b/);
|
||||
@@ -264,6 +271,8 @@ assert.match(launchText, /\bisSupportedShellSessionHandoffSummary\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffCompatibilityReport\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffDisplayViewModel\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffSnapshot\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffRenderState\b/);
|
||||
assert.match(launchText, /\bdata-handoff-shell\b/);
|
||||
assert.match(launchText, /\bdata-handoff-status\b/);
|
||||
assert.match(launchText, /\bdata-handoff-rows\b/);
|
||||
assert.match(launchText, /\bgetControlPageApiMethods\b/);
|
||||
@@ -286,6 +295,7 @@ assert.match(docText, /\bcreateIniPanelShellIntegrationSchema\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellIntegrationWorkflowPlan\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffCompatibilityReport\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffDisplayViewModel\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffRenderState\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffSnapshot\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffSummary\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffSummarySchema\b/);
|
||||
@@ -305,6 +315,8 @@ assert.match(docText, /\blinuxCncIniPanelLaunchApi\.isSupportedShellSessionHando
|
||||
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getShellSessionHandoffCompatibilityReport\b/);
|
||||
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getShellSessionHandoffDisplayViewModel\b/);
|
||||
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getShellSessionHandoffSnapshot\b/);
|
||||
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getShellSessionHandoffRenderState\b/);
|
||||
assert.match(docText, /\bdata-handoff-shell\b/);
|
||||
assert.match(docText, /\bdata-handoff-status\b/);
|
||||
assert.match(docText, /\bdata-handoff-rows\b/);
|
||||
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getControlPageApiMethods\b/);
|
||||
@@ -316,6 +328,7 @@ assert.match(shellIntegrationWorkflowSmokeText, /\bisSupportedShellSessionHandof
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellSessionHandoffCompatibilityReport\b/);
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellSessionHandoffDisplayViewModel\b/);
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellSessionHandoffSnapshot\b/);
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\bgetShellSessionHandoffRenderState\b/);
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\bhandoffSummary\.handoffMethods\.readStatus\b/);
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\breadControlPageStatus\b/);
|
||||
assert.match(shellIntegrationWorkflowSmokeText, /\bbrowser_ini_shell_integration_workflow_smoke=ok\b/);
|
||||
|
||||
@@ -52,6 +52,7 @@ assert.deepEqual(manifest, {
|
||||
"getShellSessionHandoffCompatibilityReport",
|
||||
"getShellSessionHandoffDisplayViewModel",
|
||||
"getShellSessionHandoffSnapshot",
|
||||
"getShellSessionHandoffRenderState",
|
||||
"getLauncherLinks",
|
||||
"getControlPageApiMethods",
|
||||
],
|
||||
@@ -158,6 +159,7 @@ assert.match(launchText, /\bisSupportedShellSessionHandoffSummary\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffCompatibilityReport\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffDisplayViewModel\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffSnapshot\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffRenderState\b/);
|
||||
assert.match(launchText, /\blinuxCncIniPanelLaunchApi\b/);
|
||||
|
||||
console.log("ini_panel_launch_api_manifest_node_smoke=ok");
|
||||
|
||||
@@ -16,6 +16,7 @@ import {
|
||||
createIniPanelShellIntegrationWorkflowPlan,
|
||||
createIniPanelShellSessionHandoffCompatibilityReport,
|
||||
createIniPanelShellSessionHandoffDisplayViewModel,
|
||||
createIniPanelShellSessionHandoffRenderState,
|
||||
createIniPanelShellSessionHandoffSnapshot,
|
||||
createIniPanelShellSessionHandoffSummary,
|
||||
createIniPanelShellSessionHandoffSummarySchema,
|
||||
@@ -44,6 +45,7 @@ const handoffSnapshot = createIniPanelShellSessionHandoffSnapshot({
|
||||
compatibilityReport: handoffCompatibilityReport,
|
||||
displayViewModel: handoffDisplayViewModel,
|
||||
});
|
||||
const handoffRenderState = createIniPanelShellSessionHandoffRenderState(handoffSnapshot);
|
||||
|
||||
assert.deepEqual(schema, {
|
||||
apiName: "ini-panel-shell-integration",
|
||||
@@ -99,7 +101,7 @@ assert.deepEqual(readiness, {
|
||||
counts: {
|
||||
pages: 2,
|
||||
launcherLinks: 2,
|
||||
launchMethods: 14,
|
||||
launchMethods: 15,
|
||||
controlPageMethods: 11,
|
||||
persistenceCapabilities: 3,
|
||||
},
|
||||
@@ -161,7 +163,7 @@ assert.deepEqual(handoffSummary, {
|
||||
counts: {
|
||||
pages: 2,
|
||||
launcherLinks: 2,
|
||||
launchMethods: 14,
|
||||
launchMethods: 15,
|
||||
controlPageMethods: 11,
|
||||
persistenceCapabilities: 3,
|
||||
},
|
||||
@@ -310,7 +312,23 @@ assert.deepEqual(handoffSnapshot, {
|
||||
compatibilityReport: handoffCompatibilityReport,
|
||||
displayViewModel: handoffDisplayViewModel,
|
||||
});
|
||||
assert.deepEqual(handoffRenderState, {
|
||||
apiName: "ini-panel-shell-session-handoff-render-state",
|
||||
renderStateVersion: 1,
|
||||
phase: "ready",
|
||||
ready: true,
|
||||
title: "Shell handoff compatibility",
|
||||
statusText: "Ready",
|
||||
detailText: "No blocking reasons",
|
||||
statusLine: "Ready: No blocking reasons",
|
||||
rows: handoffDisplayViewModel.rows,
|
||||
dataset: {
|
||||
handoffPhase: "ready",
|
||||
handoffReady: "true",
|
||||
},
|
||||
});
|
||||
assert.equal(createIniPanelShellSessionHandoffSnapshot().displayViewModel.rows.length, 5);
|
||||
assert.equal(createIniPanelShellSessionHandoffRenderState().statusLine, "Ready: No blocking reasons");
|
||||
assert.deepEqual(
|
||||
createIniPanelShellSessionHandoffDisplayViewModel(
|
||||
createIniPanelShellSessionHandoffCompatibilityReport({ ...handoffSummary, summaryVersion: 2 }),
|
||||
@@ -348,6 +366,55 @@ assert.deepEqual(
|
||||
createIniPanelShellSessionHandoffCompatibilityReport(null).missingFields,
|
||||
handoffSummarySchema.fields,
|
||||
);
|
||||
assert.deepEqual(
|
||||
createIniPanelShellSessionHandoffRenderState(createIniPanelShellSessionHandoffSnapshot({
|
||||
compatibilityReport: createIniPanelShellSessionHandoffCompatibilityReport({
|
||||
...handoffSummary,
|
||||
summaryVersion: 2,
|
||||
}),
|
||||
})),
|
||||
{
|
||||
apiName: "ini-panel-shell-session-handoff-render-state",
|
||||
renderStateVersion: 1,
|
||||
phase: "blocked",
|
||||
ready: false,
|
||||
title: "Shell handoff compatibility",
|
||||
statusText: "Blocked",
|
||||
detailText: "summaryVersion",
|
||||
statusLine: "Blocked: summaryVersion",
|
||||
rows: [
|
||||
{
|
||||
id: "summary-supported",
|
||||
label: "Summary schema",
|
||||
value: "blocked",
|
||||
},
|
||||
{
|
||||
id: "handoff-ready",
|
||||
label: "Handoff readiness",
|
||||
value: "blocked",
|
||||
},
|
||||
{
|
||||
id: "missing-fields",
|
||||
label: "Missing fields",
|
||||
value: "none",
|
||||
},
|
||||
{
|
||||
id: "mismatch-fields",
|
||||
label: "Mismatched fields",
|
||||
value: "summaryVersion",
|
||||
},
|
||||
{
|
||||
id: "blocking-reasons",
|
||||
label: "Blocking reasons",
|
||||
value: "none",
|
||||
},
|
||||
],
|
||||
dataset: {
|
||||
handoffPhase: "blocked",
|
||||
handoffReady: "false",
|
||||
},
|
||||
},
|
||||
);
|
||||
const blockedManifest = {
|
||||
...createIniPanelShellIntegrationManifest(),
|
||||
compatibility: {
|
||||
@@ -369,7 +436,7 @@ assert.deepEqual(createIniPanelShellIntegrationReadiness(blockedManifest), {
|
||||
counts: {
|
||||
pages: 2,
|
||||
launcherLinks: 2,
|
||||
launchMethods: 14,
|
||||
launchMethods: 15,
|
||||
controlPageMethods: 11,
|
||||
persistenceCapabilities: 3,
|
||||
},
|
||||
@@ -514,6 +581,7 @@ assert.match(shellText, /\bexport function createIniPanelShellIntegrationReadine
|
||||
assert.match(shellText, /\bexport function createIniPanelShellIntegrationWorkflowPlan\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffCompatibilityReport\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffDisplayViewModel\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffRenderState\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffSnapshot\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffSummary\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffSummarySchema\b/);
|
||||
@@ -527,6 +595,7 @@ assert.match(docText, /\bcreateIniPanelShellIntegrationReadiness\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellIntegrationWorkflowPlan\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffCompatibilityReport\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffDisplayViewModel\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffRenderState\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffSnapshot\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffSummary\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffSummarySchema\b/);
|
||||
|
||||
@@ -16,6 +16,7 @@ import {
|
||||
createIniPanelShellIntegrationWorkflowPlan,
|
||||
createIniPanelShellSessionHandoffCompatibilityReport,
|
||||
createIniPanelShellSessionHandoffDisplayViewModel,
|
||||
createIniPanelShellSessionHandoffRenderState,
|
||||
createIniPanelShellSessionHandoffSnapshot,
|
||||
createIniPanelShellSessionHandoffSummary,
|
||||
createIniPanelShellSessionHandoffSummarySchema,
|
||||
@@ -74,6 +75,7 @@ assert.equal(typeof createIniPanelShellIntegrationSchema, "function");
|
||||
assert.equal(typeof createIniPanelShellIntegrationWorkflowPlan, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffCompatibilityReport, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffDisplayViewModel, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffRenderState, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffSnapshot, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffSummary, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffSummarySchema, "function");
|
||||
@@ -161,6 +163,10 @@ assert.deepEqual(
|
||||
displayViewModel: shellViewModel.shellSessionHandoffDisplayViewModel,
|
||||
}),
|
||||
);
|
||||
assert.deepEqual(
|
||||
shellViewModel.shellSessionHandoffRenderState,
|
||||
createIniPanelShellSessionHandoffRenderState(shellViewModel.shellSessionHandoffSnapshot),
|
||||
);
|
||||
assert.deepEqual(shellViewModel.shellSessionHandoffDisplayViewModel, {
|
||||
phase: "ready",
|
||||
title: "Shell handoff compatibility",
|
||||
@@ -194,6 +200,21 @@ assert.deepEqual(shellViewModel.shellSessionHandoffDisplayViewModel, {
|
||||
},
|
||||
],
|
||||
});
|
||||
assert.deepEqual(shellViewModel.shellSessionHandoffRenderState, {
|
||||
apiName: "ini-panel-shell-session-handoff-render-state",
|
||||
renderStateVersion: 1,
|
||||
phase: "ready",
|
||||
ready: true,
|
||||
title: "Shell handoff compatibility",
|
||||
statusText: "Ready",
|
||||
detailText: "No blocking reasons",
|
||||
statusLine: "Ready: No blocking reasons",
|
||||
rows: shellViewModel.shellSessionHandoffDisplayViewModel.rows,
|
||||
dataset: {
|
||||
handoffPhase: "ready",
|
||||
handoffReady: "true",
|
||||
},
|
||||
});
|
||||
assert.equal(
|
||||
isSupportedIniPanelShellIntegrationManifest(shellViewModel.shellIntegrationManifest),
|
||||
true,
|
||||
@@ -238,6 +259,7 @@ assert.equal(
|
||||
createIniPanelShellSessionHandoffDisplayViewModel,
|
||||
);
|
||||
assert.equal(shellViewModel.createShellSessionHandoffSnapshot, createIniPanelShellSessionHandoffSnapshot);
|
||||
assert.equal(shellViewModel.createShellSessionHandoffRenderState, createIniPanelShellSessionHandoffRenderState);
|
||||
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