mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(editor): "Trigger node not found" error when chat message is entered (#14954)
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
import {
|
||||
createAiData,
|
||||
createLogEntries,
|
||||
deepToRaw,
|
||||
findSelectedLogEntry,
|
||||
getTreeNodeData,
|
||||
getTreeNodeDataV2,
|
||||
@@ -21,6 +22,7 @@ import {
|
||||
} from 'n8n-workflow';
|
||||
import { type LogEntrySelection } from '../CanvasChat/types/logs';
|
||||
import { type IExecutionResponse } from '@/Interface';
|
||||
import { isReactive, reactive } from 'vue';
|
||||
|
||||
describe(getTreeNodeData, () => {
|
||||
it('should generate one node per execution', () => {
|
||||
@@ -608,3 +610,28 @@ describe(createLogEntries, () => {
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe(deepToRaw, () => {
|
||||
it('should convert reactive fields to raw in data with circular structure', () => {
|
||||
const data = reactive({
|
||||
foo: reactive({ bar: {} }),
|
||||
bazz: {},
|
||||
});
|
||||
|
||||
data.foo.bar = data;
|
||||
data.bazz = data;
|
||||
|
||||
const raw = deepToRaw(data);
|
||||
|
||||
expect(isReactive(data)).toBe(true);
|
||||
expect(isReactive(data.foo)).toBe(true);
|
||||
expect(isReactive(data.foo.bar)).toBe(true);
|
||||
expect(isReactive(data.bazz)).toBe(true);
|
||||
expect(isReactive(raw)).toBe(false);
|
||||
expect(isReactive(raw.foo)).toBe(false);
|
||||
expect(isReactive(raw.foo.bar)).toBe(false);
|
||||
expect(isReactive(raw.bazz)).toBe(false);
|
||||
|
||||
console.log(raw.foo.bar);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user