fix(editor): NDV in focus panel review batch 2 (no-changelog) (#19463)

This commit is contained in:
Suguru Inoue
2025-09-15 16:00:21 +02:00
committed by GitHub
parent 7e63e56ccd
commit 05e337be83
9 changed files with 110 additions and 61 deletions

View File

@@ -675,7 +675,7 @@ describe('ParameterInput.vue', () => {
inputNode: { name: 'n1', runIndex: 0, branchIndex: 0 },
});
it('should render mapper', async () => {
it('should render mapper when the current value is empty', async () => {
const rendered = renderComponent({
global: { provide: { [ExpressionLocalResolveContextSymbol]: ctx } },
props: {
@@ -688,6 +688,37 @@ describe('ParameterInput.vue', () => {
expect(rendered.queryByTestId('ndv-input-panel')).toBeInTheDocument();
});
it('should render mapper when editor type is specified in the parameter', async () => {
const rendered = renderComponent({
global: { provide: { [ExpressionLocalResolveContextSymbol]: ctx } },
props: {
path: 'name',
parameter: {
displayName: 'Name',
name: 'name',
type: 'string',
typeOptions: { editor: 'sqlEditor' },
},
modelValue: 'SELECT 1;',
},
});
expect(rendered.queryByTestId('ndv-input-panel')).toBeInTheDocument();
});
it('should render mapper when the current value is an expression', async () => {
const rendered = renderComponent({
global: { provide: { [ExpressionLocalResolveContextSymbol]: ctx } },
props: {
path: 'name',
parameter: { displayName: 'Name', name: 'name', type: 'string' },
modelValue: '={{$today}}',
},
});
expect(rendered.queryByTestId('ndv-input-panel')).toBeInTheDocument();
});
it('should not render mapper if given node property is a node setting', async () => {
const rendered = renderComponent({
global: { provide: { [ExpressionLocalResolveContextSymbol]: ctx } },