Skip to content

Commit

Permalink
✔️ Updating tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MiloradFilipovic committed May 11, 2023
1 parent e05523e commit 3f16eea
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ exports[`RunDataJson.vue > renders json values properly 1`] = `
data-name="list"
data-path="[0].list"
data-target="mappable"
data-value="{{ $node.Set.json.list }}"
data-value="{{ $('Set').item.json.list }}"
>
"list"
</span>
Expand Down Expand Up @@ -143,7 +143,7 @@ exports[`RunDataJson.vue > renders json values properly 1`] = `
data-name="list[0]"
data-path="[0].list[0]"
data-target="mappable"
data-value="{{ $node.Set.json.list[0] }}"
data-value="{{ $('Set').item.json.list[0] }}"
>
1
</span>
Expand Down Expand Up @@ -185,7 +185,7 @@ exports[`RunDataJson.vue > renders json values properly 1`] = `
data-name="list[1]"
data-path="[0].list[1]"
data-target="mappable"
data-value="{{ $node.Set.json.list[1] }}"
data-value="{{ $('Set').item.json.list[1] }}"
>
2
</span>
Expand Down Expand Up @@ -227,7 +227,7 @@ exports[`RunDataJson.vue > renders json values properly 1`] = `
data-name="list[2]"
data-path="[0].list[2]"
data-target="mappable"
data-value="{{ $node.Set.json.list[2] }}"
data-value="{{ $('Set').item.json.list[2] }}"
>
3
</span>
Expand Down Expand Up @@ -292,7 +292,7 @@ exports[`RunDataJson.vue > renders json values properly 1`] = `
data-name="record"
data-path="[0].record"
data-target="mappable"
data-value="{{ $node.Set.json.record }}"
data-value="{{ $('Set').item.json.record }}"
>
"record"
</span>
Expand Down Expand Up @@ -339,7 +339,7 @@ exports[`RunDataJson.vue > renders json values properly 1`] = `
data-name="name"
data-path="[0].record.name"
data-target="mappable"
data-value="{{ $node.Set.json.record.name }}"
data-value="{{ $('Set').item.json.record.name }}"
>
"name"
</span>
Expand Down Expand Up @@ -417,7 +417,7 @@ exports[`RunDataJson.vue > renders json values properly 1`] = `
data-name="myNumber"
data-path="[0].myNumber"
data-target="mappable"
data-value="{{ $node.Set.json.myNumber }}"
data-value="{{ $('Set').item.json.myNumber }}"
>
"myNumber"
</span>
Expand Down Expand Up @@ -467,7 +467,7 @@ exports[`RunDataJson.vue > renders json values properly 1`] = `
data-name="myStringNumber"
data-path="[0].myStringNumber"
data-target="mappable"
data-value="{{ $node.Set.json.myStringNumber }}"
data-value="{{ $('Set').item.json.myStringNumber }}"
>
"myStringNumber"
</span>
Expand Down Expand Up @@ -517,7 +517,7 @@ exports[`RunDataJson.vue > renders json values properly 1`] = `
data-name="myStringText"
data-path="[0].myStringText"
data-target="mappable"
data-value="{{ $node.Set.json.myStringText }}"
data-value="{{ $('Set').item.json.myStringText }}"
>
"myStringText"
</span>
Expand Down Expand Up @@ -567,7 +567,7 @@ exports[`RunDataJson.vue > renders json values properly 1`] = `
data-name="nil"
data-path="[0].nil"
data-target="mappable"
data-value="{{ $node.Set.json.nil }}"
data-value="{{ $('Set').item.json.nil }}"
>
"nil"
</span>
Expand Down Expand Up @@ -617,7 +617,7 @@ exports[`RunDataJson.vue > renders json values properly 1`] = `
data-name="d"
data-path="[0].d"
data-target="mappable"
data-value="{{ $node.Set.json.d }}"
data-value="{{ $('Set').item.json.d }}"
>
"d"
</span>
Expand Down
8 changes: 4 additions & 4 deletions packages/editor-ui/src/utils/__tests__/mappingUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand All @@ -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', () => {
Expand All @@ -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'] }}",
);
});

Expand All @@ -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.'] }}",
);
});

Expand Down

0 comments on commit 3f16eea

Please sign in to comment.