推进 INI 面板 shell handoff mount workflow helper
This commit is contained in:
73
text12.txt
73
text12.txt
@@ -2795,3 +2795,76 @@ host_wasm_opfs_browser_smokes=ok
|
||||
可复用的 browser-side mount workflow helper(例如 `mountIniPanelShellSessionHandoff()`),让外部
|
||||
shell 一次调用即可完成 contract 生成、DOM readiness、mount-state render 与 structured result;仍
|
||||
保持只读,不新增控制按钮,不解析 G-code。
|
||||
|
||||
三十五、2026-06-15 继续执行记录:INI panel shell handoff mount workflow helper
|
||||
|
||||
本轮按“第一原则:加快实质性推进”继续推进 SDK/API surface 与 browser/UI workflow,把 shell
|
||||
handoff mount DOM contract/readiness/render 三步聚合为一个可复用 browser-side workflow helper,
|
||||
让外部 shell 一次调用即可获得 structured mount result。
|
||||
|
||||
完成内容:
|
||||
|
||||
- `ui-shell.js` 新增 `mountIniPanelShellSessionHandoff()`;
|
||||
- 新 helper 返回 `apiName`、`workflowVersion`、`phase`、`ready`、`statusLine`、`contract`、
|
||||
`domReadiness`、`renderState`、`renderResult` 与 `error`;
|
||||
- DOM 未 ready 时,新 helper 返回 structured blocked result,不把 renderer error 抛给外部 shell;
|
||||
- DOM ready 时,新 helper 复用 `renderIniPanelShellSessionHandoffMountState()` 并返回 renderer result;
|
||||
- `createIniPanelShellViewModel()` 暴露 `mountShellSessionHandoff`;
|
||||
- `createIniPanelLaunchApiManifest().methods` 新增 `mountShellSessionHandoff`,launch method count 更新为 30;
|
||||
- `launch.html` 的 `window.linuxCncIniPanelLaunchApi.mountShellSessionHandoff()` 暴露真实 browser API;
|
||||
- `ini_panel_shell_integration_workflow_smoke.html` 改为通过 shared mount workflow 渲染 waiting/ready
|
||||
mount-state,并校验 workflow phase 与 DOM readiness;
|
||||
- Node smoke 覆盖 workflow helper 的 blocked、missing DOM 与 rendered result 路径;
|
||||
- 文档同步记录 browser-side mount workflow 用法;
|
||||
- 未新增控制按钮;
|
||||
- 未解析 G-code;
|
||||
- 未解释 canonical events;
|
||||
- 未新增 JS CNC 语义;
|
||||
- 未改变 OPFS/session persistence、LinuxCNC interpreter、tool、parameter、planner 或
|
||||
LinuxCNC-owned runtime semantics。
|
||||
|
||||
验证已通过:
|
||||
|
||||
```bash
|
||||
git diff --check
|
||||
wasm-port/tests/ui/node/verify_ini_panel_ui_shell.sh
|
||||
wasm-port/tests/ui/node/verify_ini_panel_launch_api_manifest.sh
|
||||
wasm-port/tests/ui/node/verify_ini_panel_shell_integration_manifest.sh
|
||||
wasm-port/tests/ui/node/verify_ini_panel_entry_docs.sh
|
||||
wasm-port/tests/ui/node/verify_ui_node_smokes.sh
|
||||
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_ini_panel_browser.sh
|
||||
wasm-port/tools/verify_vendor_sync.sh
|
||||
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
|
||||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_interp_wasm.sh
|
||||
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
|
||||
wasm-port/tests/host/verify_host_smokes.sh
|
||||
```
|
||||
|
||||
关键输出:
|
||||
|
||||
```text
|
||||
ini_panel_ui_shell_node_smoke=ok
|
||||
ini_panel_launch_api_manifest_node_smoke=ok
|
||||
ini_panel_shell_integration_manifest_node_smoke=ok
|
||||
ini_panel_entry_docs_node_smoke=ok
|
||||
ui_node_smokes=ok
|
||||
browser_ini_opfs_smoke=ok
|
||||
browser_ini_control_page_smoke=ok
|
||||
browser_ini_launch_smoke=ok
|
||||
browser_ini_shell_integration_workflow_smoke=ok
|
||||
vendor sync up to date
|
||||
standalone CNC semantics guard complete
|
||||
interp_wasm_node_smoke=ok
|
||||
sim_configs_wasm_node_inventory_executed=28
|
||||
sim_configs_wasm_node_inventory_passed=28
|
||||
sim_configs_wasm_node_inventory_skipped=131
|
||||
sim_configs_wasm_node_inventory_unexpected_fail=0
|
||||
host_wasm_opfs_browser_smokes=ok
|
||||
```
|
||||
|
||||
下一步建议:
|
||||
|
||||
继续推进 SDK/API surface。下一批建议为 shell handoff mount workflow 增加 session-load helper 接口
|
||||
(例如 `mountIniPanelShellSessionHandoffFromControlPage()`),让外部 shell 可以把 control-page API
|
||||
或 session-load state 传入后一次生成 mount-state、render-state 与 DOM workflow result;仍保持只读,
|
||||
不新增控制按钮,不解析 G-code。
|
||||
|
||||
@@ -32,6 +32,7 @@ import {
|
||||
createIniPanelShellSessionHandoffPackageMountState,
|
||||
createIniPanelShellSessionHandoffMountDomContract,
|
||||
createIniPanelShellSessionHandoffMountDomReadiness,
|
||||
mountIniPanelShellSessionHandoff,
|
||||
renderIniPanelShellSessionHandoffMountState,
|
||||
createIniPanelShellSessionHandoffPackageReport,
|
||||
createIniPanelShellSessionHandoffPackageRenderState,
|
||||
@@ -235,6 +236,10 @@ row dataset keys, and render-result fields before rendering into shell-owned
|
||||
DOM. Use `createIniPanelShellSessionHandoffMountDomReadiness()` or
|
||||
`linuxCncIniPanelLaunchApi.getShellSessionHandoffMountDomReadiness()` to check
|
||||
that the required document and nodes exist before calling the renderer. Use
|
||||
`mountIniPanelShellSessionHandoff()` or
|
||||
`linuxCncIniPanelLaunchApi.mountShellSessionHandoff()` when an outer shell
|
||||
needs one browser-side workflow result containing the contract, DOM readiness,
|
||||
mount render-state, renderer result, and any mount error as data. Use
|
||||
`renderIniPanelShellSessionHandoffMountState()` or
|
||||
`linuxCncIniPanelLaunchApi.renderShellSessionHandoffMountState()` when an outer
|
||||
shell needs the shared read-only DOM renderer for those rows. The launch page
|
||||
@@ -244,9 +249,9 @@ the control page.
|
||||
The browser workflow smoke
|
||||
`tests/browser/ini_panel_shell_integration_workflow_smoke.html` verifies the
|
||||
same external shell handoff: read integration manifest, pass readiness gate,
|
||||
open the control page target, render waiting and ready mount-state into an
|
||||
external shell-owned `[data-external-shell-mount]` DOM region, then read
|
||||
readonly machine-session status.
|
||||
open the control page target, mount waiting and ready mount-state into an
|
||||
external shell-owned `[data-external-shell-mount]` DOM region through the shared
|
||||
mount workflow, then read readonly machine-session status.
|
||||
|
||||
The control-page refresh workflow lives in
|
||||
`runtime/ui/ini-panel/control-page-refresh-workflow.js`. Use
|
||||
|
||||
@@ -108,6 +108,7 @@
|
||||
isSupportedIniPanelLaunchApiManifest,
|
||||
createIniPanelShellSessionHandoffMountDomContract,
|
||||
createIniPanelShellSessionHandoffMountDomReadiness,
|
||||
mountIniPanelShellSessionHandoff,
|
||||
renderIniPanelShellSessionHandoffMountState,
|
||||
} from "./ui-shell.js";
|
||||
|
||||
@@ -191,6 +192,12 @@
|
||||
renderShellSessionHandoffMountState: (renderState, options) => (
|
||||
renderIniPanelShellSessionHandoffMountState(renderState, options ?? { documentRef: document })
|
||||
),
|
||||
mountShellSessionHandoff: (options) => (
|
||||
mountIniPanelShellSessionHandoff(options ?? {
|
||||
renderState: shellViewModel.shellSessionHandoffPackageMountRenderState,
|
||||
documentRef: document,
|
||||
})
|
||||
),
|
||||
isSupportedShellSessionHandoffPackage: shellViewModel.isSupportedShellSessionHandoffPackage,
|
||||
getLauncherLinks: () => shellViewModel.launcherLinks,
|
||||
getControlPageApiMethods: () => shellViewModel.controlPage.browserApiMethods,
|
||||
|
||||
@@ -146,6 +146,7 @@ export function createIniPanelLaunchApiManifest(entries = getVisibleIniPanelEntr
|
||||
"getShellSessionHandoffMountDomContract",
|
||||
"getShellSessionHandoffMountDomReadiness",
|
||||
"renderShellSessionHandoffMountState",
|
||||
"mountShellSessionHandoff",
|
||||
"isSupportedShellSessionHandoffPackage",
|
||||
"getLauncherLinks",
|
||||
"getControlPageApiMethods",
|
||||
@@ -1195,6 +1196,73 @@ export function renderIniPanelShellSessionHandoffMountState(
|
||||
};
|
||||
}
|
||||
|
||||
export function mountIniPanelShellSessionHandoff({
|
||||
renderState = createIniPanelShellSessionHandoffPackageMountRenderState(),
|
||||
rowDatasetPrefix = "handoffMount",
|
||||
contract = createIniPanelShellSessionHandoffMountDomContract({ rowDatasetPrefix }),
|
||||
documentRef = globalThis.document,
|
||||
mountNode = documentRef?.querySelector?.(contract.selectors.mount),
|
||||
statusNode = documentRef?.querySelector?.(contract.selectors.status),
|
||||
rowsNode = documentRef?.querySelector?.(contract.selectors.rows),
|
||||
} = {}) {
|
||||
const domReadiness = createIniPanelShellSessionHandoffMountDomReadiness({
|
||||
contract,
|
||||
documentRef,
|
||||
mountNode,
|
||||
statusNode,
|
||||
rowsNode,
|
||||
});
|
||||
if (!domReadiness.ready) {
|
||||
return {
|
||||
apiName: "ini-panel-shell-session-handoff-mount-workflow",
|
||||
workflowVersion: 1,
|
||||
phase: "blocked",
|
||||
ready: false,
|
||||
statusLine: `Blocked: ${domReadiness.missing.join(", ")}`,
|
||||
contract,
|
||||
domReadiness,
|
||||
renderState,
|
||||
renderResult: null,
|
||||
error: null,
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
const renderResult = renderIniPanelShellSessionHandoffMountState(renderState, {
|
||||
contract,
|
||||
documentRef,
|
||||
mountNode,
|
||||
statusNode,
|
||||
rowsNode,
|
||||
});
|
||||
return {
|
||||
apiName: "ini-panel-shell-session-handoff-mount-workflow",
|
||||
workflowVersion: 1,
|
||||
phase: renderState?.ready ? "ready" : "blocked",
|
||||
ready: renderState?.ready === true,
|
||||
statusLine: renderResult.statusLine,
|
||||
contract,
|
||||
domReadiness,
|
||||
renderState,
|
||||
renderResult,
|
||||
error: null,
|
||||
};
|
||||
} catch (error) {
|
||||
return {
|
||||
apiName: "ini-panel-shell-session-handoff-mount-workflow",
|
||||
workflowVersion: 1,
|
||||
phase: "blocked",
|
||||
ready: false,
|
||||
statusLine: `Blocked: ${error?.message ?? "mount workflow error"}`,
|
||||
contract,
|
||||
domReadiness,
|
||||
renderState,
|
||||
renderResult: null,
|
||||
error: error?.message ?? String(error),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries()) {
|
||||
const shellIntegrationManifest = createIniPanelShellIntegrationManifest(entries);
|
||||
const shellIntegrationReadiness = createIniPanelShellIntegrationReadiness(shellIntegrationManifest);
|
||||
@@ -1312,6 +1380,7 @@ export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries
|
||||
createShellSessionHandoffMountDomContract: createIniPanelShellSessionHandoffMountDomContract,
|
||||
createShellSessionHandoffMountDomReadiness: createIniPanelShellSessionHandoffMountDomReadiness,
|
||||
renderShellSessionHandoffMountState: renderIniPanelShellSessionHandoffMountState,
|
||||
mountShellSessionHandoff: mountIniPanelShellSessionHandoff,
|
||||
isSupportedShellSessionHandoffPackage: isSupportedIniPanelShellSessionHandoffPackage,
|
||||
controlPage: {
|
||||
browserApiSchema: createControlPageBrowserApiSchema(),
|
||||
|
||||
@@ -88,6 +88,7 @@ TOOL_TABLE = browser-shell-tool.tbl
|
||||
!launchApi?.getShellSessionHandoffMountDomContract ||
|
||||
!launchApi?.getShellSessionHandoffMountDomReadiness ||
|
||||
!launchApi?.renderShellSessionHandoffMountState ||
|
||||
!launchApi?.mountShellSessionHandoff ||
|
||||
!launchApi?.isSupportedShellSessionHandoffPackage
|
||||
) {
|
||||
throw new Error("launch API namespace did not expose shell integration helpers");
|
||||
@@ -123,15 +124,16 @@ TOOL_TABLE = browser-shell-tool.tbl
|
||||
contract: externalMountDomContract,
|
||||
documentRef: document,
|
||||
});
|
||||
const waitingMountRenderResult = launchApi.renderShellSessionHandoffMountState(
|
||||
handoffPackageMountRenderState,
|
||||
{
|
||||
contract: externalMountDomContract,
|
||||
documentRef: document,
|
||||
},
|
||||
);
|
||||
const waitingMountWorkflow = launchApi.mountShellSessionHandoff({
|
||||
renderState: handoffPackageMountRenderState,
|
||||
contract: externalMountDomContract,
|
||||
documentRef: document,
|
||||
});
|
||||
const waitingMountRenderResult = waitingMountWorkflow.renderResult;
|
||||
assertEqual(externalMountDomContract.rowDatasetPrefix, "externalMount", "external shell mount DOM contract prefix");
|
||||
assertEqual(externalMountDomReadiness.ready, true, "external shell mount DOM readiness");
|
||||
assertEqual(waitingMountWorkflow.phase, "blocked", "external shell waiting mount workflow phase");
|
||||
assertEqual(waitingMountWorkflow.domReadiness.ready, true, "external shell waiting mount workflow DOM readiness");
|
||||
assertEqual(handoffSummarySchema.summaryVersion, 1, "shell handoff summary schema version");
|
||||
assertEqual(
|
||||
launchApi.isSupportedShellSessionHandoffSummary(handoffSummary),
|
||||
@@ -290,18 +292,18 @@ TOOL_TABLE = browser-shell-tool.tbl
|
||||
);
|
||||
const readyMountDisplay = launchApi.getShellSessionHandoffPackageMountDisplayViewModel(readyMountState);
|
||||
const readyMountRenderState = launchApi.getShellSessionHandoffPackageMountRenderState(readyMountState);
|
||||
const readyMountRenderResult = launchApi.renderShellSessionHandoffMountState(
|
||||
readyMountRenderState,
|
||||
{
|
||||
contract: externalMountDomContract,
|
||||
documentRef: document,
|
||||
},
|
||||
);
|
||||
const readyMountWorkflow = launchApi.mountShellSessionHandoff({
|
||||
renderState: readyMountRenderState,
|
||||
contract: externalMountDomContract,
|
||||
documentRef: document,
|
||||
});
|
||||
const readyMountRenderResult = readyMountWorkflow.renderResult;
|
||||
assertEqual(readyMountState.ready, true, "shell handoff package mount-state readiness");
|
||||
assertEqual(readyMountState.sessionLoadState.phase, "ready", "shell handoff package mount-state ready session");
|
||||
assertEqual(readyMountDisplay.detailText, "No blocking reasons", "shell handoff package ready mount display");
|
||||
assertEqual(readyMountRenderState.statusLine, "Ready: No blocking reasons", "shell handoff package ready mount render-state");
|
||||
assertEqual(readyMountRenderResult.rendered, true, "external shell ready mount render result");
|
||||
assertEqual(readyMountWorkflow.phase, "ready", "external shell ready mount workflow phase");
|
||||
assertEqual(readyMountRenderResult.dataset.handoffReady, "true", "external shell ready mount render dataset");
|
||||
assertEqual(
|
||||
document.querySelector("[data-external-shell-mount-status]").textContent,
|
||||
|
||||
@@ -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