mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat(editor): Add Python to Code actions (#18668)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { BasePage } from './base';
|
||||
import { NodeCreator } from './features/node-creator';
|
||||
import { clickContextMenuAction, getCanvasPane, openContextMenu } from '../composables/workflow';
|
||||
import { META_KEY } from '../constants';
|
||||
import { CODE_NODE_ACTION, CODE_NODE_NAME, META_KEY } from '../constants';
|
||||
import type { OpenContextMenuOptions } from '../types';
|
||||
import { getVisibleSelect } from '../utils';
|
||||
import { getUniqueWorkflowName } from '../utils/workflowUtils';
|
||||
@@ -179,6 +179,12 @@ export class WorkflowPage extends BasePage {
|
||||
win.preventNodeViewBeforeUnload = preventNodeViewUnload;
|
||||
});
|
||||
},
|
||||
addInitialCodeNodeToCanvas(opts: { keepNdvOpen: boolean } = { keepNdvOpen: false }) {
|
||||
this.addInitialNodeToCanvas(CODE_NODE_NAME, {
|
||||
action: CODE_NODE_ACTION,
|
||||
keepNdvOpen: opts.keepNdvOpen,
|
||||
});
|
||||
},
|
||||
addInitialNodeToCanvas: (
|
||||
nodeDisplayName: string,
|
||||
opts?: { keepNdvOpen?: boolean; action?: string; isTrigger?: boolean },
|
||||
@@ -202,6 +208,9 @@ export class WorkflowPage extends BasePage {
|
||||
cy.get('body').type('{esc}');
|
||||
}
|
||||
},
|
||||
addCodeNodeToCanvas(plusButtonClick = true, preventNdvClose?: boolean) {
|
||||
this.addNodeToCanvas(CODE_NODE_NAME, plusButtonClick, preventNdvClose, CODE_NODE_ACTION);
|
||||
},
|
||||
addNodeToCanvas: (
|
||||
nodeDisplayName: string,
|
||||
plusButtonClick = true,
|
||||
|
||||
Reference in New Issue
Block a user