推进 INI 面板 shell handoff package mount-state
This commit is contained in:
@@ -87,6 +87,7 @@
|
||||
!launchApi?.getShellSessionHandoffPackageReport ||
|
||||
!launchApi?.getShellSessionHandoffPackageDisplayViewModel ||
|
||||
!launchApi?.getShellSessionHandoffPackageRenderState ||
|
||||
!launchApi?.getShellSessionHandoffPackageMountState ||
|
||||
!launchApi?.isSupportedShellSessionHandoffPackage ||
|
||||
!launchApi?.getLauncherLinks ||
|
||||
!launchApi?.getControlPageApiMethods
|
||||
@@ -127,7 +128,7 @@
|
||||
);
|
||||
assertEqual(
|
||||
launchApiManifest.methods.join(","),
|
||||
"isSupportedLaunchApiManifest,getLaunchApiSchema,getLaunchApiManifest,getShellIntegrationSchema,getShellIntegrationManifest,getShellIntegrationReadiness,getShellSessionHandoffSummarySchema,getShellSessionHandoffSummary,isSupportedShellSessionHandoffSummary,getShellSessionHandoffCompatibilityReport,getShellSessionHandoffDisplayViewModel,getShellSessionHandoffSnapshot,getShellSessionHandoffRenderState,getShellSessionHandoffActionPlan,getShellSessionHandoffChecklist,getShellSessionHandoffPackageSchema,getShellSessionHandoffPackage,getShellSessionHandoffPackageReport,getShellSessionHandoffPackageDisplayViewModel,getShellSessionHandoffPackageRenderState,isSupportedShellSessionHandoffPackage,getLauncherLinks,getControlPageApiMethods",
|
||||
"isSupportedLaunchApiManifest,getLaunchApiSchema,getLaunchApiManifest,getShellIntegrationSchema,getShellIntegrationManifest,getShellIntegrationReadiness,getShellSessionHandoffSummarySchema,getShellSessionHandoffSummary,isSupportedShellSessionHandoffSummary,getShellSessionHandoffCompatibilityReport,getShellSessionHandoffDisplayViewModel,getShellSessionHandoffSnapshot,getShellSessionHandoffRenderState,getShellSessionHandoffActionPlan,getShellSessionHandoffChecklist,getShellSessionHandoffPackageSchema,getShellSessionHandoffPackage,getShellSessionHandoffPackageReport,getShellSessionHandoffPackageDisplayViewModel,getShellSessionHandoffPackageRenderState,getShellSessionHandoffPackageMountState,isSupportedShellSessionHandoffPackage,getLauncherLinks,getControlPageApiMethods",
|
||||
"launch API manifest methods",
|
||||
);
|
||||
const shellIntegrationSchema = launchApi.getShellIntegrationSchema();
|
||||
@@ -146,6 +147,7 @@
|
||||
const shellSessionHandoffPackageReport = launchApi.getShellSessionHandoffPackageReport();
|
||||
const shellSessionHandoffPackageDisplayViewModel = launchApi.getShellSessionHandoffPackageDisplayViewModel();
|
||||
const shellSessionHandoffPackageRenderState = launchApi.getShellSessionHandoffPackageRenderState();
|
||||
const shellSessionHandoffPackageMountState = launchApi.getShellSessionHandoffPackageMountState();
|
||||
assertEqual(
|
||||
shellIntegrationSchema.manifestVersion,
|
||||
1,
|
||||
@@ -356,6 +358,31 @@
|
||||
shellSessionHandoffPackageDisplayViewModel.rows.length,
|
||||
"shell session handoff package render-state rows",
|
||||
);
|
||||
assertEqual(
|
||||
shellSessionHandoffPackageMountState.mountStateVersion,
|
||||
1,
|
||||
"shell session handoff package mount-state version",
|
||||
);
|
||||
assertEqual(
|
||||
shellSessionHandoffPackageMountState.packageReady,
|
||||
true,
|
||||
"shell session handoff package mount-state package readiness",
|
||||
);
|
||||
assertEqual(
|
||||
shellSessionHandoffPackageMountState.targetPage.href,
|
||||
"./control-page.html",
|
||||
"shell session handoff package mount-state target",
|
||||
);
|
||||
assertEqual(
|
||||
shellSessionHandoffPackageMountState.requiredMethods.readStatus,
|
||||
"readControlPageStatus",
|
||||
"shell session handoff package mount-state read method",
|
||||
);
|
||||
assertEqual(
|
||||
shellSessionHandoffPackageMountState.sessionLoadState.phase,
|
||||
"waiting-panel",
|
||||
"shell session handoff package mount-state default session",
|
||||
);
|
||||
assertEqual(
|
||||
shellSessionHandoffPackage.ready,
|
||||
true,
|
||||
|
||||
@@ -78,6 +78,7 @@ TOOL_TABLE = browser-shell-tool.tbl
|
||||
!launchApi?.getShellSessionHandoffPackageReport ||
|
||||
!launchApi?.getShellSessionHandoffPackageDisplayViewModel ||
|
||||
!launchApi?.getShellSessionHandoffPackageRenderState ||
|
||||
!launchApi?.getShellSessionHandoffPackageMountState ||
|
||||
!launchApi?.isSupportedShellSessionHandoffPackage
|
||||
) {
|
||||
throw new Error("launch API namespace did not expose shell integration helpers");
|
||||
@@ -98,6 +99,7 @@ TOOL_TABLE = browser-shell-tool.tbl
|
||||
const handoffPackageReport = launchApi.getShellSessionHandoffPackageReport();
|
||||
const handoffPackageDisplay = launchApi.getShellSessionHandoffPackageDisplayViewModel();
|
||||
const handoffPackageRenderState = launchApi.getShellSessionHandoffPackageRenderState();
|
||||
const handoffPackageMountState = launchApi.getShellSessionHandoffPackageMountState();
|
||||
assertEqual(handoffSummarySchema.summaryVersion, 1, "shell handoff summary schema version");
|
||||
assertEqual(
|
||||
launchApi.isSupportedShellSessionHandoffSummary(handoffSummary),
|
||||
@@ -157,6 +159,9 @@ TOOL_TABLE = browser-shell-tool.tbl
|
||||
handoffPackageDisplay.rows.length,
|
||||
"shell handoff package render-state rows",
|
||||
);
|
||||
assertEqual(handoffPackageMountState.packageReady, true, "shell handoff package mount-state package readiness");
|
||||
assertEqual(handoffPackageMountState.targetPage.href, "./control-page.html", "shell handoff package mount-state target");
|
||||
assertEqual(handoffPackageMountState.sessionLoadState.phase, "waiting-panel", "shell handoff package mount-state default session");
|
||||
assertEqual(handoffPackage.checklist.ready, handoffChecklist.ready, "shell handoff package checklist");
|
||||
assertEqual(
|
||||
handoffPackage.actionPlan.nextSteps.map(({ id }) => id).join(","),
|
||||
@@ -229,6 +234,11 @@ TOOL_TABLE = browser-shell-tool.tbl
|
||||
"ready",
|
||||
"shell integration control-page session readiness",
|
||||
);
|
||||
const readyMountState = launchApi.getShellSessionHandoffPackageMountState(
|
||||
controlPageApi[handoffSummary.handoffMethods.loadSessionState](),
|
||||
);
|
||||
assertEqual(readyMountState.ready, true, "shell handoff package mount-state readiness");
|
||||
assertEqual(readyMountState.sessionLoadState.phase, "ready", "shell handoff package mount-state ready session");
|
||||
assertEqual(
|
||||
controlPageApi[handoffSummary.handoffMethods.readStatus]().status.lastAction,
|
||||
null,
|
||||
|
||||
Reference in New Issue
Block a user