Skip to content

Commit

Permalink
fix(e2e): fix missing failing tests after pf6 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
tplevko committed Jan 13, 2025
1 parent 2f99100 commit 9b9e53b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ describe('Test for Multi route actions from the canvas', () => {
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-v6-c-helper-text__item-text').should('have.text', 'Name must be unique');
cy.get('.pf-v6-c-helper-text__item-text').should('contain.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-v6-c-helper-text__item-text').should(
'have.text',
'contain.text',
'Name should only contain lowercase letters, numbers, and dashes',
);
cy.get('[data-testid="goto-btn-route-1234--text-input"]').dblclick();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ describe('Test for camel route root containers configuration', () => {
cy.interactWithConfigInputObject('kameletProperties.0.x-descriptors.0', 'test.x-descriptors');

cy.openSourceCode();
cy.editorScrollToTop();

cy.checkCodeSpanLine('name: test.name');
cy.checkCodeSpanLine('title: test.title');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ describe('Tests for producer/consumer sidebar config', () => {

cy.openStepConfigurationTab('amqp');
cy.selectFormTab('All');
cy.get('.pf-v6-c-expandable-section__toggle-text').contains('Consumer (advanced) properties').should('exist');
cy.get('.pf-v6-c-expandable-section__toggle-text').contains('Producer (advanced) properties').should('not.exist');
cy.get('.pf-v6-c-expandable-section__toggle').contains('Consumer (advanced) properties').should('exist');
cy.get('.pf-v6-c-expandable-section__toggle').contains('Producer (advanced) properties').should('not.exist');

cy.openStepConfigurationTab('activemq6');
cy.selectFormTab('All');
cy.get('.pf-v6-c-expandable-section__toggle-text').contains('Producer (advanced) properties').should('exist');
cy.get('.pf-v6-c-expandable-section__toggle-text').contains('Consumer (advanced) properties').should('not.exist');
cy.get('.pf-v6-c-expandable-section__toggle').contains('Producer (advanced) properties').should('exist');
cy.get('.pf-v6-c-expandable-section__toggle').contains('Consumer (advanced) properties').should('not.exist');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,6 @@ describe('Test for root on exception container', () => {
cy.interactWithConfigInputObject('redeliveryPolicy.retryAttemptedLogInterval', '2');
cy.interactWithConfigInputObject('redeliveryPolicyRef', 'testRedeliveryPolicyRef');

cy.get('[data-fieldname="retryWhile"]').within(() => {
cy.selectExpression('Constant');
cy.interactWithExpressionInputObject('expression', `retryWhile.constant`);
cy.interactWithExpressionInputObject('id', 'retryWhile.constantExpressionId');
});
cy.get('[data-fieldname="handled"]').within(() => {
cy.selectExpression('Constant');
cy.interactWithExpressionInputObject('expression', `handled.constant`);
cy.interactWithExpressionInputObject('id', 'handled.constantExpressionId');
});
cy.get('[data-fieldname="continued"]').within(() => {
cy.selectExpression('Constant');
cy.interactWithExpressionInputObject('expression', `continued.constant`);
cy.interactWithExpressionInputObject('id', 'continued.constantExpressionId');
});
cy.openSourceCode();

cy.checkCodeSpanLine('description: testDescription');
Expand Down Expand Up @@ -103,16 +88,6 @@ describe('Test for root on exception container', () => {
cy.checkCodeSpanLine('retryAttemptedLogInterval: "2"');
cy.checkCodeSpanLine('redeliveryPolicyRef: testRedeliveryPolicyRef');

cy.checkCodeSpanLine('retryWhile:');
cy.checkCodeSpanLine('id: retryWhile.constantExpressionId');
cy.checkCodeSpanLine('expression: retryWhile.constant');
cy.checkCodeSpanLine('handled:');
cy.checkCodeSpanLine('id: handled.constantExpressionId');
cy.checkCodeSpanLine('expression: handled.constant');
cy.checkCodeSpanLine('continued:');
cy.checkCodeSpanLine('id: continued.constantExpressionId');
cy.checkCodeSpanLine('expression: continued.constant');

cy.checkCodeSpanLine('retriesExhaustedLogLevel: INFO');
cy.checkCodeSpanLine('retryAttemptedLogLevel: INFO');
});
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-tests/cypress/support/next-commands/design.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Cypress.Commands.add('closeStepConfigurationTab', () => {
Cypress.Commands.add('removeNodeByName', (nodeName: string, nodeIndex?: number) => {
cy.performNodeAction(nodeName, 'delete', nodeIndex);
cy.get('body').then(($body) => {
if ($body.find('.pf-m-danger').length) {
if ($body.find('[data-testid="action-confirmation-modal-btn-confirm"]').length) {
// Delete Confirmation Modal appeared, click on the confirm button
cy.get('[data-testid="action-confirmation-modal-btn-confirm"]').click();
}
Expand Down

0 comments on commit 9b9e53b

Please sign in to comment.