n8n/cypress/e2e/6-code-node.cy.ts
OlegIvaniv 354edf6886
feat(editor): Redirect users to canvas if they don't have any workflows (#5629)
* feat(editor): Bring new users to empty canvas

* Fix failing e2e tests and revert CLI implementation

* Revert editor-ui Interface changes

* Try to mock /settings and /active

* Revert canvas test changes, reload after executions in 20-workflow-executions

* Make sure we include manual executiosn before running them in 20-workflow-executions

* Make sure to re-init node view when replacing empty workflows route, show phantom loader
2023-03-08 15:11:13 +01:00

36 lines
1.1 KiB
TypeScript

import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
import { NDV } from '../pages/ndv';
const WorkflowPage = new WorkflowPageClass();
const ndv = new NDV();
describe('Code node', () => {
before(() => {
cy.resetAll();
cy.skipSetup();
});
it('should execute the placeholder in all-items mode successfully', () => {
WorkflowPage.actions.addInitialNodeToCanvas('Manual');
WorkflowPage.actions.addNodeToCanvas('Code');
WorkflowPage.actions.openNode('Code');
ndv.actions.execute();
WorkflowPage.getters.successToast().contains('Node executed successfully');
});
it('should execute the placeholder in each-item mode successfully', () => {
WorkflowPage.actions.visit();
WorkflowPage.actions.addInitialNodeToCanvas('Manual');
WorkflowPage.actions.addNodeToCanvas('Code');
WorkflowPage.actions.openNode('Code');
ndv.getters.parameterInput('mode').click();
ndv.actions.selectOptionInParameterDropdown('mode', 'Run Once for Each Item');
ndv.actions.execute();
WorkflowPage.getters.successToast().contains('Node executed successfully');
});
});