-
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
6 changed files
with
190 additions
and
4 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'); | ||
const 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); | ||
}); | ||
}); |
50 changes: 50 additions & 0 deletions
50
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,50 @@ | ||
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'); | ||
const elementVersion = dataTestidValue!.substring(dataTestidValue!.lastIndexOf(' ') + 1); | ||
cy.selectAppendNode('setHeader'); | ||
cy.checkCatalogVersion(elementVersion); | ||
}); | ||
|
||
cy.chooseFromCatalog('component', 'spring-event'); | ||
cy.checkNodeExist('spring-event', 1); | ||
|
||
cy.selectPrependNode('setHeader'); | ||
cy.chooseFromCatalog('processor', 'log'); | ||
cy.checkNodeExist('log', 2); | ||
|
||
cy.openSourceCode(); | ||
cy.checkCodeSpanLine('uri: spring-event', 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', 'spring-event'); | ||
cy.checkNodeExist('spring-event', 1); | ||
|
||
cy.selectAppendNode('setBody'); | ||
cy.chooseFromCatalog('processor', 'log'); | ||
cy.checkNodeExist('log', 1); | ||
|
||
cy.openSourceCode(); | ||
cy.checkCodeSpanLine('uri: spring-event', 1); | ||
cy.checkCodeSpanLine('log', 1); | ||
}); | ||
}); |
46 changes: 46 additions & 0 deletions
46
packages/ui-tests/cypress/e2e/designer/catalogs/userSpecifiedCatalog.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,46 @@ | ||
describe('Tests for user specified Quarkus catalog type', () => { | ||
// Specify custom catalog URL | ||
before(() => { | ||
cy.openHomePage(); | ||
cy.openSettings(); | ||
cy.interactWithConfigInputObject('catalogUrl', Cypress.config().baseUrl + '/camel-catalog/index.json'); | ||
cy.get('[data-testid="settings-form-save-btn"]').click(); | ||
cy.waitSchemasLoading(); | ||
}); | ||
|
||
// Reset catalog URL | ||
after(() => { | ||
cy.openSettings(); | ||
cy.get('input[name="catalogUrl"]').clear(); | ||
cy.get('[data-testid="settings-form-save-btn"]').click(); | ||
cy.waitSchemasLoading(); | ||
}); | ||
|
||
const runtime = 'Quarkus'; | ||
|
||
it('User specified Camel Quarkus catalog with CR', () => { | ||
cy.openDesignPage(); | ||
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'); | ||
const elementVersion = dataTestidValue!.substring(dataTestidValue!.lastIndexOf(' ') + 1); | ||
cy.selectAppendNode('setHeader'); | ||
cy.checkCatalogVersion(elementVersion); | ||
}); | ||
|
||
cy.chooseFromCatalog('component', 'dropbox'); | ||
cy.checkNodeExist('dropbox', 1); | ||
|
||
cy.selectPrependNode('setHeader'); | ||
cy.chooseFromCatalog('processor', 'log'); | ||
cy.checkNodeExist('log', 2); | ||
|
||
cy.openSourceCode(); | ||
cy.checkCodeSpanLine('uri: dropbox', 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
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