mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-30 22:02:03 -08:00
fix(editor): Show NDV errors when opening existing nodes with errors (#12567)
This commit is contained in:
parent
88659d8a29
commit
bee7267fe3
|
@ -995,6 +995,18 @@ describe('useCanvasOperations', () => {
|
||||||
|
|
||||||
expect(ndvStore.activeNodeName).toBe('Existing Node');
|
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', () => {
|
describe('setNodeActiveByName', () => {
|
||||||
|
|
|
@ -381,6 +381,7 @@ export function useCanvasOperations({ router }: { router: ReturnType<typeof useR
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
workflowsStore.setNodePristine(node.name, false);
|
||||||
setNodeActiveByName(node.name);
|
setNodeActiveByName(node.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue