完善 working6 gmoccapy 页面诊断边界
This commit is contained in:
@@ -20,6 +20,10 @@ assert.equal(model.nativePaths.hal.path.includes("HAL shared memory"), true);
|
||||
assert.equal(model.nativePaths.hardwareButtons.path.includes("_button_pin_changed"), true);
|
||||
assert.equal(model.nativePaths.halPins.path.includes("hal_glib.GPin value_changed"), true);
|
||||
assert.equal(model.nativePaths.remap.path.includes("Python remap prolog/ngc/epilog"), true);
|
||||
assert.equal(model.nativePaths.filePage.path.includes("IconFileSelection1"), true);
|
||||
assert.equal(model.nativePaths.macroPage.path.includes("_on_btn_macro_pressed"), true);
|
||||
assert.equal(model.nativePaths.toolEditorPage.path.includes("tooledit1.reload()"), true);
|
||||
assert.equal(model.nativePaths.nativePages.path.includes("Web implementation matrix"), true);
|
||||
assert.deepEqual(model.webPath.path, ["button", "store.dispatch", "linuxcnc-task-policy", "runtime/status snapshot", "UI/Three.js"]);
|
||||
|
||||
assert.equal(model.startupStages.length, 9);
|
||||
@@ -46,8 +50,15 @@ for (const actionId of [
|
||||
"coolant",
|
||||
"hardware-button",
|
||||
"hal-pin-input",
|
||||
"hal-settings-unlock",
|
||||
"hal-jog-pin",
|
||||
"hal-tool-measurement",
|
||||
"hal-user-message",
|
||||
"hal-warning-confirm",
|
||||
"file-page",
|
||||
"macro-page",
|
||||
"tool-editor-page",
|
||||
"native-page-diagnostic",
|
||||
]) {
|
||||
assert.equal(actionIds.includes(actionId), true, `${actionId} missing`);
|
||||
}
|
||||
@@ -80,6 +91,11 @@ assert.equal(halPinMapping.gate.includes("counts require count-enable"), true);
|
||||
assert.equal(halPinMapping.gate.includes("direct-value requires analog-enable"), true);
|
||||
assert.equal(halPinMapping.gate.includes("delete-message pins are rising-edge only"), true);
|
||||
|
||||
const settingsUnlockMapping = model.actionMappings.find((mapping) => mapping.actionId === "hal-settings-unlock");
|
||||
assert.equal(settingsUnlockMapping.nativeCommand, "_on_unlock_settings_changed");
|
||||
assert.equal(settingsUnlockMapping.gate.includes("unlock_way"), true);
|
||||
assert.equal(settingsUnlockMapping.gate.includes("HAL unlock"), true);
|
||||
|
||||
const halJogMapping = model.actionMappings.find((mapping) => mapping.actionId === "hal-jog-pin");
|
||||
assert.equal(halJogMapping.webAction, "GMOCAPY_HAL_PIN jog.axis/jog-inc");
|
||||
assert.equal(halJogMapping.nativeCommand.includes("_on_pin_jog_changed"), true);
|
||||
@@ -87,16 +103,44 @@ assert.equal(halJogMapping.nativeCommand.includes("_on_pin_incr_changed"), true)
|
||||
assert.equal(halJogMapping.gate.includes("press/release level"), true);
|
||||
assert.equal(halJogMapping.gate.includes("increment pins are rising-edge only"), true);
|
||||
|
||||
const toolMeasurementMapping = model.actionMappings.find((mapping) => mapping.actionId === "hal-tool-measurement");
|
||||
assert.equal(toolMeasurementMapping.nativeCommand.includes("_check_toolmeasurement"), true);
|
||||
assert.equal(toolMeasurementMapping.nativeStatus.includes("probeheight"), true);
|
||||
assert.equal(toolMeasurementMapping.gate.includes("no [TOOLSENSOR]"), true);
|
||||
|
||||
const userMessageMapping = model.actionMappings.find((mapping) => mapping.actionId === "hal-user-message");
|
||||
assert.equal(userMessageMapping.nativeCommand.includes("_init_user_messages"), true);
|
||||
assert.equal(userMessageMapping.nativeStatus.includes("messages.<pinname>"), true);
|
||||
assert.equal(userMessageMapping.gate.includes("no MESSAGE_*"), true);
|
||||
|
||||
const warningConfirmMapping = model.actionMappings.find((mapping) => mapping.actionId === "hal-warning-confirm");
|
||||
assert.equal(warningConfirmMapping.nativeCommand.includes("confirm_pin"), true);
|
||||
assert.equal(warningConfirmMapping.gate, "level-polled while warning dialog is active");
|
||||
|
||||
const filePageMapping = model.actionMappings.find((mapping) => mapping.actionId === "file-page");
|
||||
assert.equal(filePageMapping.nativeCommand.includes("IconFileSelection1"), true);
|
||||
assert.equal(filePageMapping.gate.includes("native GTK file chooser"), true);
|
||||
|
||||
const macroPageMapping = model.actionMappings.find((mapping) => mapping.actionId === "macro-page");
|
||||
assert.equal(macroPageMapping.webAction, "GMOCAPY_RUN_MACRO");
|
||||
assert.equal(macroPageMapping.nativeCommand.includes("command.mdi"), true);
|
||||
assert.equal(macroPageMapping.gate.includes("same as RUN_MDI"), true);
|
||||
|
||||
const toolEditorPageMapping = model.actionMappings.find((mapping) => mapping.actionId === "tool-editor-page");
|
||||
assert.equal(toolEditorPageMapping.nativeCommand.includes("_show_tooledit_tab"), true);
|
||||
assert.equal(toolEditorPageMapping.gate.includes("writeback is disabled"), true);
|
||||
|
||||
const nativePageMapping = model.actionMappings.find((mapping) => mapping.actionId === "native-page-diagnostic");
|
||||
assert.equal(nativePageMapping.webAction, "GMOCAPY_NATIVE_PAGE");
|
||||
assert.equal(nativePageMapping.gate.includes("do not emit fake GTK"), true);
|
||||
|
||||
const summary = createGmoccapyCommunicationSummary(model);
|
||||
assert.equal(summary.apiName, "web-rtcp-5axis-gmoccapy-communication-model-summary");
|
||||
assert.equal(summary.profileId, "gmoccapy-xyzab");
|
||||
assert.equal(summary.nativePathCount, 6);
|
||||
assert.equal(summary.nativePathCount, 10);
|
||||
assert.equal(summary.startupStageCount, 9);
|
||||
assert.equal(summary.actionCount, 19);
|
||||
assert.equal(summary.actionCount, 26);
|
||||
assert.equal(summary.pagePathCount, 4);
|
||||
assert.equal(summary.postguiAfterHalcompReady, true);
|
||||
assert.equal(summary.hasNativeNmlCommandPath, true);
|
||||
assert.equal(summary.hasNativeHalPath, true);
|
||||
|
||||
Reference in New Issue
Block a user