-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
e2e: coverage for missing camel route config types
- Loading branch information
Showing
6 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
60 changes: 60 additions & 0 deletions
60
packages/ui-tests/cypress/e2e/designer/specialCamelRoutes/errorHandler.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
describe('Test for errorHandler configuration container', () => { | ||
beforeEach(() => { | ||
cy.openHomePage(); | ||
}); | ||
|
||
it('ErrorHandler types check', () => { | ||
cy.selectCamelRouteType('Error Handling', 'errorHandler'); | ||
|
||
cy.get('[data-id^="errorHandler"]') | ||
.find('.pf-topology__node__label') | ||
.find('.pf-topology__node__label__background') | ||
.click(); | ||
|
||
cy.get('#-oneof-toggle').click(); | ||
cy.get('ul.pf-v5-c-menu__list > li:first') | ||
.should('have.attr', 'data-testid', '-oneof-select-dropdownlist-Dead Letter Channel') | ||
.next('li') | ||
.should('have.attr', 'data-testid', '-oneof-select-dropdownlist-Default Error Handler') | ||
.next('li') | ||
.should('have.attr', 'data-testid', '-oneof-select-dropdownlist-Jta Transaction Error Handler') | ||
.next('li') | ||
.should('have.attr', 'data-testid', '-oneof-select-dropdownlist-No Error Handler') | ||
.next('li') | ||
.should('have.attr', 'data-testid', '-oneof-select-dropdownlist-Ref Error Handler') | ||
.next('li') | ||
.should('have.attr', 'data-testid', '-oneof-select-dropdownlist-Spring Transaction Error Handler'); | ||
}); | ||
|
||
it('Root Default error handler configuration', () => { | ||
cy.selectCamelRouteType('Error Handling', 'errorHandler'); | ||
|
||
cy.get('[data-id^="errorHandler"]') | ||
.find('.pf-topology__node__label') | ||
.find('.pf-topology__node__label__background') | ||
.click(); | ||
|
||
cy.get('#-oneof-toggle').click(); | ||
cy.get('[data-testid="-oneof-select-dropdownlist-Default Error Handler"]').click(); | ||
|
||
cy.interactWithConfigInputObject('defaultErrorHandler.executorServiceRef', 'testExecutorServiceRef'); | ||
cy.interactWithConfigInputObject('defaultErrorHandler.id', 'testId'); | ||
cy.selectInTypeaheadField('defaultErrorHandler.level', 'INFO'); | ||
cy.interactWithConfigInputObject('defaultErrorHandler.logName', 'testLogName'); | ||
cy.interactWithConfigInputObject('defaultErrorHandler.loggerRef', 'testLoggerRef'); | ||
cy.interactWithConfigInputObject('defaultErrorHandler.onExceptionOccurredRef', 'testOnExceptionOccuredRef'); | ||
cy.interactWithConfigInputObject('defaultErrorHandler.onPrepareFailureRef', 'testOnPrepareFailureRef'); | ||
cy.interactWithConfigInputObject('defaultErrorHandler.onRedeliveryRef', 'testOnRedeliveryRef'); | ||
|
||
cy.openSourceCode(); | ||
cy.checkCodeSpanLine('- errorHandler:'); | ||
cy.checkCodeSpanLine('defaultErrorHandler:'); | ||
cy.checkCodeSpanLine('executorServiceRef: testExecutorServiceRef'); | ||
cy.checkCodeSpanLine('id: testId'); | ||
cy.checkCodeSpanLine('logName: testLogName'); | ||
cy.checkCodeSpanLine('loggerRef: testLoggerRef'); | ||
cy.checkCodeSpanLine('onExceptionOccurredRef: testOnExceptionOccuredRef'); | ||
cy.checkCodeSpanLine('onPrepareFailureRef: testOnPrepareFailureRef'); | ||
cy.checkCodeSpanLine('onRedeliveryRef: testOnRedeliveryRef'); | ||
}); | ||
}); |
26 changes: 26 additions & 0 deletions
26
packages/ui-tests/cypress/e2e/designer/specialCamelRoutes/interceptSendToEndpoint.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
describe('Test for interceptSendToEndpoint configuration container', () => { | ||
beforeEach(() => { | ||
cy.openHomePage(); | ||
}); | ||
|
||
it('Root interceptSendToEndpoint configuration', () => { | ||
cy.selectCamelRouteType('Configuration', 'interceptSendToEndpoint'); | ||
|
||
cy.get('[data-id^="interceptSendToEndpoint"]') | ||
.find('.pf-topology__node__label') | ||
.find('.pf-topology__node__label__background') | ||
.click(); | ||
|
||
cy.interactWithConfigInputObject('description', 'testDescription'); | ||
cy.interactWithConfigInputObject('skipSendToOriginalEndpoint', 'testSkipSendToOriginalEndpoint'); | ||
|
||
cy.get('#processor-advanced-expandable-section-toggle').click(); | ||
cy.interactWithConfigInputObject('afterUri', 'testAfterUri'); | ||
|
||
cy.openSourceCode(); | ||
cy.checkCodeSpanLine('- interceptSendToEndpoint:'); | ||
cy.checkCodeSpanLine('description: testDescription'); | ||
cy.checkCodeSpanLine('skipSendToOriginalEndpoint: testSkipSendToOriginalEndpoint'); | ||
cy.checkCodeSpanLine('afterUri: testAfterUri'); | ||
}); | ||
}); |
32 changes: 32 additions & 0 deletions
32
packages/ui-tests/cypress/e2e/designer/specialCamelRoutes/onCompletion.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
describe('Test for onCompletion configuration container', () => { | ||
beforeEach(() => { | ||
cy.openHomePage(); | ||
}); | ||
|
||
it('Root onCompletion configuration', () => { | ||
cy.selectCamelRouteType('Configuration', 'onCompletion'); | ||
|
||
cy.get('[data-id^="onCompletion"]') | ||
.find('.pf-topology__node__label') | ||
.find('.pf-topology__node__label__background') | ||
.click(); | ||
|
||
cy.interactWithConfigInputObject('description', 'testDescription'); | ||
cy.interactWithConfigInputObject('onCompleteOnly'); | ||
cy.interactWithConfigInputObject('onFailureOnly'); | ||
|
||
cy.get('#processor-advanced-expandable-section-toggle').click(); | ||
cy.selectInTypeaheadField('mode', 'BeforeConsumer'); | ||
cy.interactWithConfigInputObject('parallelProcessing'); | ||
cy.interactWithConfigInputObject('useOriginalMessage'); | ||
|
||
cy.openSourceCode(); | ||
cy.checkCodeSpanLine('- onCompletion:'); | ||
cy.checkCodeSpanLine('description: testDescription'); | ||
cy.checkCodeSpanLine('onCompleteOnly: true'); | ||
cy.checkCodeSpanLine('onFailureOnly: true'); | ||
cy.checkCodeSpanLine('mode: BeforeConsumer'); | ||
cy.checkCodeSpanLine('parallelProcessing: true'); | ||
cy.checkCodeSpanLine('useOriginalMessage: true'); | ||
}); | ||
}); |
File renamed without changes.
File renamed without changes.
File renamed without changes.