Skip to content

Commit

Permalink
e2e(1568): test for EnableAll menu item
Browse files Browse the repository at this point in the history
  • Loading branch information
tplevko authored and lordrip committed Oct 16, 2024
1 parent 3ec247d commit 48146a9
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});
2 changes: 2 additions & 0 deletions packages/ui-tests/cypress/support/cypress.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ declare global {
| 'insert-special'
| 'delete'
| 'disable'
| 'enable-all'
| 'container-remove';

namespace Cypress {
Expand Down Expand Up @@ -49,6 +50,7 @@ declare global {
selectReplaceNode(inputName: string, nodeIndex?: number): Chainable<JQuery<Element>>;
selectAppendNode(inputName: string, nodeIndex?: number): Chainable<JQuery<Element>>;
selectDisableNode(inputName: string, nodeIndex?: number): Chainable<JQuery<Element>>;
selectEnableAllNodes(inputName: string, nodeIndex?: number): Chainable<JQuery<Element>>;
selectInsertSpecialNode(inputName: string, nodeIndex?: number): Chainable<JQuery<Element>>;
selectInsertNode(inputName: string, nodeIndex?: number): Chainable<JQuery<Element>>;
selectPrependNode(inputName: string, nodeIndex?: number): Chainable<JQuery<Element>>;
Expand Down
4 changes: 4 additions & 0 deletions packages/ui-tests/cypress/support/next-commands/design.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down

0 comments on commit 48146a9

Please sign in to comment.