fix: verify run path with 50ms screenshots

This commit is contained in:
wangdequan
2026-07-03 17:04:33 -04:00
parent 7a30e5f0e9
commit ed9eb3ec17
3304 changed files with 237409 additions and 80 deletions

View File

@@ -152,6 +152,7 @@
'[data-action="estop"]',
'[data-action="power"]',
'[data-action="run"]',
'[data-action="toggle-auto-manual"]',
'[data-action="step"]',
'[data-action="stop"]',
'[data-action="jog-plus"]',
@@ -273,6 +274,20 @@
await waitState((state) => state.machine.powerOn === true && state.machine.taskState === "on", "machine power on");
await click('[data-action="home-all"]', "AXIS home all");
await waitState((state) => state.machine.allHomed === true && state.machine.mode === "manual", "home all");
await click('[data-action="toggle-auto-manual"]', "AXIS AUTO mode toolbar toggle");
await waitState((state) => state.machine.mode === "auto", "toolbar toggle to AUTO");
await click('[data-action="toggle-auto-manual"]', "AXIS MANUAL mode toolbar toggle");
await waitState((state) => state.machine.mode === "manual", "toolbar toggle to MANUAL");
await click('[data-action="run"]', "AXIS direct run after home");
await waitState((state) => (
(state.runState === "running" || state.runState === "complete")
&& state.machine.mode === "auto"
&& state.programRuntimeFeedback
), "direct run after power and home");
await click('[data-action="stop"]', "AXIS stop after direct run");
await waitState((state) => state.runState === "stopped" && state.machine.mode === "auto", "stop after direct run");
await click('[data-action="tab-manual"]', "AXIS manual tab after direct run");
await waitState((state) => state.machine.mode === "manual", "manual mode after direct run");
await click('[data-action="tab-mdi"]', "AXIS MDI tab");
await waitState((state) => state.machine.mode === "mdi", "MDI mode");
@@ -292,6 +307,24 @@
const beforeJogC = api.getState().axisPose.c;
await click('[data-action="jog-plus"]', "AXIS jog plus");
await waitState((state) => state.axisPose.c > beforeJogC, "jog C plus");
await click('[data-action="touch-off"]', "AXIS manual touch off");
await waitState((state) => (
state.machine.mode === "manual" &&
state.runState === "idle" &&
state.mdiHistory[0] === "G10 L20 P0 C0"
), "manual touch off");
await click('[data-action="tool-touch-off"]', "AXIS manual tool touch off");
await waitState((state) => (
state.machine.mode === "manual" &&
state.runState === "idle" &&
state.mdiHistory[0] === "G43"
), "manual tool touch off");
const defaultProgramSource = api.getState().machineFileStaging.gcodeSources.find((source) => source.filename === "xyzbc_switchkins.ngc");
api.dispatch({ type: "LOAD_LINUXCNC_GCODE_SOURCE", sourceRel: defaultProgramSource.sourceRel });
await waitState((state) => (
state.machineFileStaging.selectedGcodeSourceRel === defaultProgramSource.sourceRel &&
Number(state.programAxisPreviewPath?.sampleCount || 0) > 0
), "restore default LinuxCNC program after manual touch off");
const beforeFeed = api.getState().feed.feedOverride;
await click('[data-action="feed-override-up"]', "feed override up");