2022-11-28 07:54:13 -08:00
|
|
|
import { WorkflowPage as WorkflowPageClass } from '../pages/workflow';
|
|
|
|
|
|
|
|
const WorkflowPage = new WorkflowPageClass();
|
|
|
|
|
|
|
|
describe('Code node', () => {
|
|
|
|
beforeEach(() => {
|
2022-11-28 11:01:44 -08:00
|
|
|
cy.resetAll();
|
2022-11-28 07:54:13 -08:00
|
|
|
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');
|
|
|
|
});
|
|
|
|
});
|