fix: fixed runProgram button being disabled if program is invalid

ref: N25B-450
This commit is contained in:
JGerla
2026-01-22 17:55:57 +01:00
parent f6b692e420
commit a00fd02634
5 changed files with 87 additions and 20 deletions

View File

@@ -33,19 +33,15 @@ describe("editorWarnings", () => {
const warning = makeWarning({
scope: { id: 'node-1', handleId: 'input-1' },
});
const {registerWarning, editorWarningRegistry} = useFlowStore.getState()
const {registerWarning} = useFlowStore.getState()
registerWarning(warning);
const nodeWarnings = editorWarningRegistry.get('node-1');
expect(nodeWarnings?.has('MISSING_INPUT:input-1')).toBe(true);
const nodeWarnings = useFlowStore.getState().editorWarningRegistry.get('node-1');
expect(nodeWarnings?.has('MISSING_INPUT:input-1') === true).toBe(true);
});
it('updates severityIndex correctly', () => {
const {registerWarning, severityIndex} = useFlowStore.getState()
registerWarning(makeWarning());
console.log(severityIndex);
expect(severityIndex.get('ERROR')!.size).toBe(1);
});
});