推进 INI 面板 launch 暴露 control-page API 清单
This commit is contained in:
68
text12.txt
68
text12.txt
@@ -997,3 +997,71 @@ host_wasm_opfs_browser_smokes=ok
|
|||||||
继续推进 browser/UI workflow。下一批建议把 browser control-page API methods manifest 纳入
|
继续推进 browser/UI workflow。下一批建议把 browser control-page API methods manifest 纳入
|
||||||
launch page 或 shell view-model 暴露,让入口页也能展示/消费可用 read-only control-page API
|
launch page 或 shell view-model 暴露,让入口页也能展示/消费可用 read-only control-page API
|
||||||
清单;仍保持只读,不新增控制按钮,不解析 G-code,不解释 canonical events。
|
清单;仍保持只读,不新增控制按钮,不解析 G-code,不解释 canonical events。
|
||||||
|
|
||||||
|
十二、2026-06-15 继续执行记录:INI panel launch exposes control-page API methods
|
||||||
|
|
||||||
|
本轮按“第一原则:加快实质性推进”继续推进 browser/UI workflow,把 browser control-page API
|
||||||
|
methods manifest 纳入 shell view-model 和 launch page,使入口页也能消费可用 read-only
|
||||||
|
control-page API 清单,而不需要先加载 control-page iframe。
|
||||||
|
|
||||||
|
完成内容:
|
||||||
|
|
||||||
|
- `createControlPageBrowserApiMethods()` 从 `control-page.js` 迁移到 `ui-shell.js`;
|
||||||
|
- `control-page.js` 复用 shell 侧 `createControlPageBrowserApiMethods()`;
|
||||||
|
- `createIniPanelShellViewModel().controlPage` 新增 `browserApiMethods`;
|
||||||
|
- `launch.html` 改为基于 `createIniPanelShellViewModel()` 渲染 launcher links;
|
||||||
|
- `launch.html` 新增只读 `window.linuxCncIniPanelLaunchApi`:
|
||||||
|
- `getLauncherLinks()`
|
||||||
|
- `getControlPageApiMethods()`
|
||||||
|
- `ini_panel_launch_smoke.html` 在真实 launch iframe 中校验 launch API 与 shell helper
|
||||||
|
返回同一份 control-page browser methods 清单;
|
||||||
|
- `verify_ini_panel_ui_shell.mjs`、`verify_ini_panel_shell_control_page_contract.mjs` 和
|
||||||
|
`verify_ini_panel_entry_docs.mjs` 覆盖 shell view-model、launch API 与文档入口;
|
||||||
|
- `docs/panel-entry.md` 记录 `linuxCncIniPanelLaunchApi.getControlPageApiMethods()`;
|
||||||
|
- 未新增控制按钮;
|
||||||
|
- 未解析 G-code;
|
||||||
|
- 未解释 canonical events;
|
||||||
|
- 未改变 OPFS/session persistence、LinuxCNC interpreter、tool、parameter、planner 或
|
||||||
|
LinuxCNC-owned runtime semantics。
|
||||||
|
|
||||||
|
验证已通过:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git diff --check
|
||||||
|
wasm-port/tests/ui/node/verify_ini_panel_shell_control_page_contract.sh
|
||||||
|
wasm-port/tests/ui/node/verify_ini_panel_ui_shell.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_shell_control_page_contract_node_smoke=ok
|
||||||
|
ini_panel_ui_shell_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
|
||||||
|
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。下一批建议把 `linuxCncIniPanelLaunchApi` 也整理为轻量 launch API
|
||||||
|
manifest,明确 `getLauncherLinks()`、`getControlPageApiMethods()`、visible entries 和目标页面
|
||||||
|
路径,供外部 shell 在不读 DOM 的情况下发现入口;仍保持只读,不新增控制按钮,不解析 G-code。
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ control view:
|
|||||||
```js
|
```js
|
||||||
import {
|
import {
|
||||||
INI_PANEL_ENTRIES,
|
INI_PANEL_ENTRIES,
|
||||||
|
createControlPageBrowserApiMethods,
|
||||||
createIniPanelLauncherLinkViewModel,
|
createIniPanelLauncherLinkViewModel,
|
||||||
createIniPanelShellControlPageContract,
|
createIniPanelShellControlPageContract,
|
||||||
createIniPanelShellViewModel,
|
createIniPanelShellViewModel,
|
||||||
@@ -77,6 +78,9 @@ control page API.
|
|||||||
Use `linuxCncIniPanelControlPageApi.readControlPageStatus()` when a browser
|
Use `linuxCncIniPanelControlPageApi.readControlPageStatus()` when a browser
|
||||||
outer page needs the same readonly status snapshot from the real embedded
|
outer page needs the same readonly status snapshot from the real embedded
|
||||||
control page after save/load session workflows.
|
control page after save/load session workflows.
|
||||||
|
The launch page exposes `linuxCncIniPanelLaunchApi.getControlPageApiMethods()`
|
||||||
|
from the same shell view-model so entry pages can consume the available
|
||||||
|
read-only control-page API list without loading the control-page iframe first.
|
||||||
|
|
||||||
The control-page refresh workflow lives in
|
The control-page refresh workflow lives in
|
||||||
`runtime/ui/ini-panel/control-page-refresh-workflow.js`. Use
|
`runtime/ui/ini-panel/control-page-refresh-workflow.js`. Use
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import {
|
|||||||
createMachineSessionControlPageController,
|
createMachineSessionControlPageController,
|
||||||
} from "./control-page-controller.js";
|
} from "./control-page-controller.js";
|
||||||
import {
|
import {
|
||||||
|
createControlPageBrowserApiMethods,
|
||||||
createIniPanelShellControlPageContract,
|
createIniPanelShellControlPageContract,
|
||||||
} from "./ui-shell.js";
|
} from "./ui-shell.js";
|
||||||
|
|
||||||
@@ -21,19 +22,6 @@ const controller = createMachineSessionControlPageController({
|
|||||||
|
|
||||||
controller.mount();
|
controller.mount();
|
||||||
|
|
||||||
export function createControlPageBrowserApiMethods() {
|
|
||||||
return [
|
|
||||||
"getControlPageApiMethods",
|
|
||||||
"getControlPageContract",
|
|
||||||
"getControlView",
|
|
||||||
"getPanelApi",
|
|
||||||
"loadControlPageSessionState",
|
|
||||||
"readControlPageStatus",
|
|
||||||
"refreshControlPage",
|
|
||||||
"renderControlPage",
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
window.linuxCncIniPanelControlPageApi = {
|
window.linuxCncIniPanelControlPageApi = {
|
||||||
getControlPageApiMethods: createControlPageBrowserApiMethods,
|
getControlPageApiMethods: createControlPageBrowserApiMethods,
|
||||||
getControlView: controller.getControlView,
|
getControlView: controller.getControlView,
|
||||||
|
|||||||
@@ -73,9 +73,13 @@
|
|||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import { createIniPanelLauncherLinkViewModel } from "./ui-shell.js";
|
import {
|
||||||
|
createIniPanelLauncherLinkViewModel,
|
||||||
|
createIniPanelShellViewModel,
|
||||||
|
} from "./ui-shell.js";
|
||||||
|
|
||||||
const links = createIniPanelLauncherLinkViewModel();
|
const shellViewModel = createIniPanelShellViewModel();
|
||||||
|
const links = shellViewModel.launcherLinks;
|
||||||
for (const linkModel of links) {
|
for (const linkModel of links) {
|
||||||
const link = document.querySelector(`a[data-entry-id="${linkModel.entryId}"]`);
|
const link = document.querySelector(`a[data-entry-id="${linkModel.entryId}"]`);
|
||||||
if (!link) {
|
if (!link) {
|
||||||
@@ -84,6 +88,11 @@
|
|||||||
link.textContent = linkModel.label;
|
link.textContent = linkModel.label;
|
||||||
link.href = linkModel.href;
|
link.href = linkModel.href;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.linuxCncIniPanelLaunchApi = {
|
||||||
|
getLauncherLinks: () => shellViewModel.launcherLinks,
|
||||||
|
getControlPageApiMethods: () => shellViewModel.controlPage.browserApiMethods,
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -78,6 +78,19 @@ export function createIniPanelShellControlPageContract() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function createControlPageBrowserApiMethods() {
|
||||||
|
return [
|
||||||
|
"getControlPageApiMethods",
|
||||||
|
"getControlPageContract",
|
||||||
|
"getControlView",
|
||||||
|
"getPanelApi",
|
||||||
|
"loadControlPageSessionState",
|
||||||
|
"readControlPageStatus",
|
||||||
|
"refreshControlPage",
|
||||||
|
"renderControlPage",
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries()) {
|
export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries()) {
|
||||||
return {
|
return {
|
||||||
pages: entries.map(({ id, href, title }) => ({
|
pages: entries.map(({ id, href, title }) => ({
|
||||||
@@ -87,6 +100,7 @@ export function createIniPanelShellViewModel(entries = getVisibleIniPanelEntries
|
|||||||
})),
|
})),
|
||||||
launcherLinks: createIniPanelLauncherLinkViewModel(entries),
|
launcherLinks: createIniPanelLauncherLinkViewModel(entries),
|
||||||
controlPage: {
|
controlPage: {
|
||||||
|
browserApiMethods: createControlPageBrowserApiMethods(),
|
||||||
contract: createIniPanelShellControlPageContract(),
|
contract: createIniPanelShellControlPageContract(),
|
||||||
createController: createMachineSessionControlPageController,
|
createController: createMachineSessionControlPageController,
|
||||||
loadSessionState: loadMachineSessionForControlPageWorkflow,
|
loadSessionState: loadMachineSessionForControlPageWorkflow,
|
||||||
|
|||||||
@@ -8,7 +8,9 @@
|
|||||||
<pre id="status">running</pre>
|
<pre id="status">running</pre>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import {
|
import {
|
||||||
|
createControlPageBrowserApiMethods,
|
||||||
createIniPanelLauncherLinkViewModel,
|
createIniPanelLauncherLinkViewModel,
|
||||||
|
createIniPanelShellViewModel,
|
||||||
getIniPanelEntryByHref,
|
getIniPanelEntryByHref,
|
||||||
getVisibleIniPanelEntries,
|
getVisibleIniPanelEntries,
|
||||||
} from "../../runtime/ui/ini-panel/ui-shell.js";
|
} from "../../runtime/ui/ini-panel/ui-shell.js";
|
||||||
@@ -44,8 +46,17 @@
|
|||||||
"Open read-only control view",
|
"Open read-only control view",
|
||||||
"launch manifest control entry",
|
"launch manifest control entry",
|
||||||
);
|
);
|
||||||
|
assertEqual(
|
||||||
|
createIniPanelShellViewModel().controlPage.browserApiMethods.join(","),
|
||||||
|
createControlPageBrowserApiMethods().join(","),
|
||||||
|
"launch shell control-page browser API methods",
|
||||||
|
);
|
||||||
|
|
||||||
const launchDoc = await loadLaunchFrame();
|
const launchDoc = await loadLaunchFrame();
|
||||||
|
const launchApi = launchDoc.defaultView.linuxCncIniPanelLaunchApi;
|
||||||
|
if (!launchApi?.getLauncherLinks || !launchApi?.getControlPageApiMethods) {
|
||||||
|
throw new Error("launch API namespace did not expose shell helpers");
|
||||||
|
}
|
||||||
assertEqual(
|
assertEqual(
|
||||||
launchDoc.querySelector('a[href="./index.html"]').textContent,
|
launchDoc.querySelector('a[href="./index.html"]').textContent,
|
||||||
"Open edit and run panel",
|
"Open edit and run panel",
|
||||||
@@ -56,6 +67,16 @@
|
|||||||
"Open read-only control view",
|
"Open read-only control view",
|
||||||
"launch panel control link",
|
"launch panel control link",
|
||||||
);
|
);
|
||||||
|
assertEqual(
|
||||||
|
launchApi.getLauncherLinks().length,
|
||||||
|
2,
|
||||||
|
"launch API launcher link count",
|
||||||
|
);
|
||||||
|
assertEqual(
|
||||||
|
launchApi.getControlPageApiMethods().join(","),
|
||||||
|
createControlPageBrowserApiMethods().join(","),
|
||||||
|
"launch API control-page browser methods",
|
||||||
|
);
|
||||||
status.textContent = "browser_ini_launch_smoke=ok";
|
status.textContent = "browser_ini_launch_smoke=ok";
|
||||||
console.log("browser_ini_launch_smoke=ok");
|
console.log("browser_ini_launch_smoke=ok");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import {
|
|||||||
INI_PANEL_ENTRIES,
|
INI_PANEL_ENTRIES,
|
||||||
controlPageStatusText,
|
controlPageStatusText,
|
||||||
createControlPageSessionLoadState,
|
createControlPageSessionLoadState,
|
||||||
|
createControlPageBrowserApiMethods,
|
||||||
createIniPanelLauncherLinkViewModel,
|
createIniPanelLauncherLinkViewModel,
|
||||||
createIniPanelShellControlPageContract,
|
createIniPanelShellControlPageContract,
|
||||||
createIniPanelShellViewModel,
|
createIniPanelShellViewModel,
|
||||||
@@ -23,6 +24,7 @@ const root = resolve(__dirname, "../../..");
|
|||||||
const docText = readFileSync(resolve(root, "docs/panel-entry.md"), "utf8");
|
const docText = readFileSync(resolve(root, "docs/panel-entry.md"), "utf8");
|
||||||
const shellText = readFileSync(resolve(root, "runtime/ui/ini-panel/ui-shell.js"), "utf8");
|
const shellText = readFileSync(resolve(root, "runtime/ui/ini-panel/ui-shell.js"), "utf8");
|
||||||
const controlPageText = readFileSync(resolve(root, "runtime/ui/ini-panel/control-page.js"), "utf8");
|
const controlPageText = readFileSync(resolve(root, "runtime/ui/ini-panel/control-page.js"), "utf8");
|
||||||
|
const launchText = readFileSync(resolve(root, "runtime/ui/ini-panel/launch.html"), "utf8");
|
||||||
const refreshWorkflowText = readFileSync(
|
const refreshWorkflowText = readFileSync(
|
||||||
resolve(root, "runtime/ui/ini-panel/control-page-refresh-workflow.js"),
|
resolve(root, "runtime/ui/ini-panel/control-page-refresh-workflow.js"),
|
||||||
"utf8",
|
"utf8",
|
||||||
@@ -35,6 +37,7 @@ const sessionWorkflowText = readFileSync(
|
|||||||
const requiredShellExports = [
|
const requiredShellExports = [
|
||||||
"INI_PANEL_ENTRIES",
|
"INI_PANEL_ENTRIES",
|
||||||
"controlPageStatusText",
|
"controlPageStatusText",
|
||||||
|
"createControlPageBrowserApiMethods",
|
||||||
"createControlPageSessionLoadState",
|
"createControlPageSessionLoadState",
|
||||||
"createIniPanelLauncherLinkViewModel",
|
"createIniPanelLauncherLinkViewModel",
|
||||||
"createIniPanelShellControlPageContract",
|
"createIniPanelShellControlPageContract",
|
||||||
@@ -97,6 +100,10 @@ assert.deepEqual(
|
|||||||
createIniPanelShellViewModel().controlPage.contract,
|
createIniPanelShellViewModel().controlPage.contract,
|
||||||
createIniPanelShellControlPageContract(),
|
createIniPanelShellControlPageContract(),
|
||||||
);
|
);
|
||||||
|
assert.deepEqual(
|
||||||
|
createIniPanelShellViewModel().controlPage.browserApiMethods,
|
||||||
|
createControlPageBrowserApiMethods(),
|
||||||
|
);
|
||||||
assert.equal(controlPageStatusText({ lastAction: "run-gcode", runStatus: "ok", error: null }), "run-gcode | ok | -");
|
assert.equal(controlPageStatusText({ lastAction: "run-gcode", runStatus: "ok", error: null }), "run-gcode | ok | -");
|
||||||
assert.deepEqual(createControlPageSessionLoadState({ phase: "waiting-panel" }), {
|
assert.deepEqual(createControlPageSessionLoadState({ phase: "waiting-panel" }), {
|
||||||
phase: "waiting-panel",
|
phase: "waiting-panel",
|
||||||
@@ -120,14 +127,17 @@ assert.deepEqual(
|
|||||||
assert.equal(createIniPanelShellViewModel().controlPage.readStatus, readMachineSessionReadonlyStatus);
|
assert.equal(createIniPanelShellViewModel().controlPage.readStatus, readMachineSessionReadonlyStatus);
|
||||||
assert.equal(createIniPanelShellViewModel().controlPage.refresh, refreshMachineSessionControlPage);
|
assert.equal(createIniPanelShellViewModel().controlPage.refresh, refreshMachineSessionControlPage);
|
||||||
assert.equal(typeof createIniPanelShellViewModel().controlPage.renderView, "function");
|
assert.equal(typeof createIniPanelShellViewModel().controlPage.renderView, "function");
|
||||||
assert.match(controlPageText, /\bexport function createControlPageBrowserApiMethods\b/);
|
assert.match(shellText, /\bexport function createControlPageBrowserApiMethods\b/);
|
||||||
assert.match(controlPageText, /\bgetControlPageApiMethods\b/);
|
assert.match(controlPageText, /\bgetControlPageApiMethods\b/);
|
||||||
|
assert.match(launchText, /\blinuxCncIniPanelLaunchApi\b/);
|
||||||
|
assert.match(launchText, /\bgetControlPageApiMethods\b/);
|
||||||
assert.match(controlPageText, /\bgetControlPageContract\b/);
|
assert.match(controlPageText, /\bgetControlPageContract\b/);
|
||||||
assert.match(controlPageText, /\breadControlPageStatus\b/);
|
assert.match(controlPageText, /\breadControlPageStatus\b/);
|
||||||
assert.match(controlPageText, /\bcreateIniPanelShellControlPageContract\b/);
|
assert.match(controlPageText, /\bcreateIniPanelShellControlPageContract\b/);
|
||||||
assert.match(docText, /\blinuxCncIniPanelControlPageApi\.getControlPageApiMethods\b/);
|
assert.match(docText, /\blinuxCncIniPanelControlPageApi\.getControlPageApiMethods\b/);
|
||||||
assert.match(docText, /\blinuxCncIniPanelControlPageApi\.getControlPageContract\b/);
|
assert.match(docText, /\blinuxCncIniPanelControlPageApi\.getControlPageContract\b/);
|
||||||
assert.match(docText, /\blinuxCncIniPanelControlPageApi\.readControlPageStatus\b/);
|
assert.match(docText, /\blinuxCncIniPanelControlPageApi\.readControlPageStatus\b/);
|
||||||
|
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getControlPageApiMethods\b/);
|
||||||
|
|
||||||
for (const entry of INI_PANEL_ENTRIES) {
|
for (const entry of INI_PANEL_ENTRIES) {
|
||||||
const escapedHref = entry.href.replace(".", "\\.");
|
const escapedHref = entry.href.replace(".", "\\.");
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { dirname, resolve } from "node:path";
|
|||||||
import { fileURLToPath } from "node:url";
|
import { fileURLToPath } from "node:url";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
createControlPageBrowserApiMethods,
|
||||||
createIniPanelShellControlPageContract,
|
createIniPanelShellControlPageContract,
|
||||||
createIniPanelShellViewModel,
|
createIniPanelShellViewModel,
|
||||||
createMachineSessionControlPageController,
|
createMachineSessionControlPageController,
|
||||||
@@ -55,6 +56,7 @@ assert.deepEqual(contract, {
|
|||||||
|
|
||||||
const shellViewModel = createIniPanelShellViewModel();
|
const shellViewModel = createIniPanelShellViewModel();
|
||||||
assert.deepEqual(Object.keys(shellViewModel.controlPage), [
|
assert.deepEqual(Object.keys(shellViewModel.controlPage), [
|
||||||
|
"browserApiMethods",
|
||||||
"contract",
|
"contract",
|
||||||
"createController",
|
"createController",
|
||||||
"loadSessionState",
|
"loadSessionState",
|
||||||
@@ -63,6 +65,7 @@ assert.deepEqual(Object.keys(shellViewModel.controlPage), [
|
|||||||
"refresh",
|
"refresh",
|
||||||
"renderView",
|
"renderView",
|
||||||
]);
|
]);
|
||||||
|
assert.deepEqual(shellViewModel.controlPage.browserApiMethods, createControlPageBrowserApiMethods());
|
||||||
assert.deepEqual(shellViewModel.controlPage.contract, contract);
|
assert.deepEqual(shellViewModel.controlPage.contract, contract);
|
||||||
assert.deepEqual(shellViewModel.controlPage.readonlyStatusApiManifest, manifest);
|
assert.deepEqual(shellViewModel.controlPage.readonlyStatusApiManifest, manifest);
|
||||||
assert.equal(shellViewModel.controlPage.createController, createMachineSessionControlPageController);
|
assert.equal(shellViewModel.controlPage.createController, createMachineSessionControlPageController);
|
||||||
@@ -81,6 +84,7 @@ for (const fieldName of contract.readonlyStatusApiStatusFields) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
assert.match(shellText, /\bexport function createIniPanelShellControlPageContract\b/);
|
assert.match(shellText, /\bexport function createIniPanelShellControlPageContract\b/);
|
||||||
|
assert.match(shellText, /\bexport function createControlPageBrowserApiMethods\b/);
|
||||||
assert.match(docText, /\bcreateIniPanelShellControlPageContract\b/);
|
assert.match(docText, /\bcreateIniPanelShellControlPageContract\b/);
|
||||||
assert.match(docText, /\bcontrolPage\.contract\b/);
|
assert.match(docText, /\bcontrolPage\.contract\b/);
|
||||||
assert.doesNotMatch(shellText, /\bparseGcode\b|\bcanonicalEvents\b|\btoolTable\b|\bplanner\b/);
|
assert.doesNotMatch(shellText, /\bparseGcode\b|\bcanonicalEvents\b|\btoolTable\b|\bplanner\b/);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import assert from "node:assert/strict";
|
|||||||
import {
|
import {
|
||||||
INI_PANEL_ENTRIES,
|
INI_PANEL_ENTRIES,
|
||||||
controlPageStatusText,
|
controlPageStatusText,
|
||||||
|
createControlPageBrowserApiMethods,
|
||||||
createIniPanelLauncherLinkViewModel,
|
createIniPanelLauncherLinkViewModel,
|
||||||
createIniPanelShellControlPageContract,
|
createIniPanelShellControlPageContract,
|
||||||
createIniPanelShellViewModel,
|
createIniPanelShellViewModel,
|
||||||
@@ -44,6 +45,7 @@ assert.equal(getIniPanelEntryByHref("./index.html")?.id, "edit-run");
|
|||||||
assert.equal(typeof createMachineSessionControlPageController, "function");
|
assert.equal(typeof createMachineSessionControlPageController, "function");
|
||||||
assert.equal(typeof createMachineSessionReadonlyStatus, "function");
|
assert.equal(typeof createMachineSessionReadonlyStatus, "function");
|
||||||
assert.equal(typeof createMachineSessionReadonlyStatusApiManifest, "function");
|
assert.equal(typeof createMachineSessionReadonlyStatusApiManifest, "function");
|
||||||
|
assert.equal(typeof createControlPageBrowserApiMethods, "function");
|
||||||
assert.equal(typeof createIniPanelShellControlPageContract, "function");
|
assert.equal(typeof createIniPanelShellControlPageContract, "function");
|
||||||
assert.equal(typeof loadMachineSessionForControlPageWorkflow, "function");
|
assert.equal(typeof loadMachineSessionForControlPageWorkflow, "function");
|
||||||
assert.equal(typeof readMachineSessionReadonlyStatus, "function");
|
assert.equal(typeof readMachineSessionReadonlyStatus, "function");
|
||||||
@@ -85,6 +87,7 @@ assert.deepEqual(shellViewModel.pages, [
|
|||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
assert.deepEqual(shellViewModel.launcherLinks, createIniPanelLauncherLinkViewModel());
|
assert.deepEqual(shellViewModel.launcherLinks, createIniPanelLauncherLinkViewModel());
|
||||||
|
assert.deepEqual(shellViewModel.controlPage.browserApiMethods, createControlPageBrowserApiMethods());
|
||||||
assert.equal(shellViewModel.controlPage.createController, createMachineSessionControlPageController);
|
assert.equal(shellViewModel.controlPage.createController, createMachineSessionControlPageController);
|
||||||
assert.deepEqual(shellViewModel.controlPage.contract, createIniPanelShellControlPageContract());
|
assert.deepEqual(shellViewModel.controlPage.contract, createIniPanelShellControlPageContract());
|
||||||
assert.equal(shellViewModel.controlPage.loadSessionState, loadMachineSessionForControlPageWorkflow);
|
assert.equal(shellViewModel.controlPage.loadSessionState, loadMachineSessionForControlPageWorkflow);
|
||||||
|
|||||||
Reference in New Issue
Block a user