diff --git a/packages/ui-tests/cypress/e2e/designer/basicNodeActions/stepDisable.cy.ts b/packages/ui-tests/cypress/e2e/designer/basicNodeActions/stepDisable.cy.ts index 4745de6bb..81c3f3005 100644 --- a/packages/ui-tests/cypress/e2e/designer/basicNodeActions/stepDisable.cy.ts +++ b/packages/ui-tests/cypress/e2e/designer/basicNodeActions/stepDisable.cy.ts @@ -15,4 +15,29 @@ describe('Tests for Design page', () => { cy.openSourceCode(); cy.checkCodeSpanLine('disabled: true', 1); }); + + it('Design - disable and enable multiple steps in CamelRoute', () => { + cy.uploadFixture('flows/camelRoute/basic.yaml'); + cy.openDesignPage(); + + cy.selectDisableNode('setHeader'); + cy.selectDisableNode('marshal'); + cy.selectDisableNode('log'); + + cy.openStepConfigurationTab('setHeader'); + cy.selectFormTab('All'); + cy.checkConfigCheckboxObject('disabled', true); + cy.openStepConfigurationTab('marshal'); + cy.selectFormTab('All'); + cy.checkConfigCheckboxObject('disabled', true); + cy.openStepConfigurationTab('log'); + cy.selectFormTab('All'); + cy.checkConfigCheckboxObject('disabled', true); + + cy.openDesignPage(); + cy.selectEnableAllNodes('setHeader'); + + cy.openSourceCode(); + cy.checkCodeSpanLine('disabled: true', 0); + }); }); diff --git a/packages/ui-tests/cypress/support/cypress.d.ts b/packages/ui-tests/cypress/support/cypress.d.ts index 424e716f4..7f0ee5108 100644 --- a/packages/ui-tests/cypress/support/cypress.d.ts +++ b/packages/ui-tests/cypress/support/cypress.d.ts @@ -13,6 +13,7 @@ declare global { | 'insert-special' | 'delete' | 'disable' + | 'enable-all' | 'container-remove'; namespace Cypress { @@ -49,6 +50,7 @@ declare global { selectReplaceNode(inputName: string, nodeIndex?: number): Chainable>; selectAppendNode(inputName: string, nodeIndex?: number): Chainable>; selectDisableNode(inputName: string, nodeIndex?: number): Chainable>; + selectEnableAllNodes(inputName: string, nodeIndex?: number): Chainable>; selectInsertSpecialNode(inputName: string, nodeIndex?: number): Chainable>; selectInsertNode(inputName: string, nodeIndex?: number): Chainable>; selectPrependNode(inputName: string, nodeIndex?: number): Chainable>; diff --git a/packages/ui-tests/cypress/support/next-commands/design.ts b/packages/ui-tests/cypress/support/next-commands/design.ts index 2d2723046..e02c7c8e6 100644 --- a/packages/ui-tests/cypress/support/next-commands/design.ts +++ b/packages/ui-tests/cypress/support/next-commands/design.ts @@ -42,6 +42,10 @@ Cypress.Commands.add('selectDisableNode', (nodeName: string, nodeIndex?: number) cy.performNodeAction(nodeName, 'disable', nodeIndex); }); +Cypress.Commands.add('selectEnableAllNodes', (nodeName: string, nodeIndex?: number) => { + cy.performNodeAction(nodeName, 'enable-all', nodeIndex); +}); + Cypress.Commands.add('selectInsertNode', (nodeName: string, nodeIndex?: number) => { cy.performNodeAction(nodeName, 'insert', nodeIndex); });