From 3a4551c0e005278fa79e11c7ed82268eac24f407 Mon Sep 17 00:00:00 2001 From: tplevko Date: Fri, 30 Aug 2024 11:11:46 +0200 Subject: [PATCH] e2e on exception cleanup - use predefined selector --- .../cypress/e2e/componentCatalog.cy.ts | 4 +- .../specialCamelRoutes/onException.cy.ts | 50 +++++++++---------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/packages/ui-tests/cypress/e2e/componentCatalog.cy.ts b/packages/ui-tests/cypress/e2e/componentCatalog.cy.ts index 8ccbaf01c..a33f323f5 100644 --- a/packages/ui-tests/cypress/e2e/componentCatalog.cy.ts +++ b/packages/ui-tests/cypress/e2e/componentCatalog.cy.ts @@ -22,8 +22,8 @@ describe('Catalog related tests', () => { cy.get('[data-testid="processor-catalog-tab"]').click(); cy.get('[data-testid="kamelet-catalog-tab"]').click(); - cy.get('.pf-v5-c-text-input-group__text-input').type('google'); - cy.get('div[id="google-storage-source"]').should('be.visible'); + cy.get('.pf-v5-c-text-input-group__text-input').type('aws secret'); + cy.get('div[id="aws-secrets-manager-sink"]').should('be.visible'); cy.get('button[aria-label="Reset"]').click(); cy.get('.pf-v5-c-text-input-group__text-input').should('have.value', ''); }); diff --git a/packages/ui-tests/cypress/e2e/designer/specialCamelRoutes/onException.cy.ts b/packages/ui-tests/cypress/e2e/designer/specialCamelRoutes/onException.cy.ts index 38eee19c7..0aff09c0e 100644 --- a/packages/ui-tests/cypress/e2e/designer/specialCamelRoutes/onException.cy.ts +++ b/packages/ui-tests/cypress/e2e/designer/specialCamelRoutes/onException.cy.ts @@ -37,31 +37,31 @@ describe('Test for root on exception container', () => { cy.selectInTypeaheadField('redeliveryPolicy.retriesExhaustedLogLevel', 'INFO'); cy.selectInTypeaheadField('redeliveryPolicy.retryAttemptedLogLevel', 'INFO'); - cy.get(`textarea[name="description"]`).clear().type('testDescription'); - cy.get(`input[name="onExceptionOccurredRef"]`).clear().type('testOnExceptionOccurredRef'); - cy.get(`input[name="onRedeliveryRef"]`).clear().type('testOnRedeliveryRef'); - cy.get(`input[name="redeliveryPolicy.id"]`).clear().type('testRedeliveryPolicyId'); - cy.get(`input[name="redeliveryPolicy.allowRedeliveryWhileStopping"]`).check(); - cy.get(`input[name="redeliveryPolicy.asyncDelayedRedelivery"]`).check(); - cy.get(`input[name="redeliveryPolicy.backOffMultiplier"]`).clear().type('3.0'); - cy.get(`input[name="redeliveryPolicy.collisionAvoidanceFactor"]`).clear().type('0.2'); - cy.get(`input[name="redeliveryPolicy.delayPattern"]`).clear().type('testRedeliveryPolicyDelayPattern'); - cy.get(`input[name="redeliveryPolicy.disableRedelivery"]`).check(); - cy.get(`input[name="redeliveryPolicy.exchangeFormatterRef"]`).clear().type('testExchangeFormatterRef'); - cy.get(`input[name="redeliveryPolicy.logContinued"]`).check(); - cy.get(`input[name="redeliveryPolicy.logExhausted"]`).check(); - cy.get(`input[name="redeliveryPolicy.logExhaustedMessageBody"]`).check(); - cy.get(`input[name="redeliveryPolicy.logExhaustedMessageHistory"]`).check(); - cy.get(`input[name="redeliveryPolicy.logHandled"]`).check(); - cy.get(`input[name="redeliveryPolicy.logNewException"]`).check(); - cy.get(`input[name="redeliveryPolicy.logRetryAttempted"]`).check(); - cy.get(`input[name="redeliveryPolicy.logRetryStackTrace"]`).check(); - cy.get(`input[name="redeliveryPolicy.logStackTrace"]`).check(); - cy.get(`input[name="redeliveryPolicy.maximumRedeliveries"]`).clear().type('10'); - cy.get(`input[name="redeliveryPolicy.maximumRedeliveryDelay"]`).clear().type('40000'); - cy.get(`input[name="redeliveryPolicy.redeliveryDelay"]`).clear().type('2000'); - cy.get(`input[name="redeliveryPolicy.retryAttemptedLogInterval"]`).clear().type('2'); - cy.get(`input[name="redeliveryPolicyRef"]`).clear().type('testRedeliveryPolicyRef'); + cy.interactWithConfigInputObject('description', 'testDescription'); + cy.interactWithConfigInputObject('onExceptionOccurredRef', 'testOnExceptionOccurredRef'); + cy.interactWithConfigInputObject('onRedeliveryRef', 'testOnRedeliveryRef'); + cy.interactWithConfigInputObject('redeliveryPolicy.id', 'testRedeliveryPolicyId'); + cy.interactWithConfigInputObject('redeliveryPolicy.allowRedeliveryWhileStopping'); + cy.interactWithConfigInputObject('redeliveryPolicy.asyncDelayedRedelivery'); + cy.interactWithConfigInputObject('redeliveryPolicy.backOffMultiplier', '3.0'); + cy.interactWithConfigInputObject('redeliveryPolicy.collisionAvoidanceFactor', '0.2'); + cy.interactWithConfigInputObject('redeliveryPolicy.delayPattern', 'testRedeliveryPolicyDelayPattern'); + cy.interactWithConfigInputObject('redeliveryPolicy.disableRedelivery'); + cy.interactWithConfigInputObject('redeliveryPolicy.exchangeFormatterRef', 'testExchangeFormatterRef'); + cy.interactWithConfigInputObject('redeliveryPolicy.logContinued'); + cy.interactWithConfigInputObject('redeliveryPolicy.logExhausted'); + cy.interactWithConfigInputObject('redeliveryPolicy.logExhaustedMessageBody'); + cy.interactWithConfigInputObject('redeliveryPolicy.logExhaustedMessageHistory'); + cy.interactWithConfigInputObject('redeliveryPolicy.logHandled'); + cy.interactWithConfigInputObject('redeliveryPolicy.logNewException'); + cy.interactWithConfigInputObject('redeliveryPolicy.logRetryAttempted'); + cy.interactWithConfigInputObject('redeliveryPolicy.logRetryStackTrace'); + cy.interactWithConfigInputObject('redeliveryPolicy.logStackTrace'); + cy.interactWithConfigInputObject('redeliveryPolicy.maximumRedeliveries', '10'); + cy.interactWithConfigInputObject('redeliveryPolicy.maximumRedeliveryDelay', '40000'); + cy.interactWithConfigInputObject('redeliveryPolicy.redeliveryDelay', '2000'); + cy.interactWithConfigInputObject('redeliveryPolicy.retryAttemptedLogInterval', '2'); + cy.interactWithConfigInputObject('redeliveryPolicyRef', 'testRedeliveryPolicyRef'); cy.get('[data-fieldname="retryWhile"]').within(() => { cy.selectExpression('Constant');