refactor(editor): Fix remaining FE type check errors (no-changelog) (#9607)

Co-authored-by: Alex Grozav <alex@grozav.com>
This commit is contained in:
Ricardo Espinoza
2024-06-10 09:23:06 -04:00
committed by GitHub
parent 1e15f73b0d
commit 22bdb0568e
84 changed files with 438 additions and 318 deletions

View File

@@ -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,
},
],

View File

@@ -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);