refactor(editor): Fix remaining FE type check errors (no-changelog) (#9607)
Co-authored-by: Alex Grozav <alex@grozav.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import type {
|
||||
IExecuteData,
|
||||
INodeTypeData,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeConnectionType } from 'n8n-workflow';
|
||||
import { WorkflowDataProxy } from 'n8n-workflow';
|
||||
import { createTestWorkflowObject } from '@/__tests__/mocks';
|
||||
|
||||
@@ -91,7 +92,7 @@ const connections: IConnections = {
|
||||
[
|
||||
{
|
||||
node: 'Function',
|
||||
type: 'main',
|
||||
type: NodeConnectionType.Main,
|
||||
index: 0,
|
||||
},
|
||||
],
|
||||
@@ -102,7 +103,7 @@ const connections: IConnections = {
|
||||
[
|
||||
{
|
||||
node: 'Rename',
|
||||
type: 'main',
|
||||
type: NodeConnectionType.Main,
|
||||
index: 0,
|
||||
},
|
||||
],
|
||||
@@ -113,7 +114,7 @@ const connections: IConnections = {
|
||||
[
|
||||
{
|
||||
node: 'End',
|
||||
type: 'main',
|
||||
type: NodeConnectionType.Main,
|
||||
index: 0,
|
||||
},
|
||||
],
|
||||
|
||||
@@ -14,8 +14,8 @@ beforeEach(() => {
|
||||
describe('variablesCompletions', () => {
|
||||
test('should return completions for $vars prefix', () => {
|
||||
environmentsStore.variables = [
|
||||
{ key: 'VAR1', value: 'Value1', id: 1 },
|
||||
{ key: 'VAR2', value: 'Value2', id: 2 },
|
||||
{ key: 'VAR1', value: 'Value1', id: '1' },
|
||||
{ key: 'VAR2', value: 'Value2', id: '2' },
|
||||
];
|
||||
|
||||
const state = EditorState.create({ doc: '$vars.', selection: { anchor: 6 } });
|
||||
@@ -39,7 +39,7 @@ describe('variablesCompletions', () => {
|
||||
});
|
||||
|
||||
test('should escape special characters in matcher', () => {
|
||||
environmentsStore.variables = [{ key: 'VAR1', value: 'Value1', id: 1 }];
|
||||
environmentsStore.variables = [{ key: 'VAR1', value: 'Value1', id: '1' }];
|
||||
|
||||
const state = EditorState.create({ doc: '$vars.', selection: { anchor: 6 } });
|
||||
const context = new CompletionContext(state, 6, true);
|
||||
@@ -49,7 +49,7 @@ describe('variablesCompletions', () => {
|
||||
});
|
||||
|
||||
test('should return completions for custom matcher', () => {
|
||||
environmentsStore.variables = [{ key: 'VAR1', value: 'Value1', id: 1 }];
|
||||
environmentsStore.variables = [{ key: 'VAR1', value: 'Value1', id: '1' }];
|
||||
|
||||
const state = EditorState.create({ doc: '$custom.', selection: { anchor: 8 } });
|
||||
const context = new CompletionContext(state, 8, true);
|
||||
|
||||
Reference in New Issue
Block a user