推进 INI 面板 shell handoff mount-state display
This commit is contained in:
@@ -24,6 +24,8 @@ import {
|
||||
createIniPanelShellSessionHandoffDisplayViewModel,
|
||||
createIniPanelShellSessionHandoffPackage,
|
||||
createIniPanelShellSessionHandoffPackageDisplayViewModel,
|
||||
createIniPanelShellSessionHandoffPackageMountDisplayViewModel,
|
||||
createIniPanelShellSessionHandoffPackageMountRenderState,
|
||||
createIniPanelShellSessionHandoffPackageMountState,
|
||||
createIniPanelShellSessionHandoffPackageReport,
|
||||
createIniPanelShellSessionHandoffPackageRenderState,
|
||||
@@ -87,6 +89,8 @@ const requiredShellExports = [
|
||||
"createIniPanelShellSessionHandoffDisplayViewModel",
|
||||
"createIniPanelShellSessionHandoffPackage",
|
||||
"createIniPanelShellSessionHandoffPackageDisplayViewModel",
|
||||
"createIniPanelShellSessionHandoffPackageMountDisplayViewModel",
|
||||
"createIniPanelShellSessionHandoffPackageMountRenderState",
|
||||
"createIniPanelShellSessionHandoffPackageMountState",
|
||||
"createIniPanelShellSessionHandoffPackageReport",
|
||||
"createIniPanelShellSessionHandoffPackageRenderState",
|
||||
@@ -261,6 +265,18 @@ assert.deepEqual(
|
||||
packageRenderState: createIniPanelShellViewModel().shellSessionHandoffPackageRenderState,
|
||||
}),
|
||||
);
|
||||
assert.deepEqual(
|
||||
createIniPanelShellViewModel().shellSessionHandoffPackageMountDisplayViewModel,
|
||||
createIniPanelShellSessionHandoffPackageMountDisplayViewModel(
|
||||
createIniPanelShellViewModel().shellSessionHandoffPackageMountState,
|
||||
),
|
||||
);
|
||||
assert.deepEqual(
|
||||
createIniPanelShellViewModel().shellSessionHandoffPackageMountRenderState,
|
||||
createIniPanelShellSessionHandoffPackageMountRenderState(
|
||||
createIniPanelShellViewModel().shellSessionHandoffPackageMountDisplayViewModel,
|
||||
),
|
||||
);
|
||||
assert.equal(isSupportedIniPanelShellSessionHandoffPackage(createIniPanelShellViewModel().shellSessionHandoffPackage), true);
|
||||
assert.equal(isSupportedIniPanelShellIntegrationManifest(createIniPanelShellViewModel().shellIntegrationManifest), true);
|
||||
assert.deepEqual(createIniPanelShellViewModel().launchApiSchema, createIniPanelLaunchApiSchema());
|
||||
|
||||
@@ -61,6 +61,8 @@ assert.deepEqual(manifest, {
|
||||
"getShellSessionHandoffPackageDisplayViewModel",
|
||||
"getShellSessionHandoffPackageRenderState",
|
||||
"getShellSessionHandoffPackageMountState",
|
||||
"getShellSessionHandoffPackageMountDisplayViewModel",
|
||||
"getShellSessionHandoffPackageMountRenderState",
|
||||
"isSupportedShellSessionHandoffPackage",
|
||||
"getLauncherLinks",
|
||||
"getControlPageApiMethods",
|
||||
@@ -177,6 +179,8 @@ assert.match(launchText, /\bgetShellSessionHandoffPackageReport\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffPackageDisplayViewModel\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffPackageRenderState\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffPackageMountState\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffPackageMountDisplayViewModel\b/);
|
||||
assert.match(launchText, /\bgetShellSessionHandoffPackageMountRenderState\b/);
|
||||
assert.match(launchText, /\bisSupportedShellSessionHandoffPackage\b/);
|
||||
assert.match(launchText, /\blinuxCncIniPanelLaunchApi\b/);
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ import {
|
||||
createIniPanelShellSessionHandoffDisplayViewModel,
|
||||
createIniPanelShellSessionHandoffPackage,
|
||||
createIniPanelShellSessionHandoffPackageDisplayViewModel,
|
||||
createIniPanelShellSessionHandoffPackageMountDisplayViewModel,
|
||||
createIniPanelShellSessionHandoffPackageMountRenderState,
|
||||
createIniPanelShellSessionHandoffPackageMountState,
|
||||
createIniPanelShellSessionHandoffPackageReport,
|
||||
createIniPanelShellSessionHandoffPackageRenderState,
|
||||
@@ -85,6 +87,12 @@ const handoffPackageMountState = createIniPanelShellSessionHandoffPackageMountSt
|
||||
handoffPackage,
|
||||
packageRenderState: handoffPackageRenderState,
|
||||
});
|
||||
const handoffPackageMountDisplayViewModel = createIniPanelShellSessionHandoffPackageMountDisplayViewModel(
|
||||
handoffPackageMountState,
|
||||
);
|
||||
const handoffPackageMountRenderState = createIniPanelShellSessionHandoffPackageMountRenderState(
|
||||
handoffPackageMountDisplayViewModel,
|
||||
);
|
||||
|
||||
assert.deepEqual(schema, {
|
||||
apiName: "ini-panel-shell-integration",
|
||||
@@ -140,7 +148,7 @@ assert.deepEqual(readiness, {
|
||||
counts: {
|
||||
pages: 2,
|
||||
launcherLinks: 2,
|
||||
launchMethods: 24,
|
||||
launchMethods: 26,
|
||||
controlPageMethods: 11,
|
||||
persistenceCapabilities: 3,
|
||||
},
|
||||
@@ -202,7 +210,7 @@ assert.deepEqual(handoffSummary, {
|
||||
counts: {
|
||||
pages: 2,
|
||||
launcherLinks: 2,
|
||||
launchMethods: 24,
|
||||
launchMethods: 26,
|
||||
controlPageMethods: 11,
|
||||
persistenceCapabilities: 3,
|
||||
},
|
||||
@@ -635,6 +643,29 @@ assert.deepEqual(handoffPackageMountState, {
|
||||
},
|
||||
],
|
||||
});
|
||||
assert.deepEqual(handoffPackageMountDisplayViewModel, {
|
||||
phase: "blocked",
|
||||
title: "Shell handoff mount",
|
||||
statusText: "Blocked",
|
||||
detailText: "session-load-state",
|
||||
rows: handoffPackageMountState.checks,
|
||||
});
|
||||
assert.deepEqual(handoffPackageMountRenderState, {
|
||||
apiName: "ini-panel-shell-session-handoff-package-mount-render-state",
|
||||
renderStateVersion: 1,
|
||||
phase: "blocked",
|
||||
ready: false,
|
||||
title: "Shell handoff mount",
|
||||
statusText: "Blocked",
|
||||
detailText: "session-load-state",
|
||||
statusLine: "Blocked: session-load-state",
|
||||
rows: handoffPackageMountDisplayViewModel.rows,
|
||||
dataset: {
|
||||
handoffPhase: "blocked",
|
||||
handoffReady: "false",
|
||||
handoffScope: "mount",
|
||||
},
|
||||
});
|
||||
assert.deepEqual(
|
||||
createIniPanelShellSessionHandoffPackageMountState({
|
||||
handoffPackage,
|
||||
@@ -675,6 +706,38 @@ assert.deepEqual(
|
||||
},
|
||||
],
|
||||
);
|
||||
const readyMountState = createIniPanelShellSessionHandoffPackageMountState({
|
||||
handoffPackage,
|
||||
packageRenderState: handoffPackageRenderState,
|
||||
sessionLoadState: createControlPageSessionLoadState({
|
||||
phase: "ready",
|
||||
panelReady: true,
|
||||
apiReady: true,
|
||||
controlViewReady: true,
|
||||
controlView: { status: { runStatus: "not-run" } },
|
||||
}),
|
||||
});
|
||||
assert.deepEqual(
|
||||
createIniPanelShellSessionHandoffPackageMountRenderState(
|
||||
createIniPanelShellSessionHandoffPackageMountDisplayViewModel(readyMountState),
|
||||
),
|
||||
{
|
||||
apiName: "ini-panel-shell-session-handoff-package-mount-render-state",
|
||||
renderStateVersion: 1,
|
||||
phase: "ready",
|
||||
ready: true,
|
||||
title: "Shell handoff mount",
|
||||
statusText: "Ready",
|
||||
detailText: "No blocking reasons",
|
||||
statusLine: "Ready: No blocking reasons",
|
||||
rows: readyMountState.checks,
|
||||
dataset: {
|
||||
handoffPhase: "ready",
|
||||
handoffReady: "true",
|
||||
handoffScope: "mount",
|
||||
},
|
||||
},
|
||||
);
|
||||
assert.equal(isSupportedIniPanelShellSessionHandoffPackage(handoffPackage), true);
|
||||
assert.equal(
|
||||
isSupportedIniPanelShellSessionHandoffPackage({ ...handoffPackage, packageVersion: 2 }),
|
||||
@@ -1014,7 +1077,7 @@ assert.deepEqual(createIniPanelShellIntegrationReadiness(blockedManifest), {
|
||||
counts: {
|
||||
pages: 2,
|
||||
launcherLinks: 2,
|
||||
launchMethods: 24,
|
||||
launchMethods: 26,
|
||||
controlPageMethods: 11,
|
||||
persistenceCapabilities: 3,
|
||||
},
|
||||
@@ -1180,6 +1243,8 @@ assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffComp
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffDisplayViewModel\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackage\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackageDisplayViewModel\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackageMountDisplayViewModel\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackageMountRenderState\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackageMountState\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackageReport\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelShellSessionHandoffPackageRenderState\b/);
|
||||
@@ -1203,6 +1268,8 @@ assert.match(docText, /\bcreateIniPanelShellSessionHandoffCompatibilityReport\b/
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffDisplayViewModel\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackage\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackageDisplayViewModel\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackageMountDisplayViewModel\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackageMountRenderState\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackageMountState\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackageReport\b/);
|
||||
assert.match(docText, /\bcreateIniPanelShellSessionHandoffPackageRenderState\b/);
|
||||
|
||||
@@ -20,6 +20,8 @@ import {
|
||||
createIniPanelShellSessionHandoffDisplayViewModel,
|
||||
createIniPanelShellSessionHandoffPackage,
|
||||
createIniPanelShellSessionHandoffPackageDisplayViewModel,
|
||||
createIniPanelShellSessionHandoffPackageMountDisplayViewModel,
|
||||
createIniPanelShellSessionHandoffPackageMountRenderState,
|
||||
createIniPanelShellSessionHandoffPackageMountState,
|
||||
createIniPanelShellSessionHandoffPackageReport,
|
||||
createIniPanelShellSessionHandoffPackageRenderState,
|
||||
@@ -88,6 +90,8 @@ assert.equal(typeof createIniPanelShellSessionHandoffCompatibilityReport, "funct
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffDisplayViewModel, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffPackage, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffPackageDisplayViewModel, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffPackageMountDisplayViewModel, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffPackageMountRenderState, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffPackageMountState, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffPackageReport, "function");
|
||||
assert.equal(typeof createIniPanelShellSessionHandoffPackageRenderState, "function");
|
||||
@@ -231,6 +235,16 @@ assert.deepEqual(
|
||||
packageRenderState: shellViewModel.shellSessionHandoffPackageRenderState,
|
||||
}),
|
||||
);
|
||||
assert.deepEqual(
|
||||
shellViewModel.shellSessionHandoffPackageMountDisplayViewModel,
|
||||
createIniPanelShellSessionHandoffPackageMountDisplayViewModel(shellViewModel.shellSessionHandoffPackageMountState),
|
||||
);
|
||||
assert.deepEqual(
|
||||
shellViewModel.shellSessionHandoffPackageMountRenderState,
|
||||
createIniPanelShellSessionHandoffPackageMountRenderState(
|
||||
shellViewModel.shellSessionHandoffPackageMountDisplayViewModel,
|
||||
),
|
||||
);
|
||||
assert.equal(isSupportedIniPanelShellSessionHandoffPackage(shellViewModel.shellSessionHandoffPackage), true);
|
||||
assert.deepEqual(shellViewModel.shellSessionHandoffDisplayViewModel, {
|
||||
phase: "ready",
|
||||
@@ -527,6 +541,29 @@ assert.deepEqual(shellViewModel.shellSessionHandoffPackageMountState, {
|
||||
},
|
||||
],
|
||||
});
|
||||
assert.deepEqual(shellViewModel.shellSessionHandoffPackageMountDisplayViewModel, {
|
||||
phase: "blocked",
|
||||
title: "Shell handoff mount",
|
||||
statusText: "Blocked",
|
||||
detailText: "session-load-state",
|
||||
rows: shellViewModel.shellSessionHandoffPackageMountState.checks,
|
||||
});
|
||||
assert.deepEqual(shellViewModel.shellSessionHandoffPackageMountRenderState, {
|
||||
apiName: "ini-panel-shell-session-handoff-package-mount-render-state",
|
||||
renderStateVersion: 1,
|
||||
phase: "blocked",
|
||||
ready: false,
|
||||
title: "Shell handoff mount",
|
||||
statusText: "Blocked",
|
||||
detailText: "session-load-state",
|
||||
statusLine: "Blocked: session-load-state",
|
||||
rows: shellViewModel.shellSessionHandoffPackageMountDisplayViewModel.rows,
|
||||
dataset: {
|
||||
handoffPhase: "blocked",
|
||||
handoffReady: "false",
|
||||
handoffScope: "mount",
|
||||
},
|
||||
});
|
||||
assert.equal(
|
||||
createIniPanelShellSessionHandoffPackageMountState({
|
||||
handoffPackage: shellViewModel.shellSessionHandoffPackage,
|
||||
@@ -541,6 +578,20 @@ assert.equal(
|
||||
}).ready,
|
||||
true,
|
||||
);
|
||||
assert.deepEqual(
|
||||
createIniPanelShellSessionHandoffPackageMountDisplayViewModel(createIniPanelShellSessionHandoffPackageMountState({
|
||||
handoffPackage: shellViewModel.shellSessionHandoffPackage,
|
||||
packageRenderState: shellViewModel.shellSessionHandoffPackageRenderState,
|
||||
sessionLoadState: createControlPageSessionLoadState({
|
||||
phase: "ready",
|
||||
panelReady: true,
|
||||
apiReady: true,
|
||||
controlViewReady: true,
|
||||
controlView: { status: { runStatus: "not-run" } },
|
||||
}),
|
||||
})).detailText,
|
||||
"No blocking reasons",
|
||||
);
|
||||
assert.equal(
|
||||
isSupportedIniPanelShellIntegrationManifest(shellViewModel.shellIntegrationManifest),
|
||||
true,
|
||||
@@ -601,6 +652,14 @@ assert.equal(
|
||||
shellViewModel.createShellSessionHandoffPackageMountState,
|
||||
createIniPanelShellSessionHandoffPackageMountState,
|
||||
);
|
||||
assert.equal(
|
||||
shellViewModel.createShellSessionHandoffPackageMountDisplayViewModel,
|
||||
createIniPanelShellSessionHandoffPackageMountDisplayViewModel,
|
||||
);
|
||||
assert.equal(
|
||||
shellViewModel.createShellSessionHandoffPackageMountRenderState,
|
||||
createIniPanelShellSessionHandoffPackageMountRenderState,
|
||||
);
|
||||
assert.equal(shellViewModel.createShellSessionHandoffPackageReport, createIniPanelShellSessionHandoffPackageReport);
|
||||
assert.equal(shellViewModel.createShellSessionHandoffPackageSchema, createIniPanelShellSessionHandoffPackageSchema);
|
||||
assert.equal(shellViewModel.isSupportedShellSessionHandoffPackage, isSupportedIniPanelShellSessionHandoffPackage);
|
||||
|
||||
Reference in New Issue
Block a user