fix: verify run path with 50ms screenshots
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -338,6 +338,12 @@ assert.equal(buttonStore.getState().machine.allHomed, true);
|
||||
assert.equal(buttonStore.getState().linuxCncProcessMonitor.axes.joint.x, 43);
|
||||
assert.equal(buttonStore.getState().linuxCncProcessMonitor.axes.joint.y, -32.15);
|
||||
assert.equal(buttonStore.getState().linuxCncProcessMonitor.axes.joint.z, -11.306);
|
||||
await buttonStore.dispatch({ type: "RUN_FROM_OPERATOR" });
|
||||
assert.equal(buttonStore.getState().machine.mode, "auto");
|
||||
assert.equal(["running", "complete"].includes(buttonStore.getState().runState), true);
|
||||
assert.equal(Boolean(buttonStore.getState().programRuntimeFeedback), true);
|
||||
buttonStore.dispatch({ type: "STOP" });
|
||||
buttonStore.dispatch({ type: "SET_MODE", mode: "manual" });
|
||||
buttonStore.dispatch({ type: "SET_MODE", mode: "mdi" });
|
||||
buttonStore.dispatch({ type: "RUN_MDI", command: "M428" });
|
||||
assert.equal(buttonStore.getState().kinsType, "tcp-xyzbc");
|
||||
@@ -351,6 +357,15 @@ buttonStore.dispatch({ type: "SET_ACTIVE_JOINT", joint: 4 });
|
||||
const cBeforeJog = buttonStore.getState().axisPose.c;
|
||||
buttonStore.dispatch({ type: "JOG", axis: "c", direction: 1, increment: 1 });
|
||||
assert.equal(buttonStore.getState().axisPose.c, cBeforeJog + 1);
|
||||
buttonStore.dispatch({ type: "RUN_MDI", command: "G10 L20 P0 C0", manualTouchOff: true });
|
||||
assert.equal(buttonStore.getState().mdiHistory[0], "G10 L20 P0 C0");
|
||||
assert.equal(buttonStore.getState().machine.mode, "manual");
|
||||
assert.equal(buttonStore.getState().runState, "idle");
|
||||
assert.equal(buttonStore.getState().operatorMessage, "manual touch off G10 L20 P0 C0");
|
||||
buttonStore.dispatch({ type: "RUN_MDI", command: "G43", manualTouchOff: true });
|
||||
assert.equal(buttonStore.getState().mdiHistory[0], "G43");
|
||||
assert.equal(buttonStore.getState().machine.mode, "manual");
|
||||
assert.equal(buttonStore.getState().runState, "idle");
|
||||
const feedBefore = buttonStore.getState().feed.feedOverride;
|
||||
buttonStore.dispatch({ type: "ADJUST_OVERRIDE", target: "feed", delta: 10 });
|
||||
assert.equal(buttonStore.getState().feed.feedOverride, feedBefore + 10);
|
||||
|
||||
Reference in New Issue
Block a user