-
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): catalog versions e2e weekly tests
- Loading branch information
Showing
8 changed files
with
402 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,243 @@ | ||
name: 🏗️ E2E Weekly Tests (Cypress) | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * 7" | ||
|
||
jobs: | ||
install: | ||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: cypress/browsers:node-20.13.1-chrome-125.0.6422.60-1-ff-126.0-edge-125.0.2535.51-1 | ||
options: --user 1001 | ||
|
||
steps: | ||
- name: 👷♀️ Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
**/node_modules | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- uses: actions/cache@v4 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: 'maven' | ||
|
||
# Install dependencies | ||
- run: yarn install --immutable | ||
|
||
# Build packages excluding @kaoto/camel-catalog since it was build during installing dependencies | ||
- name: Build packages | ||
run: yarn workspaces foreach --verbose --all --topological-dev --exclude @kaoto/camel-catalog run build | ||
|
||
# Build lib | ||
- name: Build @kaoto/kaoto package in lib mode | ||
run: yarn workspace @kaoto/kaoto run build:lib | ||
|
||
- name: 💾 Save build folder | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ui-dist | ||
if-no-files-found: error | ||
path: packages/ui/dist | ||
|
||
- name: 💾 Save catalog build folder | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: catalog-dist | ||
if-no-files-found: error | ||
path: packages/catalog-generator/dist/camel-catalog | ||
|
||
test-on-firefox: | ||
needs: install | ||
runs-on: ubuntu-latest | ||
container: | ||
image: cypress/browsers:node-20.13.1-chrome-125.0.6422.60-1-ff-126.0-edge-125.0.2535.51-1 | ||
options: --user 1001 | ||
|
||
steps: | ||
- name: 👷♀️ Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: 'maven' | ||
|
||
- name: 🗄️ Download the UI build folder | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ui-dist | ||
path: packages/ui/dist | ||
|
||
- name: 🗄️ Download the catalog build folder | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: catalog-dist | ||
path: packages/camel-catalog/dist | ||
|
||
- name: 🔨 Cypress run | ||
uses: cypress-io/github-action@v6.7.8 | ||
with: | ||
browser: firefox | ||
# we have already installed all dependencies above | ||
# install: false | ||
start: yarn workspace @kaoto/kaoto run preview --host | ||
config: baseUrl=http://localhost:4173 | ||
working-directory: packages/ui-tests | ||
wait-on: 'http://127.0.0.1:4173' | ||
wait-on-timeout: 120 | ||
env: grepTags=weekly | ||
env: | ||
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} | ||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: 💾 Save videos | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: videos-firefox | ||
path: packages/ui-tests/cypress/videos | ||
|
||
- name: 💾 Save screenshots | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: screenshots-firefox | ||
path: packages/ui-tests/cypress/screenshots | ||
|
||
test-on-chrome: | ||
needs: install | ||
runs-on: ubuntu-latest | ||
container: | ||
image: cypress/browsers:node-20.13.1-chrome-125.0.6422.60-1-ff-126.0-edge-125.0.2535.51-1 | ||
options: --user 1001 | ||
|
||
steps: | ||
- name: 👷♀️ Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: 'maven' | ||
|
||
- name: 🗄️ Download the UI build folder | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ui-dist | ||
path: packages/ui/dist | ||
|
||
- name: 🗄️ Download the catalog build folder | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: catalog-dist | ||
path: packages/camel-catalog/dist | ||
|
||
- name: 🔨 Cypress run | ||
uses: cypress-io/github-action@v6.7.8 | ||
with: | ||
browser: chrome | ||
# we have already installed all dependencies above | ||
# install: false | ||
start: yarn workspace @kaoto/kaoto run preview --host | ||
config: baseUrl=http://localhost:4173 | ||
working-directory: packages/ui-tests | ||
wait-on: 'http://127.0.0.1:4173' | ||
wait-on-timeout: 120 | ||
env: grepTags=weekly | ||
env: | ||
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} | ||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: 💾 Save videos | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: videos-chrome | ||
path: packages/ui-tests/cypress/videos | ||
|
||
- name: 💾 Save screenshots | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: screenshots-chrome | ||
path: packages/ui-tests/cypress/screenshots | ||
|
||
test-on-edge: | ||
needs: install | ||
runs-on: ubuntu-latest | ||
container: | ||
image: cypress/browsers:node-20.13.1-chrome-125.0.6422.60-1-ff-126.0-edge-125.0.2535.51-1 | ||
options: --user 1001 | ||
|
||
steps: | ||
- name: 👷♀️ Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: 'maven' | ||
|
||
- name: 🗄️ Download the UI build folder | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ui-dist | ||
path: packages/ui/dist | ||
|
||
- name: 🗄️ Download the catalog build folder | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: catalog-dist | ||
path: packages/camel-catalog/dist | ||
|
||
- name: 🔨 Cypress run | ||
uses: cypress-io/github-action@v6.7.8 | ||
with: | ||
browser: edge | ||
# we have already installed all dependencies above | ||
# install: false | ||
start: yarn workspace @kaoto/kaoto run preview --host | ||
config: baseUrl=http://localhost:4173 | ||
working-directory: packages/ui-tests | ||
wait-on: 'http://127.0.0.1:4173' | ||
wait-on-timeout: 120 | ||
env: grepTags=weekly | ||
env: | ||
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} | ||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: 💾 Save videos | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: videos-edge | ||
path: packages/ui-tests/cypress/videos | ||
|
||
- name: 💾 Save screenshots | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: screenshots-edge | ||
path: packages/ui-tests/cypress/screenshots |
62 changes: 62 additions & 0 deletions
62
packages/ui-tests/cypress/e2e/catalogVersions/catalogVersionsMain.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,62 @@ | ||
describe('Test for catalog versions', () => { | ||
beforeEach(() => { | ||
cy.openHomePage(); | ||
}); | ||
|
||
const testData = [ | ||
{ type: 'Main', version: 'Camel Main 4.9.0' }, | ||
{ type: 'Main', version: 'Camel Main 4.4.0.redhat-00046' }, | ||
{ type: 'Main', version: 'Camel Main 4.8.0.redhat-00017' }, | ||
{ type: 'Main', version: 'Camel Main 4.4.4' }, | ||
{ type: 'Main', version: 'Camel Main 4.8.2' }, | ||
{ type: 'Quarkus', version: 'Camel Quarkus 3.17.0' }, | ||
{ type: 'Quarkus', version: 'Camel Quarkus 3.15.1' }, | ||
{ type: 'Quarkus', version: 'Camel Quarkus 3.8.4' }, | ||
{ type: 'Quarkus', version: 'Camel Quarkus 3.15.0.redhat-00007' }, | ||
{ type: 'Quarkus', version: 'Camel Quarkus 3.8.0.redhat-00018' }, | ||
{ type: 'Spring Boot', version: 'Camel Spring Boot 4.4.0.redhat-00039' }, | ||
{ type: 'Spring Boot', version: 'Camel Spring Boot 4.8.0.redhat-00022' }, | ||
{ type: 'Spring Boot', version: 'Camel Spring Boot 4.4.4' }, | ||
{ type: 'Spring Boot', version: 'Camel Spring Boot 4.8.2' }, | ||
{ type: 'Spring Boot', version: 'Camel Spring Boot 4.9.0' }, | ||
]; | ||
testData.forEach((data) => { | ||
it(`Catalog version test for ${data.version}`, { tags: ['weekly'] }, () => { | ||
cy.uploadFixture('flows/camelRoute/catalogConfig.yaml'); | ||
cy.openDesignPage(); | ||
|
||
cy.hoverOnRuntime(data.type); | ||
cy.get(`[data-testid^="runtime-selector-${data.version}"] button.pf-v5-c-menu__item`) | ||
.first() | ||
.click({ force: true }); | ||
cy.get('body').then((body) => { | ||
if (body.find('[testid="loading-schemas"]').length > 0) { | ||
cy.waitSchemasLoading(); | ||
} | ||
}); | ||
|
||
cy.openStepConfigurationTab('timer', 0); | ||
cy.selectFormTab('All'); | ||
// Check the configured fields didn't change in the node | ||
cy.checkConfigInputObject('parameters.timerName', 'testTimerName'); | ||
cy.checkConfigInputObject('parameters.delay', '2000'); | ||
cy.checkConfigInputObject('parameters.period', '2000'); | ||
cy.checkConfigInputObject('parameters.repeatCount', '10'); | ||
|
||
cy.openStepConfigurationTab('setHeader', 0); | ||
cy.selectFormTab('All'); | ||
// Check the configured fields didn't change in the node | ||
cy.checkConfigInputObject('expression', 'testExpression'); | ||
cy.checkConfigInputObject('id', 'testId'); | ||
cy.checkConfigInputObject('name', 'testName'); | ||
|
||
cy.openStepConfigurationTab('log', 0); | ||
cy.selectFormTab('All'); | ||
// Check the configured fields didn't change in the node | ||
cy.checkConfigInputObject('description', 'log'); | ||
cy.checkConfigInputObject('logName', 'testLoggerName'); | ||
cy.contains('button', 'Processor advanced properties').click(); | ||
cy.checkConfigInputObject('marker', 'testMarker'); | ||
}); | ||
}); | ||
}); |
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
25 changes: 25 additions & 0 deletions
25
packages/ui-tests/cypress/fixtures/flows/camelRoute/catalogConfig.yaml
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,25 @@ | ||
- route: | ||
id: route-3933 | ||
from: | ||
id: from-3455 | ||
uri: timer | ||
parameters: | ||
delay: "2000" | ||
fixedRate: false | ||
period: "2000" | ||
repeatCount: "10" | ||
timerName: testTimerName | ||
steps: | ||
- setHeader: | ||
id: setHeader-2258 | ||
expression: | ||
simple: | ||
id: testId | ||
expression: testExpression | ||
name: testName | ||
- log: | ||
id: log-3491 | ||
description: log | ||
logName: testLoggerName | ||
marker: testMarker | ||
message: ${body} |
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
Oops, something went wrong.