Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e(659): Indication the connectors mandatory properties are not conf… #849

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading