fix: fixed runProgram button being disabled if program is invalid
ref: N25B-450
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user