Skip to content

Commit

Permalink
e2e(659): Indication the connectors mandatory properties are not conf…
Browse files Browse the repository at this point in the history
…igured
  • Loading branch information
tplevko committed Feb 20, 2024
1 parent 90205ee commit 83d08bc
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -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');
});
});
22 changes: 10 additions & 12 deletions packages/ui-tests/cypress/e2e/designer/multiFlowDesigner.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 83d08bc

Please sign in to comment.