fix(editor): Show NDV errors when opening existing nodes with errors (#12567)

This commit is contained in:
Alex Grozav 2025-01-13 14:06:19 +02:00 committed by GitHub
parent 88659d8a29
commit bee7267fe3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View file

@ -995,6 +995,18 @@ describe('useCanvasOperations', () => {
expect(ndvStore.activeNodeName).toBe('Existing Node');
});
it('should set node as dirty when node is set active', () => {
const workflowsStore = mockedStore(useWorkflowsStore);
const node = createTestNode();
workflowsStore.getNodeById.mockImplementation(() => node);
const { setNodeActive } = useCanvasOperations({ router });
setNodeActive(node.id);
expect(workflowsStore.setNodePristine).toHaveBeenCalledWith(node.name, false);
});
});
describe('setNodeActiveByName', () => {

View file

@ -381,6 +381,7 @@ export function useCanvasOperations({ router }: { router: ReturnType<typeof useR
return;
}
workflowsStore.setNodePristine(node.name, false);
setNodeActiveByName(node.name);
}