Skip to content

Commit

Permalink
Merge branch 'master' into ai-285-implement-placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegIvaniv committed Sep 18, 2024
2 parents 636dc14 + df8b2c0 commit 2a0ade9
Show file tree
Hide file tree
Showing 346 changed files with 1,131 additions and 638 deletions.
2 changes: 1 addition & 1 deletion cypress/composables/workflow.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ROUTES } from '../constants';
import { getManualChatModal } from './modals/chat-modal';
import { ROUTES } from '../constants';

/**
* Types
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/1-workflows.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { WorkflowsPage as WorkflowsPageClass } from '../pages/workflows';
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
import { WorkflowsPage as WorkflowsPageClass } from '../pages/workflows';
import { getUniqueWorkflowName } from '../utils/workflowUtils';

const WorkflowsPage = new WorkflowsPageClass();
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/10-settings-log-streaming.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SettingsLogStreamingPage } from '../pages';
import { getVisibleModalOverlay } from '../utils/modal';
import { getVisibleDropdown } from '../utils';
import { getVisibleModalOverlay } from '../utils/modal';

const settingsLogStreamingPage = new SettingsLogStreamingPage();

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/10-undo-redo.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import {
SET_NODE_NAME,
EDIT_FIELDS_SET_NODE_NAME,
} from '../constants';
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
import { MessageBox as MessageBoxClass } from '../pages/modals/message-box';
import { NDV } from '../pages/ndv';
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';

// Suite-specific constants
const CODE_NODE_NEW_NAME = 'Something else';
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/12-canvas-actions.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
import { successToast } from '../pages/notifications';
import {
MANUAL_TRIGGER_NODE_NAME,
MANUAL_TRIGGER_NODE_DISPLAY_NAME,
Expand All @@ -9,6 +7,8 @@ import {
IF_NODE_NAME,
HTTP_REQUEST_NODE_NAME,
} from './../constants';
import { successToast } from '../pages/notifications';
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';

const WorkflowPage = new WorkflowPageClass();
describe('Canvas Actions', () => {
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/12-canvas.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
import { NDV, WorkflowExecutionsTab } from '../pages';
import {
MANUAL_TRIGGER_NODE_NAME,
MANUAL_TRIGGER_NODE_DISPLAY_NAME,
Expand All @@ -9,6 +7,8 @@ import {
SWITCH_NODE_NAME,
MERGE_NODE_NAME,
} from './../constants';
import { NDV, WorkflowExecutionsTab } from '../pages';
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';

const WorkflowPage = new WorkflowPageClass();
const ExecutionsTab = new WorkflowExecutionsTab();
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/14-mapping.cy.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { WorkflowPage, NDV } from '../pages';
import { getVisibleSelect } from '../utils';
import {
MANUAL_TRIGGER_NODE_NAME,
MANUAL_TRIGGER_NODE_DISPLAY_NAME,
SCHEDULE_TRIGGER_NODE_NAME,
} from './../constants';
import { WorkflowPage, NDV } from '../pages';
import { getVisibleSelect } from '../utils';

const workflowPage = new WorkflowPage();
const ndv = new NDV();
Expand Down
3 changes: 2 additions & 1 deletion cypress/e2e/16-webhook-node.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { nanoid } from 'nanoid';

import { BACKEND_BASE_URL, EDIT_FIELDS_SET_NODE_NAME } from '../constants';
import { WorkflowPage, NDV, CredentialsModal } from '../pages';
import { cowBase64 } from '../support/binaryTestFiles';
import { BACKEND_BASE_URL, EDIT_FIELDS_SET_NODE_NAME } from '../constants';
import { getVisibleSelect } from '../utils';

const workflowPage = new WorkflowPage();
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/17-sharing.cy.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as projects from '../composables/projects';
import { INSTANCE_MEMBERS, INSTANCE_OWNER, INSTANCE_ADMIN, NOTION_NODE_NAME } from '../constants';
import {
CredentialsModal,
Expand All @@ -8,7 +9,6 @@ import {
WorkflowsPage,
} from '../pages';
import { getVisibleDropdown, getVisiblePopper, getVisibleSelect } from '../utils';
import * as projects from '../composables/projects';

/**
* User U1 - Instance owner
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/18-user-management.cy.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { INSTANCE_MEMBERS, INSTANCE_OWNER, INSTANCE_ADMIN } from '../constants';
import { MainSidebar, SettingsSidebar, SettingsUsersPage } from '../pages';
import { errorToast, successToast } from '../pages/notifications';
import { PersonalSettingsPage } from '../pages/settings-personal';
import { getVisibleSelect } from '../utils';
import { errorToast, successToast } from '../pages/notifications';

/**
* User A - Instance owner
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/19-execution.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NDV, WorkflowExecutionsTab, WorkflowPage as WorkflowPageClass } from '../pages';
import { SCHEDULE_TRIGGER_NODE_NAME, EDIT_FIELDS_SET_NODE_NAME } from '../constants';
import { NDV, WorkflowExecutionsTab, WorkflowPage as WorkflowPageClass } from '../pages';
import { clearNotifications, errorToast, successToast } from '../pages/notifications';

const workflowPage = new WorkflowPageClass();
Expand Down
1 change: 1 addition & 0 deletions cypress/e2e/2-credentials.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { type ICredentialType } from 'n8n-workflow';

import {
AGENT_NODE_NAME,
AI_TOOL_HTTP_NODE_NAME,
Expand Down
3 changes: 2 additions & 1 deletion cypress/e2e/20-workflow-executions.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type { RouteHandler } from 'cypress/types/net-stubbing';

import executionOutOfMemoryServerResponse from '../fixtures/responses/execution-out-of-memory-server-response.json';
import { WorkflowPage } from '../pages';
import { WorkflowExecutionsTab } from '../pages/workflow-executions-tab';
import executionOutOfMemoryServerResponse from '../fixtures/responses/execution-out-of-memory-server-response.json';
import { getVisibleSelect } from '../utils';

const workflowPage = new WorkflowPage();
Expand Down
11 changes: 6 additions & 5 deletions cypress/e2e/21-community-nodes.cy.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import type { ICredentialType } from 'n8n-workflow';
import { NodeCreator } from '../pages/features/node-creator';

import CustomCredential from '../fixtures/Custom_credential.json';
import CustomNodeFixture from '../fixtures/Custom_node.json';
import { CredentialsModal, WorkflowPage } from '../pages';
import CustomNodeWithN8nCredentialFixture from '../fixtures/Custom_node_n8n_credential.json';
import CustomNodeWithCustomCredentialFixture from '../fixtures/Custom_node_custom_credential.json';
import CustomCredential from '../fixtures/Custom_credential.json';
import { getVisibleSelect } from '../utils';
import CustomNodeWithN8nCredentialFixture from '../fixtures/Custom_node_n8n_credential.json';
import { CredentialsModal, WorkflowPage } from '../pages';
import { NodeCreator } from '../pages/features/node-creator';
import {
confirmCommunityNodeUninstall,
confirmCommunityNodeUpdate,
getCommunityCards,
installFirstCommunityNode,
visitCommunityNodesSettings,
} from '../pages/settings-community-nodes';
import { getVisibleSelect } from '../utils';

const credentialsModal = new CredentialsModal();
const nodeCreatorFeature = new NodeCreator();
Expand Down
29 changes: 15 additions & 14 deletions cypress/e2e/233-AI-switch-to-logs-on-error.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
import type { ExecutionError } from 'n8n-workflow/src';
import { NDV, WorkflowPage as WorkflowPageClass } from '../pages';

import {
closeManualChatModal,
getManualChatMessages,
getManualChatModalLogs,
getManualChatModalLogsEntries,
sendManualChatMessage,
} from '../composables/modals/chat-modal';
import { setCredentialValues } from '../composables/modals/credential-modal';
import {
clickCreateNewCredential,
clickExecuteNode,
clickGetBackToCanvas,
} from '../composables/ndv';
import {
addLanguageModelNodeToParent,
addMemoryNodeToParent,
Expand All @@ -18,19 +31,7 @@ import {
MANUAL_TRIGGER_NODE_DISPLAY_NAME,
MANUAL_TRIGGER_NODE_NAME,
} from '../constants';
import {
clickCreateNewCredential,
clickExecuteNode,
clickGetBackToCanvas,
} from '../composables/ndv';
import { setCredentialValues } from '../composables/modals/credential-modal';
import {
closeManualChatModal,
getManualChatMessages,
getManualChatModalLogs,
getManualChatModalLogsEntries,
sendManualChatMessage,
} from '../composables/modals/chat-modal';
import { NDV, WorkflowPage as WorkflowPageClass } from '../pages';
import { createMockNodeExecutionData, getVisibleSelect, runMockWorkflowExecution } from '../utils';

const ndv = new NDV();
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/27-cloud.cy.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import planData from '../fixtures/Plan_data_opt_in_trial.json';
import {
BannerStack,
MainSidebar,
WorkflowPage,
visitPublicApiPage,
getPublicApiUpgradeCTA,
} from '../pages';
import planData from '../fixtures/Plan_data_opt_in_trial.json';

const mainSidebar = new MainSidebar();
const bannerStack = new BannerStack();
Expand Down
5 changes: 3 additions & 2 deletions cypress/e2e/27-two-factor-authentication.cy.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import generateOTPToken from 'cypress-otp';

import { MainSidebar } from './../pages/sidebar/main-sidebar';
import { INSTANCE_OWNER, INSTANCE_ADMIN, BACKEND_BASE_URL } from '../constants';
import { SigninPage } from '../pages';
import { PersonalSettingsPage } from '../pages/settings-personal';
import { MfaLoginPage } from '../pages/mfa-login';
import { MainSidebar } from './../pages/sidebar/main-sidebar';
import { PersonalSettingsPage } from '../pages/settings-personal';

const MFA_SECRET = 'KVKFKRCPNZQUYMLXOVYDSQKJKZDTSRLD';

Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/29-templates.cy.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import OnboardingWorkflow from '../fixtures/Onboarding_workflow.json';
import WorkflowTemplate from '../fixtures/Workflow_template_write_http_query.json';
import { MainSidebar } from '../pages/sidebar/main-sidebar';
import { TemplatesPage } from '../pages/templates';
import { WorkflowPage } from '../pages/workflow';
import { WorkflowsPage } from '../pages/workflows';
import { MainSidebar } from '../pages/sidebar/main-sidebar';
import OnboardingWorkflow from '../fixtures/Onboarding_workflow.json';
import WorkflowTemplate from '../fixtures/Workflow_template_write_http_query.json';

const templatesPage = new TemplatesPage();
const workflowPage = new WorkflowPage();
Expand Down
64 changes: 32 additions & 32 deletions cypress/e2e/30-langchain.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,34 @@
import { createMockNodeExecutionData, runMockWorkflowExecution } from '../utils';
import {
AGENT_NODE_NAME,
MANUAL_CHAT_TRIGGER_NODE_NAME,
AI_LANGUAGE_MODEL_OPENAI_CHAT_MODEL_NODE_NAME,
MANUAL_TRIGGER_NODE_NAME,
AI_MEMORY_WINDOW_BUFFER_MEMORY_NODE_NAME,
AI_TOOL_CALCULATOR_NODE_NAME,
AI_OUTPUT_PARSER_AUTO_FIXING_NODE_NAME,
AI_TOOL_CODE_NODE_NAME,
AI_TOOL_WIKIPEDIA_NODE_NAME,
BASIC_LLM_CHAIN_NODE_NAME,
EDIT_FIELDS_SET_NODE_NAME,
CHAT_TRIGGER_NODE_DISPLAY_NAME,
} from './../constants';
import {
closeManualChatModal,
getManualChatDialog,
getManualChatMessages,
getManualChatModal,
getManualChatModalLogs,
getManualChatModalLogsEntries,
getManualChatModalLogsTree,
sendManualChatMessage,
} from '../composables/modals/chat-modal';
import { setCredentialValues } from '../composables/modals/credential-modal';
import {
clickCreateNewCredential,
clickExecuteNode,
clickGetBackToCanvas,
toggleParameterCheckboxInputByName,
} from '../composables/ndv';
import {
addLanguageModelNodeToParent,
addMemoryNodeToParent,
Expand All @@ -14,37 +44,7 @@ import {
openNode,
getConnectionBySourceAndTarget,
} from '../composables/workflow';
import {
clickCreateNewCredential,
clickExecuteNode,
clickGetBackToCanvas,
toggleParameterCheckboxInputByName,
} from '../composables/ndv';
import { setCredentialValues } from '../composables/modals/credential-modal';
import {
closeManualChatModal,
getManualChatDialog,
getManualChatMessages,
getManualChatModal,
getManualChatModalLogs,
getManualChatModalLogsEntries,
getManualChatModalLogsTree,
sendManualChatMessage,
} from '../composables/modals/chat-modal';
import {
AGENT_NODE_NAME,
MANUAL_CHAT_TRIGGER_NODE_NAME,
AI_LANGUAGE_MODEL_OPENAI_CHAT_MODEL_NODE_NAME,
MANUAL_TRIGGER_NODE_NAME,
AI_MEMORY_WINDOW_BUFFER_MEMORY_NODE_NAME,
AI_TOOL_CALCULATOR_NODE_NAME,
AI_OUTPUT_PARSER_AUTO_FIXING_NODE_NAME,
AI_TOOL_CODE_NODE_NAME,
AI_TOOL_WIKIPEDIA_NODE_NAME,
BASIC_LLM_CHAIN_NODE_NAME,
EDIT_FIELDS_SET_NODE_NAME,
CHAT_TRIGGER_NODE_DISPLAY_NAME,
} from './../constants';
import { createMockNodeExecutionData, runMockWorkflowExecution } from '../utils';

describe('Langchain Integration', () => {
beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/31-demo.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import workflow from '../fixtures/Manual_wait_set.json';
import { importWorkflow, visitDemoPage } from '../pages/demo';
import { WorkflowPage } from '../pages/workflow';
import { errorToast } from '../pages/notifications';
import { WorkflowPage } from '../pages/workflow';

const workflowPage = new WorkflowPage();

Expand Down
10 changes: 5 additions & 5 deletions cypress/e2e/34-template-credentials-setup.cy.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import * as setupCredsModal from '../composables/modals/workflow-credential-setup-modal';
import * as formStep from '../composables/setup-template-form-step';
import { getSetupWorkflowCredentialsButton } from '../composables/setup-workflow-credentials-button';
import TestTemplate1 from '../fixtures/Test_Template_1.json';
import TestTemplate2 from '../fixtures/Test_Template_2.json';
import {
clickUseWorkflowButtonByTitle,
visitTemplateCollectionPage,
testData,
} from '../pages/template-collection';
import * as templateCredentialsSetupPage from '../pages/template-credential-setup';
import { WorkflowPage } from '../pages/workflow';
import * as formStep from '../composables/setup-template-form-step';
import { getSetupWorkflowCredentialsButton } from '../composables/setup-workflow-credentials-button';
import * as setupCredsModal from '../composables/modals/workflow-credential-setup-modal';
import TestTemplate1 from '../fixtures/Test_Template_1.json';
import TestTemplate2 from '../fixtures/Test_Template_2.json';

const workflowPage = new WorkflowPage();

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/36-versions.cy.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { WorkflowsPage } from '../pages/workflows';
import {
closeVersionUpdatesPanel,
getVersionCard,
getVersionUpdatesPanelOpenButton,
openVersionUpdatesPanel,
} from '../composables/versions';
import { WorkflowsPage } from '../pages/workflows';

const workflowsPage = new WorkflowsPage();

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/39-projects.cy.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as projects from '../composables/projects';
import { INSTANCE_MEMBERS, MANUAL_TRIGGER_NODE_NAME, NOTION_NODE_NAME } from '../constants';
import {
WorkflowsPage,
Expand All @@ -8,7 +9,6 @@ import {
NDV,
MainSidebar,
} from '../pages';
import * as projects from '../composables/projects';
import { getVisibleDropdown, getVisibleModalOverlay, getVisibleSelect } from '../utils';

const workflowsPage = new WorkflowsPage();
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/4-node-creator.cy.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { IF_NODE_NAME } from '../constants';
import { NodeCreator } from '../pages/features/node-creator';
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
import { NDV } from '../pages/ndv';
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
import { getVisibleSelect } from '../utils';
import { IF_NODE_NAME } from '../constants';

const nodeCreatorFeature = new NodeCreator();
const WorkflowPage = new WorkflowPageClass();
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/44-routing.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { WorkflowsPage as WorkflowsPageClass } from '../pages/workflows';
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
import { EDIT_FIELDS_SET_NODE_NAME } from '../constants';
import { getSaveChangesModal } from '../composables/modals/save-changes-modal';
import { EDIT_FIELDS_SET_NODE_NAME } from '../constants';
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
import { WorkflowsPage as WorkflowsPageClass } from '../pages/workflows';

const WorkflowsPage = new WorkflowsPageClass();
const WorkflowPage = new WorkflowPageClass();
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/5-ndv.cy.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { setCredentialValues } from '../composables/modals/credential-modal';
import { clickCreateNewCredential } from '../composables/ndv';
import { MANUAL_TRIGGER_NODE_DISPLAY_NAME, NOTION_NODE_NAME } from '../constants';
import { NDV, WorkflowPage } from '../pages';
import { NodeCreator } from '../pages/features/node-creator';
import { clickCreateNewCredential } from '../composables/ndv';
import { setCredentialValues } from '../composables/modals/credential-modal';

const workflowPage = new WorkflowPage();
const ndv = new NDV();
Expand Down
Loading

0 comments on commit 2a0ade9

Please sign in to comment.