diff --git a/packages/ui-tests/cypress/e2e/designer/mandatoryPropsWarnings.cy.ts b/packages/ui-tests/cypress/e2e/designer/mandatoryPropsWarnings.cy.ts new file mode 100644 index 000000000..5500d1857 --- /dev/null +++ b/packages/ui-tests/cypress/e2e/designer/mandatoryPropsWarnings.cy.ts @@ -0,0 +1,50 @@ +describe('Test for Multi route actions from the canvas', () => { + beforeEach(() => { + cy.openHomePage(); + }); + it('Check the canvas node warnings in Camel Route', () => { + cy.uploadFixture('flows/CamelRoute.yaml'); + cy.openDesignPage(); + + cy.selectAppendNode('setHeader'); + cy.get('.pf-v5-c-text-input-group__text-input').click(); + cy.get('.pf-v5-c-text-input-group__text-input').type('github'); + cy.get('#github').should('be.visible').click(); + // wait for the canvas rerender + cy.wait(1000); + cy.checkNodeExist('github', 1); + + cy.get('[data-id^="github"] g').find('.pf-topology__node__decorator__bg').click(); + cy.get('.pf-v5-c-tooltip__content').should( + 'have.text', + '3 required parameters are not yet configured: [ type,repoName,repoOwner ]', + ); + + cy.openStepConfigurationTab('github'); + cy.interactWithConfigInputObject('parameters.repoName', 'test'); + cy.closeStepConfigurationTab(); + + cy.get('[data-id^="github"] g').find('.pf-topology__node__decorator__bg').click(); + cy.get('.pf-v5-c-tooltip__content').should( + 'have.text', + '2 required parameters are not yet configured: [ type,repoOwner ]', + ); + }); + + it('Check the canvas node warnings in Pipe', () => { + cy.uploadFixture('flows/ErrorHandlerPipe.yaml'); + cy.openDesignPage(); + + cy.get('[data-id^="delay-action"] g').find('.pf-topology__node__decorator__bg').click(); + cy.get('.pf-v5-c-tooltip__content').should( + 'have.text', + '1 required parameter is not yet configured: [ milliseconds ]', + ); + + cy.openStepConfigurationTab('delay-action'); + cy.interactWithConfigInputObject('milliseconds', '1000'); + cy.closeStepConfigurationTab(); + + cy.get('[data-id^="delay-action"] g').find('.pf-topology__node__decorator__bg').should('not.exist'); + }); +}); diff --git a/packages/ui-tests/cypress/e2e/designer/multiFlowDesigner.cy.ts b/packages/ui-tests/cypress/e2e/designer/multiFlowDesigner.cy.ts index d9f30ebf5..83aedb21d 100644 --- a/packages/ui-tests/cypress/e2e/designer/multiFlowDesigner.cy.ts +++ b/packages/ui-tests/cypress/e2e/designer/multiFlowDesigner.cy.ts @@ -36,18 +36,16 @@ describe('Test for Multi route actions from the canvas', () => { cy.get('[data-testid="flows-list-route-count"]').should('have.text', '1/2'); cy.get('[data-testid="flows-list-dropdown"]').click(); - // Blocked by https://github.com/KaotoIO/kaoto-next/issues/513 - // cy.get('[data-testid=goto-btn-route-1234--edit]').click(); - // cy.get('[data-testid=goto-btn-route-1234--text-input]').dblclick(); - // cy.get('[data-testid=goto-btn-route-1234--text-input]').clear().type('route-4321'); - // cy.get('div.pf-c-form__helper-text').should('have.text', 'Name must be unique'); - // cy.get('[data-testid="goto-btn-route-1234--text-input"]').dblclick(); - // cy.get('[data-testid="goto-btn-route-1234--text-input"]').clear().type('test 2'); - // cy.get('div.pf-c-form__helper-text').should( - // 'have.text', - // 'Name should only contain lowercase letters, numbers, and dashes', - // ); - cy.get('[data-testid="goto-btn-route-1234--edit"]').click(); + cy.get('[data-testid=goto-btn-route-1234--edit]').click(); + cy.get('[data-testid=goto-btn-route-1234--text-input]').dblclick(); + cy.get('[data-testid=goto-btn-route-1234--text-input]').clear().type('route-4321'); + cy.get('.pf-v5-c-helper-text__item-text').should('have.text', 'Name must be unique'); + cy.get('[data-testid="goto-btn-route-1234--text-input"]').dblclick(); + cy.get('[data-testid="goto-btn-route-1234--text-input"]').clear().type('test 2'); + cy.get('.pf-v5-c-helper-text__item-text').should( + 'have.text', + 'Name should only contain lowercase letters, numbers, and dashes', + ); cy.get('[data-testid="goto-btn-route-1234--text-input"]').dblclick(); cy.get('[data-testid="goto-btn-route-1234--text-input"]').clear().type('test3'); cy.get('[data-testid="goto-btn-route-1234--save"]').click();