feat(editor): Updating node reference pattern in expression editor (#6228)

* feat(editor): Updating node reference pattern in expression editor
*  Updated node ref when dragging data, telemetry and some comments
* ✔️ Updating tests
* 🔨 Removing old telemetry code, updating the current one based on the review feedback
* ✔️ Updating mapping e2e tests
This commit is contained in:
Milorad FIlipović
2023-05-12 11:45:10 +02:00
committed by GitHub
parent fc181ffbff
commit 13bcec1661
6 changed files with 43 additions and 45 deletions

View File

@@ -207,7 +207,7 @@ describe('Mapping Utils', () => {
path: ['sample', 'path'],
};
const result = getMappedExpression(input);
expect(result).toBe('{{ $node.nodeName.json.sample.path }}');
expect(result).toBe("{{ $('nodeName').item.json.sample.path }}");
});
it('should generate a mapped expression with mixed array path', () => {
@@ -217,7 +217,7 @@ describe('Mapping Utils', () => {
path: ['sample', 0, 'path'],
};
const result = getMappedExpression(input);
expect(result).toBe('{{ $node.nodeName.json.sample[0].path }}');
expect(result).toBe("{{ $('nodeName').item.json.sample[0].path }}");
});
it('should generate a mapped expression with special characters in array path', () => {
@@ -228,7 +228,7 @@ describe('Mapping Utils', () => {
};
const result = getMappedExpression(input);
expect(result).toBe(
"{{ $node.nodeName.json.sample['path with-space']['path-with-hyphen'] }}",
"{{ $('nodeName').item.json.sample['path with-space']['path-with-hyphen'] }}",
);
});
@@ -251,7 +251,7 @@ describe('Mapping Utils', () => {
};
const result = getMappedExpression(input);
expect(result).toBe(
"{{ $node.nodeName.json.sample['\"Execute\"']['`Execute`']['\\'Execute\\'']['[Execute]']['{Execute}']['execute?']['test,']['test:']['path.'] }}",
"{{ $('nodeName').item.json.sample['\"Execute\"']['`Execute`']['\\'Execute\\'']['[Execute]']['{Execute}']['execute?']['test,']['test:']['path.'] }}",
);
});