Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
npm run update:axonivy:next
npm install
npm run build:production
npm run download:engine https://dev.axonivy.com/permalink/dev/axonivy-engine.zip
npm run download:engine https://dev.axonivy.com/permalink/nightly/axonivy-engine.zip
rm -r extension/AxonIvyEngine/system/demo-applications
npm run test:playwright:download:vscode
extension/AxonIvyEngine/bin/AxonIvyEngine startdaemon
Expand Down
10 changes: 0 additions & 10 deletions build/integration/base/Dockerfile

This file was deleted.

49 changes: 0 additions & 49 deletions build/integration/base/Jenkinsfile

This file was deleted.

14 changes: 0 additions & 14 deletions build/integration/base/build.sh

This file was deleted.

17 changes: 0 additions & 17 deletions build/integration/openvscode-server/Dockerfile

This file was deleted.

54 changes: 33 additions & 21 deletions build/integration/openvscode-server/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
pipeline {
agent any

tools {
jdk 'temurin-jdk-21.0.6.7'
maven '3.9'
}

options {
buildDiscarder(logRotator(numToKeepStr: '60', artifactNumToKeepStr: '2'))
disableConcurrentBuilds()
Expand All @@ -12,40 +17,47 @@ pipeline {

parameters {
string(name: 'engineDownloadUrl', defaultValue: 'https://jenkins.ivyteam.io/job/core_product-engine/job/master/lastSuccessfulBuild/artifact/workspace/ch.ivyteam.ivy.server.product/target/products/*_Slim_*.zip/*zip*/products.zip', description: 'engine that will be packaged')
string(name: 'openvscodeVersion', defaultValue: 'v1.96.4', description: 'openvscode version that will be used')
}

environment {
JAVA_OPTS_IVY_SYSTEM = '-Divy.engine.testheadless=true'
CI = 'true'
RUN_IN_BRWOSER = 'true'
}

stages {
stage('Build') {
agent {
dockerfile {
filename 'build/Dockerfile'
reuseNode true
}
}

steps {
script {
sh 'npm run update:axonivy:next'
sh 'npm install'
sh 'npm run build:production'
sh 'npm run download:engine ' + params.engineDownloadUrl
sh 'npm run package'
nodejs(nodeJSInstallationName: '22.11.0') {
sh """
npm run update:axonivy:next
npm install
npm run build:production
npm run download:engine ${params.engineDownloadUrl}
wget https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-${params.openvscodeVersion}/openvscode-server-${params.openvscodeVersion}-linux-x64.tar.gz
tar -xzf openvscode-server-${params.openvscodeVersion}-linux-x64.tar.gz
cp -r extension/. openvscode-server-${params.openvscodeVersion}-linux-x64/extensions/extension
nohup extension/AxonIvyEngine/bin/AxonIvyEngine &
nohup openvscode-server-${params.openvscodeVersion}-linux-x64/bin/openvscode-server --host 0.0.0.0 --without-connection-token --disable-workspace-trust &
npx playwright install --with-deps chromium
"""
}
}
}
}

stage('Playwright Tests') {
steps {
script {
docker.build('openvscode-server', '-f build/integration/openvscode-server/Dockerfile .').withRun("--network host", "--disable-workspace-trust") { container ->
docker.image('docker-registry.ivyteam.io/axonivy/playwright-base:dev').inside("--network host -e RUN_IN_BRWOSER=true") {
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
sh 'npm run test:playwright:browser'
}
archiveArtifacts artifacts: '**/playwright/test-results/**', allowEmptyArchive: true
withChecks('WebTests') {
junit testDataPublishers: [[$class: 'StabilityTestDataPublisher']], testResults: '**/node_modules/**/report.xml'
}
nodejs(nodeJSInstallationName: '22.11.0') {
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
sh 'npm run test:playwright:browser'
}
archiveArtifacts artifacts: '**/playwright/test-results/**', allowEmptyArchive: true
withChecks('WebTests') {
junit testDataPublishers: [[$class: 'StabilityTestDataPublisher']], testResults: '**/node_modules/**/report.xml'
}
}
}
Expand Down
58 changes: 29 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
"watch": "lerna run watch --parallel"
},
"dependencies": {
"@axonivy/dataclass-editor": "13.1.0-next.457",
"@axonivy/form-editor": "13.1.0-next.595",
"@axonivy/form-editor-core": "13.1.0-next.595",
"@axonivy/dataclass-editor": "13.1.0-next.461",
"@axonivy/form-editor": "13.1.0-next.597",
"@axonivy/form-editor-core": "13.1.0-next.597",
"@axonivy/process-editor": "13.1.0-next.1423",
"@axonivy/process-editor-inscription": "13.1.0-next.1423",
"@axonivy/variable-editor": "13.1.0-next.605",
"@axonivy/variable-editor": "13.1.0-next.607",
"vscode-messenger-common": "0.4.5"
},
"devDependencies": {
Expand Down
4 changes: 3 additions & 1 deletion playwright/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import { defineConfig } from '@playwright/test';
export default defineConfig({
use: {
permissions: ['clipboard-read'],
trace: 'retain-on-failure'
trace: 'on-first-retry',
screenshot: 'on',
video: 'on-first-retry'
},
testDir: './tests',
workers: 1,
Expand Down
10 changes: 1 addition & 9 deletions playwright/tests/create-data-class.spec.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
import { test } from './fixtures/baseTest';
import { prebuiltWorkspacePath, randomArtefactName, removeFromWorkspace } from './workspaces/workspace';
import { FileExplorer } from './page-objects/explorer-view';
import path from 'path';
import { DataClassEditor } from './page-objects/data-class-editor';
import { Editor } from './page-objects/editor';

test.describe('Create Data Class', () => {
test.afterAll(async () => {
const projectPath = path.join(prebuiltWorkspacePath);
removeFromWorkspace(projectPath, 'dataclasses', 'ch');
removeFromWorkspace(projectPath, 'src_dataClasses', 'ch');
});

test('Add new Data Class', async ({ page }) => {
const explorer = new FileExplorer(page);
await explorer.hasDeployProjectStatusMessage();
const dataClassName = randomArtefactName();
const dataClassName = 'testCreateData';
await explorer.addDataClass(dataClassName, 'ch.ivyteam.test.data');
await explorer.hasNode(`${dataClassName}.d.json`);
const dataClassEditor = new DataClassEditor(page, `${dataClassName}.d.json`);
Expand Down
11 changes: 1 addition & 10 deletions playwright/tests/create-process.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { prebuiltEmptyWorkspacePath, randomArtefactName, removeFromWorkspace } from './workspaces/workspace';
import { expect } from '@playwright/test';
import { ProcessEditor } from './page-objects/process-editor';
import { FileExplorer } from './page-objects/explorer-view';
Expand All @@ -7,22 +6,14 @@ import { test } from './fixtures/baseTest';
test.describe('Create Process', () => {
let explorer: FileExplorer;
let processEditor: ProcessEditor;
let processName: string;
const cleanUp = () => removeFromWorkspace(prebuiltEmptyWorkspacePath, 'processes');

test.use({ workspace: prebuiltEmptyWorkspacePath });
const processName = 'testCreateProcess';

test.beforeEach(async ({ page }) => {
explorer = new FileExplorer(page);
await explorer.hasDeployProjectStatusMessage();
processName = randomArtefactName();
processEditor = new ProcessEditor(page, `${processName}.p.json`);
});

test.afterAll(async () => {
cleanUp();
});

test('Add business process, execute, edit and redeploy', async ({ page }) => {
await processEditor.hasNoStatusMessage();
await explorer.addProcess(processName, 'Business Process');
Expand Down
Loading
Loading