-
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.
- Loading branch information
Showing
4 changed files
with
135 additions
and
0 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
packages/ui-tests/cypress/e2e/designer/catalogs/quarkusCatalog.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,50 @@ | ||
describe('Tests for Quarkus catalog type', () => { | ||
beforeEach(() => { | ||
cy.openHomePage(); | ||
}); | ||
|
||
const runtime='Quarkus' | ||
|
||
it('Camel Quarkus catalog type with CR', () => { | ||
cy.selectRuntimeVersion(runtime); | ||
cy.uploadFixture('flows/camelRoute/basic.yaml'); | ||
cy.openDesignPage(); | ||
|
||
cy.hoverOnRuntime(runtime); | ||
cy.get(`[data-testid^="runtime-selector-Camel ${runtime}"]`).then(($element) => { | ||
const dataTestidValue = $element.attr('data-testid'); | ||
let runtimeVersion = dataTestidValue!.substring(dataTestidValue!.lastIndexOf(' ')+1); | ||
cy.selectAppendNode('setHeader'); | ||
cy.checkCatalogVersion(runtimeVersion); | ||
}); | ||
|
||
cy.chooseFromCatalog('component', 'as2'); | ||
cy.checkNodeExist('as2', 1); | ||
|
||
cy.selectPrependNode('setHeader'); | ||
cy.chooseFromCatalog('processor', 'log'); | ||
cy.checkNodeExist('log', 2); | ||
|
||
cy.openSourceCode(); | ||
cy.checkCodeSpanLine('uri: as2', 1); | ||
cy.checkCodeSpanLine('log', 1); | ||
}); | ||
|
||
it('Camel Quarkus catalog type with Kamelet', () => { | ||
cy.selectRuntimeVersion(runtime); | ||
cy.uploadFixture('flows/kamelet/basic.yaml'); | ||
cy.openDesignPage(); | ||
|
||
cy.selectPrependNode('setBody'); | ||
cy.chooseFromCatalog('component', 'as2'); | ||
cy.checkNodeExist('as2', 1); | ||
|
||
cy.selectAppendNode('setBody'); | ||
cy.chooseFromCatalog('processor', 'log'); | ||
cy.checkNodeExist('log', 1); | ||
|
||
cy.openSourceCode(); | ||
cy.checkCodeSpanLine('uri: as2', 1); | ||
cy.checkCodeSpanLine('log', 1); | ||
}); | ||
}); |
51 changes: 51 additions & 0 deletions
51
packages/ui-tests/cypress/e2e/designer/catalogs/springBootCatalog.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,51 @@ | ||
describe('Tests for SpringBoot catalog type', () => { | ||
beforeEach(() => { | ||
cy.openHomePage(); | ||
}); | ||
|
||
const runtime='SpringBoot' | ||
|
||
it('Camel SpringBoot catalog type with CR', () => { | ||
|
||
cy.selectRuntimeVersion(runtime); | ||
cy.uploadFixture('flows/camelRoute/basic.yaml'); | ||
cy.openDesignPage(); | ||
|
||
cy.hoverOnRuntime(runtime); | ||
cy.get(`[data-testid^="runtime-selector-Camel ${runtime}"]`).then(($element) => { | ||
const dataTestidValue = $element.attr('data-testid'); | ||
let elementVersion = dataTestidValue!.substring(dataTestidValue!.lastIndexOf(' ')+1); | ||
cy.selectAppendNode('setHeader'); | ||
cy.checkCatalogVersion(elementVersion); | ||
}); | ||
|
||
cy.chooseFromCatalog('component', 'as2'); | ||
cy.checkNodeExist('as2', 1); | ||
|
||
cy.selectPrependNode('setHeader'); | ||
cy.chooseFromCatalog('processor', 'log'); | ||
cy.checkNodeExist('log', 2); | ||
|
||
cy.openSourceCode(); | ||
cy.checkCodeSpanLine('uri: as2', 1); | ||
cy.checkCodeSpanLine('log', 1); | ||
}); | ||
|
||
it('Camel SpringBoot catalog type with Kamelet', () => { | ||
cy.selectRuntimeVersion(runtime); | ||
cy.uploadFixture('flows/kamelet/basic.yaml'); | ||
cy.openDesignPage(); | ||
|
||
cy.selectPrependNode('setBody'); | ||
cy.chooseFromCatalog('component', 'as2'); | ||
cy.checkNodeExist('as2', 1); | ||
|
||
cy.selectAppendNode('setBody'); | ||
cy.chooseFromCatalog('processor', 'log'); | ||
cy.checkNodeExist('log', 1); | ||
|
||
cy.openSourceCode(); | ||
cy.checkCodeSpanLine('uri: as2', 1); | ||
cy.checkCodeSpanLine('log', 1); | ||
}); | ||
}); |
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
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