n8n/cypress/e2e/6-code-node.cy.ts
कारतोफ्फेलस्क्रिप्ट™ f023e957b0
fix: Fix the e2e tests on master (no-changelog) (#4746)
2022-11-28 21:01:44 +02:00

35 lines
1.1 KiB
TypeScript

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