推进 INI 面板 launch API manifest
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
controlPageStatusText,
|
||||
createControlPageSessionLoadState,
|
||||
createControlPageBrowserApiMethods,
|
||||
createIniPanelLaunchApiManifest,
|
||||
createIniPanelLauncherLinkViewModel,
|
||||
createIniPanelShellControlPageContract,
|
||||
createIniPanelShellViewModel,
|
||||
@@ -39,6 +40,7 @@ const requiredShellExports = [
|
||||
"controlPageStatusText",
|
||||
"createControlPageBrowserApiMethods",
|
||||
"createControlPageSessionLoadState",
|
||||
"createIniPanelLaunchApiManifest",
|
||||
"createIniPanelLauncherLinkViewModel",
|
||||
"createIniPanelShellControlPageContract",
|
||||
"createIniPanelShellViewModel",
|
||||
@@ -96,6 +98,7 @@ assert.deepEqual(
|
||||
);
|
||||
assert.deepEqual(createIniPanelShellViewModel().pages, getVisibleIniPanelEntries());
|
||||
assert.deepEqual(createIniPanelShellViewModel().launcherLinks, createIniPanelLauncherLinkViewModel());
|
||||
assert.deepEqual(createIniPanelShellViewModel().launchApiManifest, createIniPanelLaunchApiManifest());
|
||||
assert.deepEqual(
|
||||
createIniPanelShellViewModel().controlPage.contract,
|
||||
createIniPanelShellControlPageContract(),
|
||||
@@ -128,8 +131,10 @@ assert.equal(createIniPanelShellViewModel().controlPage.readStatus, readMachineS
|
||||
assert.equal(createIniPanelShellViewModel().controlPage.refresh, refreshMachineSessionControlPage);
|
||||
assert.equal(typeof createIniPanelShellViewModel().controlPage.renderView, "function");
|
||||
assert.match(shellText, /\bexport function createControlPageBrowserApiMethods\b/);
|
||||
assert.match(shellText, /\bexport function createIniPanelLaunchApiManifest\b/);
|
||||
assert.match(controlPageText, /\bgetControlPageApiMethods\b/);
|
||||
assert.match(launchText, /\blinuxCncIniPanelLaunchApi\b/);
|
||||
assert.match(launchText, /\bgetLaunchApiManifest\b/);
|
||||
assert.match(launchText, /\bgetControlPageApiMethods\b/);
|
||||
assert.match(controlPageText, /\bgetControlPageContract\b/);
|
||||
assert.match(controlPageText, /\breadControlPageStatus\b/);
|
||||
@@ -137,6 +142,8 @@ assert.match(controlPageText, /\bcreateIniPanelShellControlPageContract\b/);
|
||||
assert.match(docText, /\blinuxCncIniPanelControlPageApi\.getControlPageApiMethods\b/);
|
||||
assert.match(docText, /\blinuxCncIniPanelControlPageApi\.getControlPageContract\b/);
|
||||
assert.match(docText, /\blinuxCncIniPanelControlPageApi\.readControlPageStatus\b/);
|
||||
assert.match(docText, /\bcreateIniPanelLaunchApiManifest\b/);
|
||||
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getLaunchApiManifest\b/);
|
||||
assert.match(docText, /\blinuxCncIniPanelLaunchApi\.getControlPageApiMethods\b/);
|
||||
|
||||
for (const entry of INI_PANEL_ENTRIES) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import { fileURLToPath } from "node:url";
|
||||
|
||||
import {
|
||||
createControlPageBrowserApiMethods,
|
||||
createIniPanelLaunchApiManifest,
|
||||
createIniPanelShellControlPageContract,
|
||||
createIniPanelShellViewModel,
|
||||
createMachineSessionControlPageController,
|
||||
@@ -55,6 +56,7 @@ assert.deepEqual(contract, {
|
||||
});
|
||||
|
||||
const shellViewModel = createIniPanelShellViewModel();
|
||||
assert.deepEqual(shellViewModel.launchApiManifest, createIniPanelLaunchApiManifest());
|
||||
assert.deepEqual(Object.keys(shellViewModel.controlPage), [
|
||||
"browserApiMethods",
|
||||
"contract",
|
||||
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
INI_PANEL_ENTRIES,
|
||||
controlPageStatusText,
|
||||
createControlPageBrowserApiMethods,
|
||||
createIniPanelLaunchApiManifest,
|
||||
createIniPanelLauncherLinkViewModel,
|
||||
createIniPanelShellControlPageContract,
|
||||
createIniPanelShellViewModel,
|
||||
@@ -46,6 +47,7 @@ assert.equal(typeof createMachineSessionControlPageController, "function");
|
||||
assert.equal(typeof createMachineSessionReadonlyStatus, "function");
|
||||
assert.equal(typeof createMachineSessionReadonlyStatusApiManifest, "function");
|
||||
assert.equal(typeof createControlPageBrowserApiMethods, "function");
|
||||
assert.equal(typeof createIniPanelLaunchApiManifest, "function");
|
||||
assert.equal(typeof createIniPanelShellControlPageContract, "function");
|
||||
assert.equal(typeof loadMachineSessionForControlPageWorkflow, "function");
|
||||
assert.equal(typeof readMachineSessionReadonlyStatus, "function");
|
||||
@@ -87,6 +89,7 @@ assert.deepEqual(shellViewModel.pages, [
|
||||
},
|
||||
]);
|
||||
assert.deepEqual(shellViewModel.launcherLinks, createIniPanelLauncherLinkViewModel());
|
||||
assert.deepEqual(shellViewModel.launchApiManifest, createIniPanelLaunchApiManifest());
|
||||
assert.deepEqual(shellViewModel.controlPage.browserApiMethods, createControlPageBrowserApiMethods());
|
||||
assert.equal(shellViewModel.controlPage.createController, createMachineSessionControlPageController);
|
||||
assert.deepEqual(shellViewModel.controlPage.contract, createIniPanelShellControlPageContract());
|
||||
|
||||
Reference in New Issue
Block a user